One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
TCL-Expect scripts are an amazingly easy way to script out laborious tasks in the shell when you need to be interactive with the console. Think of them as a "macro" or way to programmaticly step through a process you would run by hand. They are similar to shell scripts but utilize the .tcl extension and a different #! call.
The first step, similar to writing a bash script, is to tell the script what it's executing under. For expect we use the following:
#!/usr/bin/expect
Install Supervisor with sudo apt-get install supervisor. Ensure it's started with sudo service supervisor restart.
In /etc/supervisord/conf.d/ create a .conf file. In this example, laravel_queue.conf (contents below). Give it execute permissions: chmod +x laravel_queue.conf.
This file points at /usr/local/bin/run_queue.sh, so create that file there. Give this execute permissions, too: chmod +x run_queue.sh.
Now update Supervisor with: sudo supervisorctl reread. And start using those changes with: sudo supervisorctl update.
| #!/bin/sh | |
| # Config for SSL. | |
| echo "--- Making SSL Directory ---" | |
| mkdir /etc/nginx/ssl | |
| echo "--- Copying $i SSL crt and key ---" | |
| openssl req -nodes -new -x509 -keyout /etc/nginx/ssl/server.key -out /etc/nginx/ssl/server.crt -subj "/C=US/ST=NY/L=NYC/O=Dis/CN=www.example.com" | |
| echo "--- Turning SSL on in nginx.conf. ---" |
| # | |
| # Working with branches | |
| # | |
| # Get the current branch name (not so useful in itself, but used in | |
| # other aliases) | |
| branch-name = "!git rev-parse --abbrev-ref HEAD" | |
| # Push the current branch to the remote "origin", and set it to track | |
| # the upstream branch | |
| publish = "!git push -u origin $(git branch-name)" |
| /** | |
| * Mass (bulk) insert or update on duplicate for Laravel 4/5 | |
| * | |
| * insertOrUpdate([ | |
| * ['id'=>1,'value'=>10], | |
| * ['id'=>2,'value'=>60] | |
| * ]); | |
| * | |
| * | |
| * @param array $rows |
| #Recommended minimum configuration: | |
| acl manager proto cache_object | |
| acl localhost src 127.0.0.1/32 | |
| acl to_localhost dst 127.0.0.0/8 | |
| acl localnet src 0.0.0.0/8 192.168.100.0/24 192.168.101.0/24 | |
| acl SSL_ports port 443 | |
| acl Safe_ports port 80 # http | |
| acl Safe_ports port 21 # ftp | |
| acl Safe_ports port 443 # https | |
| acl Safe_ports port 70 # gopher |
| #DROPBOX SYNCING | |
| #============== | |
| # bash_profile | |
| rm -rf .bash_profile | |
| ln -s ~/Dropbox/.bash_profile .bash_profile | |
| # Sublime 2 Preferences | |
| cd ~/Library/Application\ Support/Sublime\ Text\ 2/ | |
| ln -s ~/Dropbox/appdata/sublime/Installed\ Packages ./Installed\ Packages |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"></script> | |
| </head> | |
| <body> | |
| <div id="container" style="width:100%;"> | |
| <div class="fb-like-box" data-href="https://www.facebook.com/adobegocreate" data-width="292" data-show-faces="true" data-stream="true" data-header="true"></div> | |
| </div> |
| // example function where arguments 2 and 3 are optional | |
| function example( err, optionalA, optionalB, callback ) { | |
| // retrieve arguments as array | |
| var args = []; | |
| for (var i = 0; i < arguments.length; i++) { | |
| args.push(arguments[i]); | |
| } | |
| // first argument is the error object |