Works great with Gist: The Website.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| import os | |
| import sys | |
| try: | |
| import simplejson as json | |
| except ImportError: | |
| import json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "files": | |
| { | |
| "angular.js": "https://ajax.googleapis.com/ajax/libs/angularjs/1.0.5/angular.min.js", | |
| "dropdown.js": "https://raw.github.com/enyo/dropzone/master/downloads/dropzone.js", | |
| "holder.js": "https://raw.github.com/imsky/holder/master/holder.js", | |
| "howler.js": "https://raw.github.com/goldfire/howler.js/master/howler.min.js", | |
| "jKit.js": "https://raw.github.com/FrediBach/jQuery-jKit/master/jquery-1.9.1.min.js", | |
| "jq++": "http://jquerypp.com/downloads/jquerypp-1.0.1.zip", | |
| "jquery.js": "http://code.jquery.com/jquery.min.js", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ./kill-me-please |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/perl -w | |
| use strict; | |
| my $since; | |
| if ($ARGV[0]) { | |
| $since = $ARGV[0]; | |
| } else { | |
| $since = "1 week ago"; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Outputs the reading time | |
| # Read this in “about 4 minutes” | |
| # Put into your _plugins dir in your Jekyll site | |
| # Usage: Read this in about {{ page.content | reading_time }} | |
| module ReadingTimeFilter | |
| def reading_time( input ) | |
| words_per_minute = 180 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Dbu\UtilBundle\Command; | |
| use Symfony\Component\Console\Input\InputInterface; | |
| use Symfony\Component\Console\Output\OutputInterface; | |
| use Symfony\Component\Console\Input\InputOption; | |
| use Symfony\Component\Finder\Finder; | |
| use Symfony\Component\Translation\MessageCatalogue; | |
| use Symfony\Component\Translation\Loader\LoaderInterface; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class PluginClass | |
| constructor: (@target) -> | |
| _this = @ # to access Class inside @target.each and not modificate @ inside @target.each | |
| eventData = {_class: _this} # to access Class inside event handlers | |
| @target.each -> | |
| self = $(@) | |
| self.on 'click', eventData, _this.submitHandler | |
| submitHandler: (e)-> | |
| _this = e.data._classs | |
| e.preventDefault() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| hosts_config(){ | |
| hosts_file=/private/etc/hosts | |
| echo "\n127.0.0.1 $1\n">>$hosts_file | |
| echo "Hosts file was updated." | |
| } | |
| apache_config(){ | |
| site_name=$1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " copy all this into a vim buffer, save it, then... | |
| " source the file by typing :so % | |
| " Now the vim buffer acts like a specialized application for mastering vim | |
| " There are two queues, Study and Known. Depending how confident you feel | |
| " about the item you are currently learning, you can move it down several | |
| " positions, all the way to the end of the Study queue, or to the Known | |
| " queue. | |
| " type ,, (that's comma comma) |