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
### Keybase proof | |
I hereby claim: | |
* I am lencioni on github. | |
* I am lencioni (https://keybase.io/lencioni) on keybase. | |
* I have a public key whose fingerprint is 0B1E 0470 9438 4097 8757 FD32 F1AB FB88 45AB 1D10 | |
To claim this, I am signing this object: |
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
# Converts global chained `var`s into single-line vars. | |
# | |
# Example: | |
# | |
# >> cat app/assets/javascripts/test.js | |
# var A = require('a'), | |
# B = require('b'), | |
# C = B.C; | |
# | |
# var D = function() {}; |
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 cl "console.log(...)" b | |
console.log($0); | |
endsnippet |
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 fun "function with dynamic docblock" b | |
`!p | |
# Currently Ultisnips does not support dynamic tabstops, so we cannot add | |
# tabstops to the datatype for these param tags until that feature is added. | |
def formatTag(argument): | |
return " * @param {{}} {0}".format(argument) | |
arguments = t[2].split(',') | |
arguments = [argument.strip() for argument in arguments if argument] |
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 re "require" b | |
var `!p | |
def formatVariableName(path): | |
lastPart = path.split('/')[-1] | |
if lastPart == 'underscore': | |
return '_' | |
elif lastPart == 'jquery': | |
return '$' | |
else: | |
return re.sub(r'[_\-]', '', lastPart.title()) |
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
1.Tap Settings > Mobile Networks | |
(or Mobile Data) > Access Point Names > New APN (may have to tap | |
Menu button to see this option). | |
2.Enter the following APN info: | |
Name: Internet | |
APN: ndo | |
Proxy: Not Set | |
Port: Not Set | |
Username: Not Set | |
Password: Not Set |
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 custom Jasmine reporter that logs slow specs. | |
const warnThresholdMs = 300; | |
const slowSpecsToPrint = 10; | |
function now() { | |
return (new Date()).getTime(); | |
} | |
const slowReporter = { |
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
require 'sass' | |
class MyVisitor < Sass::Tree::Visitors::Base | |
def visit_variable(node) | |
@environment ||= Sass::Environment.new | |
@environment.set_local_var(node.name, node.expr) | |
puts node.expr.perform(@environment) | |
end | |
end |
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
#!/bin/bash | |
echo '"days ago","tests"' > testCounts.csv | |
for i in $(seq 1 365); | |
do | |
git checkout "$(git rev-list -n 1 --before="$i days ago" origin/master)" | |
matches=$(\ | |
find spec/javascripts -name "*.js" -o -name "*.jsx" | \ |
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 cc "createClass" b | |
var ${1:`!p snip.rv = ''.join(x.title() for x in re.sub('\.js$', '', snip.basename or 'ModuleName').split('_'))`} = React.createClass({ | |
/** | |
* @return {Object} | |
*/ | |
render: function() { | |
return ( | |
$0 | |
); | |
} |
OlderNewer