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
def shell_escape(s, quote_empty=True): | |
if quote_empty and s == '': | |
return "''" | |
squot = False | |
dquot = False | |
dquot_special = False | |
special = False | |
escaped = [] | |
for c in s: | |
if c == "'": |
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
#!/usr/bin/env sed -n -f | |
### Collapse third-party errors to | |
### at com.thirdparty.theirPackage first error text | |
### ... | |
### at com.thirdparty.theirPackage last error text | |
{ | |
:loop | |
/\t*at com\.evernote/ b print |
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
#!/usr/bin/env node | |
/* | |
Requirements: | |
node v7.6.0 | |
node-getopt | |
haikunator | |
*/ | |
const path = require('path'); |
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
#!/usr/bin/env node | |
/* | |
Requirements: | |
node v7.6.0 | |
node-getopt | |
*/ | |
const path = require('path'); | |
const Promise = require('bluebird'); |
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 | |
# Converts .tsv files with cols [ intl?, from, to ] into JSONs. | |
# | |
# Usage: | |
# 1. Go to our list of redirects at https://docs.google.com/spreadsheets/d/1u4hQyNn86R1xzh8G30e14rSbvQs9S6CtsIgmz0NNIKk/edit#gid=549054781 | |
# 2. Download each sheet as a .tsv. | |
# 3. path/to/json-redirects.sh ~/Downloads/*.tsv > path/to/marketing-dev/redirects.json | |
# | |
# In the results jsons, the keys are the "from" addresses, and the values the | |
# "to" addresses. "To" addresses on the marketing web site are rewritten to be |
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> | |
<meta charset="utf-8"/> | |
<title>For loop benchmark</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
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>Test</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.js"></script> | |
</head> | |
<body> | |
<div class="main"> | |
hello | |
</div> |
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
<html> | |
<body> | |
<h1>Hello</h1> | |
<button type="button" onClick="location.href = location.href;">Refresh</button> | |
</html> |
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
{ | |
"color_scheme": "Packages/Color Scheme - Default/Blackboard.tmTheme", | |
"folder_exclude_patterns": | |
[ | |
".svn", | |
".git", | |
".hg", | |
"CVS", | |
"node_modules", | |
".cache", |
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
# Install homebrew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew update | |
brew install ruby | |
# Install rvm | |
\curl -sSL https://get.rvm.io | bash -s stable --ruby | |
rvm install 2.4 |
NewerOlder