Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| Vagrant::Config.run do |config| | |
| config.vm.customize ["modifyvm", :id, "--cpus", 1] | |
| end |
| This playbook has been removed as it is now very outdated. |
| SELECT GROUP_CONCAT(column_name ORDER BY ordinal_position) | |
| FROM information_schema.columns | |
| WHERE table_schema = 'DATABASE_HERE' AND table_name = 'TABLE_HERE' |
| // api/controllers/AuthController.js | |
| var passport = require('passport'); | |
| var AuthController = { | |
| login: function (req,res) | |
| { | |
| res.view(); | |
| }, |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| NOTE: version numbers are at the time of this writing | |
| 1. Download and install Virtualbox (4.2.16) | |
| 2. Download and install Vagrant (1.2.3) | |
| 3. Check ruby and rubygems versions | |
| 4. Install berkshelf gem | |
| gem install berkshelf --version '>= 1.4.0' | |
| 5. Install berkshelf vagrant plugin | |
| vagrant plugin install vagrant-berkshelf --plugin-version '1.2.0' | |
| 6. Add vagrant basebox provided in Crifkin Training package (precise64_chef11.box) |
| if [ ! -f /tmp/.X5-lock ]; then /usr/bin/Xvfb :5 -ac -screen 0 1024x768x8 & fi | |
| export DISPLAY=:5.0 # firefox needs this to know where to find a display to run on | |
| java -jar /opt/selenium/selenium-server-standalone-2.26.0.jar > /dev/null 2>&1 & |
| client := &http.Client{] | |
| req, err := http.NewRequest("POST", "http://example.com", bytes.NewReader(postData)) | |
| req.Header.Add("User-Agent", "myClient") | |
| resp, err := client.Do(req) | |
| defer resp.Body.Close() |
| ansible-playbook ~/Development/playbooks/apt-drupal8.yml -u vagrant -s -k |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| Ansible module to manage iptables rules | |
| Written by Nick Groenen <[email protected]>. If you get your hands on a | |
| copy of this code, please feel free to do with it whatever you like. | |
| """ |