Install git:
sudo apt-get install git
Configure Git:
touch ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
git config --global user.name "Your Name"
git config --global user.email "Your Email"
| require 'rubygems' | |
| require 'yaml' | |
| # A demonstration of YAML anchors, references and handling of nested values | |
| # For more info, see: | |
| # http://atechie.net/2009/07/merging-hashes-in-yaml-conf-files/ | |
| stooges = YAML::load( File.read('stooges.yml') ) | |
| # => { | |
| # "default" => { |
Install git:
sudo apt-get install git
Configure Git:
touch ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
git config --global user.name "Your Name"
git config --global user.email "Your Email"
| # TODO parser part 2 | |
| def get_todos(files): | |
| """Create a list of TODO information based on the given files. | |
| @param files: List of paths to Python source files. | |
| @return: List of (person, date, file, line, text) tuples corresponding to | |
| TODO comments in the given sources. | |
| """ | |
| comments = [] |
| #!/bin/sh | |
| # Credits to: | |
| # - http://vstone.eu/reducing-vagrant-box-size/ | |
| # - https://github.com/mitchellh/vagrant/issues/343 | |
| aptitude -y purge ri | |
| aptitude -y purge installation-report landscape-common wireless-tools wpasupplicant ubuntu-serverguide | |
| aptitude -y purge python-dbus libnl1 python-smartpm python-twisted-core libiw30 | |
| aptitude -y purge python-twisted-bin libdbus-glib-1-2 python-pexpect python-pycurl python-serial python-gobject python-pam python-openssl libffi5 |
| #!/bin/bash | |
| # Note that this script requires you to have | |
| # an X window running on Display :90 | |
| # This can be done by running: /usr/bin/Xvfb :90 -ac -screen 0 1024x768x8 & | |
| # | |
| # You can save this script as /etc/init.d/selenium to start and stop selenium | |
| PORT=4443 | |
| DESC="Selenium server" |
Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist.
Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).
| function firstSentence($string) { | |
| $sentences = explode(".", $string); | |
| return $sentences[0]; | |
| } |
| <?php | |
| /** | |
| * Implements hook_drush_command(). | |
| */ | |
| function seed_derivatives_drush_command() { | |
| $items = array(); | |
| $items['seed_derivatives'] = array( | |
| 'description' => "Create image derivatives", |
| language: php | |
| # | |
| # Important to note, this is the version of PHP used to run this build, not the | |
| # one used to run your Drupal installation. Ensure compatibility with the Drush | |
| # and Terminus versions you're using for this build. | |
| # | |
| php: | |
| - 5.3 |