This file contains 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
# Lowercase 'a' to 'z' list | |
print [chr(i) for i in xrange(ord('a'), ord('z')+1)] |
This file contains 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
''' | |
A quick way of timing code runs in Python using decorators | |
''' | |
import time | |
def timeit(method): |
This file contains 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
Show hidden characters
{ | |
"cmd": ["javac", "$file_name"], | |
"cmd": ["java", "$file_base_name"], | |
"working_dir": "${project_path:${folder}}", | |
"selector": "source.java" | |
} |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>QUnit Test Suite</title> | |
<link rel="stylesheet" href="//code.jquery.com/qunit/qunit-git.css"> | |
<script src="//code.jquery.com/qunit/qunit-git.js"></script> | |
<!-- Your project file goes here --> | |
<script src="myProject.js"></script> | |
<!-- Your tests file goes here --> | |
<script src="myTests.js"></script> |
This file contains 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
<snippet> | |
<content><![CDATA[ | |
/* @DEBUG_START */ | |
//console.log("$SELECTION$1"); | |
/* @DEBUG_END */ | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>@log</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<scope>source.js</scope> |
This file contains 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
$font-size-base: 16px; | |
$font-size-minor: 10px; | |
@mixin font-size($scale: 1) { | |
font-size: round( | |
($font-size-base * ((exp(1.618, $scale) - exp(-0.618, $scale)) / 2.236)) + | |
($font-size-minor * ((exp(1.618, ($scale - 1)) - exp(-0.618, ($scale - 1))) / 2.236)) | |
); | |
} |
This file contains 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
.gist-highlight { | |
border-left: 3ex solid #eee; | |
position: relative; | |
} | |
.gist-highlight pre { | |
counter-reset: linenumbers; | |
} | |
.gist-highlight pre div:before { |
This file contains 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
# BASH function to get the result | |
# of a ^ b when a, b are in the | |
# following hexadecimal string | |
# form: AF396463D8705 ... | |
# Obtained from here: | |
# http://www.codeproject.com/Tips/470308/XOR-Hex-Strings-in-Linux-Shell-Script | |
# Author is Sanjay1982 (see http://www.codeproject.com/Members/Sanjay1982) | |
# Usage: |
This file contains 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
<script> | |
function $(e) { | |
if(typeof e == 'string') e = document.getElementById(e); | |
return e | |
}; | |
function collect(a, f) { | |
var n = []; | |
for(var i = 0; i < a.length; i++) { | |
var v = f(a[i]); |
This file contains 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
# Unofficial brew formula for proxychains 4 | |
# Instruction: | |
# $ git clone git://gist.github.com/3792521.git gist-3792521 | |
# $ brew install --HEAD gist-3792521/proxychains4_formula.rb | |
# | |
# The default config file will be located in /usr/local/etc/proxychains.conf | |
# | |
require 'formula' | |
class Proxychains < Formula |
OlderNewer