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
require('d3'); | |
var xmldom = require('xmldom'); | |
var dataset = { | |
apples: [53245, 28479, 19697, 24037, 40245], | |
}; | |
var width = 460, | |
height = 300, | |
radius = Math.min(width, height) / 2; |
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 | |
/** | |
* @file | |
* Settings. | |
*/ | |
$databases = array( | |
'default' => array( | |
'default' => array( | |
'database' => '', |
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/env python | |
""" | |
Output hash for a string | |
If not string is specified, then prompt for one (good for passwords). By default | |
the script will use SHA1, but you can specify any of the following: | |
--all (or -a) | |
--base64 (or -b) |
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/env python | |
import argparse | |
import sh | |
import re | |
import os | |
def verbose(message, options={}): | |
"""Display a message if we are using verbose mode""" | |
if 'verbose' not in options or not options.verbose: |
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 | |
$query = db_select('node', 'n'); | |
$string = dpq($query, TRUE); | |
dd($string); |
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
import sublime, sublime_plugin | |
import re | |
class FoldFunctionsCommand(sublime_plugin.TextCommand): | |
def run(self, edit): | |
# find things marked as a meta.function | |
functions = self.view.find_by_selector('meta.function.php') | |
print "FoldFunctions: functions found: %d" % len(functions) | |
# loop through those functions and figure out what region that they | |
# take up. |
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 | |
# create an empty shell module | |
if [[ $# -ne 1 ]]; then | |
echo 'Usage: drupal_make_module.sh [module_name]' | |
exit 1 | |
fi | |
if [[ ! -d sites/all/modules ]]; then |
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/env python | |
import argparse | |
import sh | |
import re | |
import os | |
def verbose(message, options={}): | |
"""Display a message if we are using verbose mode""" | |
if 'verbose' not in options or not options.verbose: |
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
// closures | |
(function($, Drupal, drupalSettings) { | |
var snow_base = 10; | |
Drupal.behaviors.snowman = { | |
attach: function() { | |
// can access $, Drupal, drupalSettings | |
} |
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
git tag release-`date +"%Y%m%d"` && git push origin release-`date +"%Y%m%d"` |