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
typedef char C; | |
typedef long I; | |
typedef struct a { | |
I t,r,d[3],p[2]; | |
}* A; | |
#define P printf |
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
# Author: Randal S. Olson (randalolson.com / @randal_olson) | |
# Uses Tableau's Tableau10 color scheme | |
figure.figsize: 12, 7 | |
figure.edgecolor: white | |
figure.facecolor: white | |
lines.linewidth: 2.5 | |
lines.markeredgewidth: 0 | |
lines.markersize: 10 |
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 SimpleHTTPServer | |
import BaseHTTPServer | |
import sys | |
""" | |
Usage: | |
python httpd.py [port] [additional headers ...] |
#ST2/3 Search result syntax highlighting
##Introduction and disclaimer
This is gist contains an edited Find Results.hidden-tmLanguage
which adds syntax highlighting to your ST search results.
As far as I know, there is no plugin that does this and for that reason it needs to be done via config.
DISCLAIMER: Use this HACK at your risk and backup the original files you are about to mess with.
##Usage Guide for Sublime Text 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
import java.text.ParseException; | |
import java.util.Date; | |
import java.util.concurrent.TimeUnit; | |
import play.Logger; | |
import play.libs.Akka; | |
import play.libs.Time.CronExpression; | |
import scala.concurrent.duration.FiniteDuration; | |
import akka.actor.Cancellable; |
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(){ | |
var i = 0; | |
var count = $('.Album.unavailable,.Album.preview').length; | |
console.log('Found ' + count + ' albums to remove'); | |
var timeout = 0; | |
$('.Album.unavailable,.Album.preview').each(function(){ | |
var instance_i = i++; | |
var album = $(this); | |
album.trigger('mouseover').mouseenter(); | |
album.find('a,div,span,image').trigger('mouseover').mouseenter(); |
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 | |
def get_values(string, expression) | |
regex = Regexp.new(expression.gsub(/\{([^\}]+)\}/) { "(?<#{$1}>\\S+)" }) | |
(match = regex.match(string)) ? Hash[match.names.zip(match.captures)] : {} | |
end | |
p get_values "Alice is 23 years old", "{name} is {age} years old" #=> {"name"=>"Alice", "age"=>"23"} |
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
/* | |
* object.watch polyfill | |
* | |
* 2012-04-03 | |
* | |
* By Eli Grey, http://eligrey.com | |
* Public Domain. | |
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
*/ |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: