Kind of continue from the other gist how to install LAMP on an Amazon AMI
##Install git
sudo yum install git-core
##Create ssh directory since it doesn't exists by default on the Amazon AMI
| " vim:fdm=marker | |
| " Vundle {{{ | |
| set nocompatible | |
| filetype off | |
| set rtp+=~/.vim/bundle/vundle/ | |
| call vundle#rc() | |
| Bundle 'airblade/vim-gitgutter' | |
| Bundle 'bling/vim-airline' | |
| Bundle 'chriskempson/base16-vim' |
| # To enable CORS you should add lines with CORS rules below to your valet.conf file | |
| # Find the file /usr/local/etc/nginx/valet/valet.conf - this is Valet conf for Nginx | |
| # of try to execute `locate valet.conf` and find the `valet.coinf` in `nginx` subdirectory | |
| # after you edit your valet.conf do not forget to execute `valet restart` | |
| server { | |
| listen 80 default_server; | |
| root /; | |
| charset utf-8; | |
| client_max_body_size 128M; |
Kind of continue from the other gist how to install LAMP on an Amazon AMI
##Install git
sudo yum install git-core
##Create ssh directory since it doesn't exists by default on the Amazon AMI
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://www.npmjs.org/install.sh | sh |
| db.collection.createIndex( { orderDate: 1, zipcode: -1 }, {background: true} ) | |
| db.events.ensureIndex( { "timestampISO": 1 }, { expireAfterSeconds: 120*24*60*60 } ) // <3.0, TTL index, 120day retention period | |
| db.collection.getIndexes() //get all indexes | |
| db.collection.dropIndex("name"); //drop single index | |
| db.collection.dropIndexes(); //drop all indexes | |
| db.collection.find({ email: '[email protected]' }).explain("executionStats") // <3.0 : https://docs.mongodb.org/manual/reference/method/cursor.explain/#cursor.explain | |
| //https://docs.mongodb.org/manual/tutorial/measure-index-use/ | |
| db.collection.explain("executionStats").find({ email: '[email protected]' }) // 3.0 + | |
| db.events.totalIndexSize() // in bytes, should not exceed RAM |
| <?php | |
| namespace App\Charts; | |
| use App\Support\Livewire\ChartComponentData; | |
| use ConsoleTVs\Charts\Classes\Chartjs\Chart; | |
| /** | |
| * Class WanSpeedTestsChart | |
| * |
| <?php | |
| trait Sortable | |
| { | |
| /** | |
| * This function receives a $newOrder array parameter, which contains the order in which | |
| * we should sort our items after being dragged in the UI. The format of the $newOrder is: | |
| * | |
| * [ | |
| * newIndex => [ |
Start with a fresh Ubuntu Server 16.04 installation.
NOTE: In the commands and files below, be sure to replace <yourusername> with your username and <yourgroupname> with your group name (probably the same as your username). Also, replace <yourhostname> with your server's hostname.
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/mono-official.list
sudo apt update
| /* | |
| Jenn, I was looking back on the github examples I gave you and realized one more thing: | |
| If you didn't know it already, the ES6 arrow function syntax, has two shorthands | |
| the first one I showed in my example already: | |
| */ | |
| const arrowFn = () => { }; | |
| const arrowFn = () => { return thing; }; |