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 | |
| curl --silent --include --url http://git.io --form "url=$1" \ | |
| | awk '/^Location:/ {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
| def rspec(path='') | |
| command = "rspec #{path}" | |
| if File.exist? 'tmp/zeus.pid' | |
| command = "zeus #{command}" | |
| else | |
| command = "bundle exec #{command}" | |
| end | |
| puts command | |
| system command |
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 | |
| DIR=$( git rev-parse --show-toplevel ) | |
| function zeus_pid { | |
| cat $DIR/tmp/zeus.pid 2>&- | |
| } | |
| function stop_zeus { | |
| pid=$(zeus_pid) |
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 | |
| /* | |
| Plugin Name: Force SSL URL Scheme | |
| Plugin URI: https://gist.github.com/webaware/4688802 | |
| Description: Force the protocol scheme to be HTTPS when is_ssl() doesn't work | |
| Version: 1.0.0-fork (0333d0901593e5b272df5a4e29fa7f576058031a) | |
| Author: WebAware | |
| Author URI: http://www.webaware.com.au/ | |
| Modified By: Beau Beveridge | |
| Modifications: |
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 | |
| time = Time.now | |
| hour = time.strftime('%-l').to_i | |
| hour += 1 if time.min > 44 | |
| mins = (15..44).include?(time.min) ? '30' : '' | |
| print ":clock#{hour}#{mins}:" |
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 | |
| require 'securerandom' | |
| hex = SecureRandom.hex(4) | |
| email = "%snippet:@@email%" | |
| print email.sub("@", "+#{hex}@") |
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
| # https://d3b4yo2b5lbfy.cloudfront.net/wp-content/uploads/2014/06/0e65eWorld-Event-Times-EN-6-17-2014.pdf | |
| --- | |
| - name: Tequatl | |
| tier: 3 | |
| duration: 1800 | |
| schedule: | |
| - '00:00:00 UTC' | |
| - '03:00:00 UTC' | |
| - '07:00:00 UTC' | |
| - '11:30:00 UTC' |
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
| # Automatically includes files under spec/support. | |
| Dir["./spec/support/**/*.rb"].sort.each { |f| require f } | |
| # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration | |
| RSpec.configure do |config| | |
| config.expect_with :rspec do |expectations| | |
| # This option will default to `true` in RSpec 4. It makes the `description` | |
| # and `failure_message` of custom matchers include text for helper methods | |
| # defined using `chain`, e.g.: | |
| # be_bigger_than(2).and_smaller_than(4).description |
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 -e | |
| ack_args=$@ | |
| git_ref='master' | |
| pattern='TODO|NOTE|XXX' | |
| function committed_files { | |
| git diff ${git_ref}..HEAD --diff-filter=ACMX -G"$pattern" --name-only | |
| } |
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 | |
| function _debug() { | |
| $args = func_get_args(); | |
| echo '<pre>'; | |
| foreach($args as $arg) { var_dump($arg); } | |
| echo '</pre>'; | |
| } |