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 | |
| set -e | |
| filename=$1 | |
| function repo_name { | |
| git remote -v | | |
| grep -m 1 "git@.*\.git" | | |
| awk '{print $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
| #!/bin/bash | |
| function github { | |
| git remote show -n github | | |
| grep Fetch | | |
| cut -d @ -f 2 | | |
| tr ':' '/' | | |
| sed s/\.git// | | |
| sed s#^#https://# | |
| } |
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 | |
| # | |
| # This script will take the labels from one GitHub repository's | |
| # Issues and sync all of your other repos' Issues with them. After | |
| # running, all of your repos will have the exact same set of Issue | |
| # labels. It assumes that every repo has Issues enabled. | |
| # | |
| # REQUIREMENTS: needs the 'requests' library, available from pip | |
| # | |
| # Config variables: |
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
| task 'build', 'Does the full build magic', -> | |
| test -> compile -> stitch -> compress() |
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
| compile = (callback) -> | |
| exec 'coffee -o bin/ -c src/', (err, stdout, stderr) -> | |
| throw err if err | |
| console.log "Compiled coffee files" | |
| callback?() |
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
| task 'test', 'Runs all Jasmine specs in spec/ folder', -> | |
| test() | |
| task 'compile', 'Compiles coffee in src/ to js in bin/', -> | |
| compile() | |
| task 'stitch', 'Stitches all app .js files', -> | |
| stitch() | |
| task 'compress', 'Runs UglifyJS on stitched file in order to compress it', -> |
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
| {exec} = require 'child_process' | |
| task 'test', 'Runs all Jasmine specs in spec/ folder', -> | |
| test() | |
| task 'compile', 'Compiles coffee in src/ to js in bin/', -> | |
| compile() | |
| task 'stitch', 'Stitches all app .js files', -> |
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
| (defun backwards-zap-to-char (char) | |
| (interactive "cZap backwards to char: ") | |
| (zap-to-char -1 char)) | |
| (global-set-key (kbd "M-Z") 'backwards-zap-to-char) |
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
| var adjust_twitter_view = function () { | |
| //reset colors | |
| $('li.stream-item').css('background','#fff'); | |
| //highlight most recent tweet to make it easier to visually ID the new ones | |
| $('li.stream-item').first().css('background','#dedede'); | |
| }; | |
| adjust_twitter_view(); | |
| //attach behavior to the "new tweets" button |
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 re | |
| with_style = '<div style="things and stuff" class="whatnot">hi there</div>' | |
| without_style = re.sub(r"""style=('|")(.*)\\1""", '', with_style) | |