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:
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:
{% assign all_hosts = "" | split: "" %} | |
{% for host in site.data.shared_hosts %} | |
{% assign all_hosts = all_hosts | push: host %} | |
{% endfor %} | |
{% for host in site.data.paas_hosts %} | |
{% assign all_hosts = all_hosts | push: host %} | |
{% endfor %} |
#Steps to install latest Laravel, LEMP on AWS Ubuntu 14.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.
Run the following commands in sequence.
sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip
Inspired and edited from this Digital Ocean tutorial.
Follow the steps on this gist to setup a LEMP stack with PHP 7.0.
The steps assume Nginx has been configured correctly.
For the domains example.com
and test.com
, create the folders.
#!/bin/bash | |
# Stop all containers | |
docker stop $(docker ps -a -q) | |
# Delete all containers | |
docker rm $(docker ps -a -q) | |
# Delete all images | |
docker rmi $(docker images -q) |
To install a custom package or modify an existing docker image we need to
<?php | |
/* | |
Truncate (Shorten) Strings to the Nearest Whole Word or Character Count with Trailing Dots with PHP | |
http://www.internoetics.com/2016/02/01/shorten-strings-whole-word-character-count-php/ | |
*/ | |
/* String to be used in all examples */ | |
$string = 'Looorem ipsum velit inceptos posuere augue amet sagittis augue sapien gravida vestra nulla non hac ac luctus imperdiet pulvinar ligula hac elit molestie vestibulum fusce porttitor lacinia.'; | |
$string2 = 'Lorem ipsum velit inceptos posuere augue amet sagittis augue sapien gravida vestra.'; |
<?php | |
use App; | |
use DB; | |
use Illuminate\Database\Seeder; | |
use Illuminate\Database\Eloquent\Model; | |
class DatabaseSeeder extends Seeder | |
{ | |
/** |
/** | |
* Convert From/To Binary/Decimal/Hexadecimal in JavaScript | |
* https://gist.github.com/faisalman | |
* | |
* Copyright 2012-2015, Faisalman <fyzlman@gmail.com> | |
* Licensed under The MIT License | |
* http://www.opensource.org/licenses/mit-license | |
*/ | |
(function(){ |