This was tested on:
- Ubuntu 14.04 x64
- Ubuntu 16.04 x64
| #!/bin/bash | |
| # We install the fonts locally, not into /usr/share/fonts/truetype to avoid unnecessary sudo rights | |
| DEST_DIR="${HOME}/.fonts/segoeui" | |
| mkdir -p $DEST_DIR | |
| # Download 15 *.ttf files | |
| VARIANTS='segoeui segoeuib segoeuii segoeuiz segoeuil seguili segoeuisl seguisli seguisb seguisbi seguibl seguibli seguiemj seguisym seguihis' | |
| for VARIANT in $VARIANTS; do |
| #!/bin/bash | |
| # What it is: a script to compile and install Nginx manually in Ubuntu 14.04 server | |
| # Author: Pothi Kalimuthu | |
| # Author URL: http://pothi.info | |
| # License: GPL v2 | |
| ### VARIABLES ### | |
| # Please know that this script should be executed as normal user with __sudo__ privileges. |
| # Install linux update, followed by GCC and Make | |
| sudo yum -y update | |
| sudo yum install -y gcc make | |
| # Install Nginx and php56-FPM | |
| sudo yum install -y nginx php56-fpm | |
| # Install php56 extensions | |
| sudo yum install -y php56-devel php-mysql php56-pdo php56-pear php56-mbstring php56-cli php56-odbc php56-imap php56-gd php56-xml php56-soap |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| // Routes.php | |
| Route::get('upload', function() | |
| { | |
| return View::make('upload-form'); | |
| }); | |
| Route::post('upload', function() | |
| { | |
| // Get and move uploaded file. |
| $("#selectBox").append('<option value="option6">option6</option>'); |
This gist assumes:
| <?php | |
| // Laravel has some date functions in the query builder that I never really | |
| // see mentioned. Most of the time when a user needs to do a MONTH(col) select, | |
| // they are advised to do something like this: | |
| $employees = Employee::where(DB::Raw('MONTH(hired_at)'), '=', 4)->get(); | |
| // However, Laravel seems to have query builder functions that take care of this. | |
| // The above query could be rewritten as: | |
| $employees = Employee::whereMonth('hired_at', '=', 4)->get(); |