Skip to content

Instantly share code, notes, and snippets.

Avatar
😁
I may be slow to respond.

snipe snipe

😁
I may be slow to respond.
View GitHub Profile
View Timezones
// Modified version of the timezone list function from http://stackoverflow.com/a/17355238/507629
// Includes current time for each timezone (would help users who don't know what their timezone is)
function generate_timezone_list($val = NULL)
{
static $regions = array(
DateTimeZone::AFRICA,
DateTimeZone::AMERICA,
DateTimeZone::ANTARCTICA,
DateTimeZone::ASIA,
@snipe
snipe / gist:741e6c1df72db7059ddc
Last active Aug 27, 2015 — forked from jkeck/gist:3515705
Link directly to an open modal window in Bootstrap
View gist:741e6c1df72db7059ddc
/* If you've ever had the need to link directly to an open modal window with Bootstrap, here's a quick and easy way to do it:
Make sure your modal has an id and is classed with modal and permalink:
<div class="modal permalink" id="myModal" ... >
Then stick this bit of Javascript at at the end of your document:
*/
$(document).ready(function() {
View keybase.md

Keybase proof

I hereby claim:

  • I am snipe on github.
  • I am snipe (https://keybase.io/snipe) on keybase.
  • I have a public key whose fingerprint is C1CC 3935 03A5 D855 6602 F7C1 F564 2C61 1290 D7CC

To claim this, I am signing this object:

@snipe
snipe / gist:4aa434c53b65fd23c401
Created Jun 9, 2014
Encrypt Slack token with Travis' encryption cli interface
View gist:4aa434c53b65fd23c401
travis encrypt "snipe:<SLACK TOKEN>" --add notifications.slack
View gist:d1b603ba80ca2ee1fafc
Verifying that +snipe is my openname (Bitcoin username). https://onename.io/snipe
@snipe
snipe / gist:3e82c2c9288f761315eb
Created Feb 28, 2015
Versioning.php Artisan command for generating a version config for Laravel 4
View gist:3e82c2c9288f761315eb
<?php
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
class Versioning extends Command {
/**
* The console command name.
@snipe
snipe / gist:1469447
Created Dec 12, 2011 — forked from irohiroki/gist:909284
jQuery Mobile Red and Green themes for Buttons
View gist:1469447
/* F
-----------------------------------------------------------------------------------------------------------*/
.ui-btn-up-f, .ui-btn-hover-f, .ui-btn-down-f {
color: white;
font-weight: bold;
text-decoration: none; }
.ui-btn-up-f {
border: 1px solid #711414;
background: #ab2525;
@snipe
snipe / gist:1925906
Created Feb 27, 2012
Add/remove fields dynamically in jQuery Mobile, disable buttons once max/min fields reached
View gist:1925906
<script>
/*
See the full details here:
http://www.snipe.net/2012/02/jquery-mobile-add-remove-fields-dynamically/
Based on the great post by Charlie Griefer, available here:
http://charlie.griefer.com/blog/2009/09/17/jquery-dynamically-adding-form-elements/
*/
@snipe
snipe / headers-in-bed
Created Nov 1, 2012
HTTP Error codes as fortune cookies
View headers-in-bed
100 Continue (in bed)
101 Switching Protocols (in bed)
102 Processing (in bed)
200 OK (in bed)
201 Created (in bed)
202 Accepted (in bed)
203 Non-Authoritative Information (in bed)
204 No Content (in bed)
205 Reset Content (in bed)
206 Partial Content (in bed)
@snipe
snipe / currency_list
Created Nov 4, 2015 — forked from MindaugasR/currency_list
World Currency list in PHP Array
View currency_list
array (
'ALL' => 'Albania Lek',
'AFN' => 'Afghanistan Afghani',
'ARS' => 'Argentina Peso',
'AWG' => 'Aruba Guilder',
'AUD' => 'Australia Dollar',
'AZN' => 'Azerbaijan New Manat',
'BSD' => 'Bahamas Dollar',
'BBD' => 'Barbados Dollar',
'BDT' => 'Bangladeshi taka',