- C-a == Ctrl-a
- M-a == Alt-a
:q close
:w write/saves
:wa[!] write/save all windows [force]
:wq write/save and close
| #! /usr/bin/env bash | |
| ### | |
| # | |
| # install_mysql.sh | |
| # | |
| # This script assumes your Vagrantfile has been configured to map the root of | |
| # your application to /vagrant and that your web root is the "public" folder | |
| # (Laravel standard). Standard and error output is sent to | |
| # /vagrant/vm_build.log during provisioning. |
| #------------------------------------------------------------------------------ | |
| # Make things VirtualEnv aware (Windows version). | |
| # More info: http://www.swegler.com/becky/blog/2011/08/28/python-django-mysql-on-windows-7-part-3-ipython-virtual-environments/ | |
| # add this to the end of ipython_config | |
| # (or course, for virtualenvs created via --no-site-packages, it would | |
| # be much easier just to install iPython) | |
| #------------------------------------------------------------------------------ | |
| import sys | |
| import site | |
| from os import environ |
| <?php | |
| /** | |
| * Content from http://en.wikipedia.org/wiki/List_of_HTTP_status_codes | |
| * | |
| * You may also want a list of unofficial codes: | |
| * | |
| * 103 => 'Checkpoint', | |
| * 218 => 'This is fine', // Apache Web Server | |
| * 419 => 'Page Expired', // Laravel Framework |
| __author__ = 'archeg' | |
| import httplib | |
| import urllib | |
| import urllib2 | |
| import re | |
| def URLRequest(url, params, headers, method="GET"): | |
| if method == "POST": |
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>HTML5 Starter Template</title> | |
| <meta name="description" content="Starter Template"> | |
| <meta name="author" content="Gregry Pike"> | |
| <link rel="stylesheet" href="css/styles.css?v=1.0"> | |
| <!--[if lt IE 9]> | |
| <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> |
| """ 1) Download python twitter library from https://github.com/sixohsix/twitter | |
| 2) Go to dev.twitter.com creaate an application and genenrate tokens | |
| 3) Setup your tokens below | |
| 4) python cleanup.py and your tweets are gone! | |
| """ | |
| from twitter import * | |
| t = Twitter( | |
| auth=OAuth('--your-access-token-here', |
| <?php | |
| namespace Acme\Bundle\AppBundle\Form\EventListener; | |
| use Symfony\Component\Form\Event\DataEvent; | |
| use Symfony\Component\Form\FormFactoryInterface; | |
| use Symfony\Component\EventDispatcher\EventSubscriberInterface; | |
| use Symfony\Component\Form\FormEvents; | |
| class IsAdminFieldSubscriber implements EventSubscriberInterface |
| $sudo chmod 777 /etc/apt/sources.list | |
| $sudo echo "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen" >> /etc/apt/sources.list | |
| $sudo apt-get update | |
| $sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 | |
| $sudo apt-get update |