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 ruby | |
| # This script creates LaunchBar snippets for kaomojis | |
| # | |
| # About kaomojis: http://www.gomotes.com/text-emoticons/ | |
| # About LaunchBar snippets: https://blog.obdev.at/introducing-launchbar-snippets/ | |
| # | |
| # Run without `git checkout` | |
| # | |
| # ruby -e "$(curl -fsSL <RAW URL OF THIS GIST>)" | |
| # |
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
| # Usage: | |
| # foo('Near the intersection of Lexington Ave and E 40th St') | |
| # # => ['Lexington Ave', 'E 40th St'] | |
| # foo('Between Lexington Ave and E 40th St') | |
| # # => ['Lexington Ave', 'E 40th St'] | |
| # | |
| def foo(value) | |
| case value | |
| when (re = /^Near the intersection of (.*) and (.*)$/) | |
| when (re = /^Between (.*) and (.*)$/) |
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
| echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list | |
| sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" >> /etc/apt/sources.list' | |
| wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
| wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add - | |
| sudo apt-get update | |
| sudo apt-get install postgresql-9.3 postgresql-server-dev-9.3 postgresql-contrib-9.3 -y | |
| sudo apt-get install postgresql-9.3-postgis pgadmin3 postgresql-contrib -y | |
| sudo su - postgres -c "psql template1 -p 5433 -c 'CREATE EXTENSION IF NOT EXISTS hstore;'" |
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
| function _git_branch_name | |
| echo (git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||') | |
| end | |
| function _git_initialized_repo | |
| test (git rev-parse --git-dir ^/dev/null | wc -l) -gt 0 | |
| end | |
| function _git_commit_exists | |
| test (git log ^&1 | grep --count "^fatal") -eq 0 |
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
| Y | |
| OOOO | |
| OOOO | |
| OOOOOOOOOOO | |
| OOOO |
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
| /* | |
| * | |
| * Mongo-Hacker | |
| * MongoDB Shell Enhancements for Hackers | |
| * | |
| * Tyler J. Brock - 2013 | |
| * | |
| * http://tylerbrock.github.com/mongo-hacker | |
| * | |
| */ |
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
| Before do |scenario| | |
| DeferredGarbageCollection.start | |
| end | |
| After do |scenario| | |
| DeferredGarbageCollection.reconsider | |
| end | |
| at_exit do | |
| DeferredGarbageCollection.stop |
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
| for file in db/migrate/*; do | |
| echo "$(date -r $(git log --format=%at $file | tail -n1) +%Y%m%d%H%M%S) $file"; | |
| done; | |
| 20070401155320 db/migrate/004_add_timezone.rb | |
| 20070401155320 db/migrate/005_user_interface_type.rb | |
| 20070401155320 db/migrate/006_user_external_clients.rb | |
| 20070401155320 db/migrate/007_user_show_calendar.rb | |
| 20070401155320 db/migrate/008_client_css.rb | |
| 20070401155320 db/migrate/009_add_tasks_company_id.rb |
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 | |
| # | |
| # Run specs with great speed and daring-do. | |
| # | |
| if [ -f zeus.json ]; then | |
| zeus cucumber "$@" | |
| else | |
| bundle exec cucumber "$@" | |
| fi |
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 canvas, ctx, | |
| W, H, color, c_last; | |
| function init() { | |
| canvas = document.getElementById('c'); | |
| ctx = canvas.getContext('2d'); | |
| W = window.innerWidth; | |
| H = window.innerHeight; | |