A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.
Running a local server for testing purposes:
| # Laravel queue worker using systemd | |
| # ---------------------------------- | |
| # | |
| # /lib/systemd/system/queue.service | |
| # | |
| # run this command to enable service: | |
| # systemctl enable queue.service | |
| [Unit] | |
| Description=Laravel queue worker |
A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.
Running a local server for testing purposes:
| Overview: | |
| This was an example I have given to my co-developer who was doing some Task/Coodinator type of code. Hope this is helpful to many other developers out there. | |
| Note that the example only supports one-to-one dependency between TaskObject instance. The TaskAbstract class can be easily modified to support 1-to-many dependency. | |
| For simpicity, I have combined all three classes in this single gist: | |
| 1. TaskAbstract | |
| 2. TaskObject (extends TaskAbstract) | |
| 3. TaskCoordinator (extends TaskAbstract) |
| //events - a super-basic Javascript (publish subscribe) pattern | |
| var events = { | |
| events: {}, | |
| on: function (eventName, fn) { | |
| this.events[eventName] = this.events[eventName] || []; | |
| this.events[eventName].push(fn); | |
| }, | |
| off: function(eventName, fn) { | |
| if (this.events[eventName]) { |
| <?php | |
| /* | |
| * Converts CSV to JSON | |
| * Example uses Google Spreadsheet CSV feed | |
| * csvToArray function I think I found on php.net | |
| */ | |
| header('Content-type: application/json'); | |
| // Set your CSV feed |
| echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list | |
| wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
| sudo apt-get update | |
| sudo apt-get install postgresql-9.3 postgresql-server-dev-9.3 postgresql-contrib-9.3 -y | |
| #In case of error on previous step | |
| # sudo update-alternatives --remove postmaster.1.gz /usr/share/postgresql/9.1/man/man1/postmaster.1.gz | |
| # sudo apt-get install -f | |
| # sudo apt-get install --reinstall postgresql-9.1 | |
| ################################### | |
| ## CartoDB 2.0 Install [Working] ## | |
| ## Tested on Ubuntu 12.04 ## | |
| ################################### | |
| sudo apt-get update | |
| sudo apt-get safe-upgrade -y | |
| # Install miscellaneous dependencies packages | |
| sudo apt-get install -y git-core python-software-properties openmpi-bin libopenmpi-dev build-essential libxslt-dev zlib1g-dev ruby gems unzip |