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
# http://amoffat.github.io/sh/ | |
import sh | |
sh.diff('file-1.txt', 'file-2.txt', unified=3, _out='diff.patch', _ok_code=1) |
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 os | |
import base64 | |
import requests | |
URL = 'https://logs.timber.io/frames' | |
TOKEN = base64.urlsafe_b64encode(os.environ.get('TIMBER_API_KEY').encode('utf-8')).decode('utf-8') | |
HEADERS = { | |
'Content-Type': 'text/plain', | |
'Cache-Control': 'no-cache', | |
'Authorization': 'Basic {}'.format(TOKEN) |
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
def reply(request): | |
""" | |
Reply to a text message with nutrition facts (edited snippet) | |
""" | |
args = {} | |
if request.method == 'POST': | |
# Get the text message | |
text = request.POST.get('text') |
We can't make this file beautiful and searchable because it's too large.
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
member_name,member_group,1108,1107,1106,1105,1104,1103,1102,1101,1100,1099,1098,1097,1096,1095,1094,1093,1092,1091,1090,1089,1088,1087,1086,1085,1084,1083,1082,1081,1080,1079,1078,1077,1076,1075,1074,1073,1072,1071,1070,1069,1068,1067,1066,1065,1064,1063,1062,1061,1060,1059,1058,1057,1056,1055,1054,1053,1052,1051,1050,1049,1048,1047,1046,1045,1044,1043,1042,1041,1040,1039,1038,1037,1036,1035,1034,1033,1032,1031,1030,1029,1028,1027,1026,1025,1024,1023,1022,1021,1020,1019,1018,1017,1016,1015,1014,1013,1012,1011,1010,1009,1008,1007,1006,1005,1004,1003,1002,1001,1000,999,998,997,996,995,994,993,992,991,990,989,988,987,986,985,984,983,982,981,980,979,978,977,976,975,974,973,972,971,970,969,968,967,966,965,964,963,962,961,960,959,958,957,956,955,954,953,952,951,950,949,948,947,946,945,944,943,942,941,940,939,938,937,936,935,934,933,932,931,930,929,928,927,926,925,924,923,922,921,920,919,918,917,916,915,914,913,912,911,910,909,908,907,906,905,904,903,902,901,900,899,898,897,896,895,894,893,892,891,890,889,888,887,88 |
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
contains(burger) = True GAIN : LOSS = 5.5 : 1.0 | |
contains(cucumber) = True LOSS : GAIN = 5.1 : 1.0 | |
contains(peppers) = True LOSS : GAIN = 5.1 : 1.0 | |
contains(Heineken) = True GAIN : LOSS = 4.8 : 1.0 | |
contains(wasabi) = True LOSS : GAIN = 3.9 : 1.0 | |
contains(Popsicles) = True LOSS : GAIN = 3.9 : 1.0 | |
contains(Blonde) = True LOSS : GAIN = 3.9 : 1.0 | |
contains(no) = True LOSS : GAIN = 3.8 : 1.0 | |
contains(Merlot) = True LOSS : GAIN = 3.3 : 1.0 | |
contains(fish) = True LOSS : GAIN = 3.3 : 1.0 |
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
$ heroku fork -a app app-staging | |
$ heroku info -a app-staging | |
Git URL: https://git.heroku.com/app-staging.git | |
$ git remote add staging [email protected]:app-staging.git | |
$ git remote -v | |
$ git push staging |
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
/*global window, jQuery */ | |
( function( $, window, undefined ) { | |
/** | |
* --------------------------------- VARS --------------------------------- | |
*/ | |
var module, | |
DEFAULTS = { |
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
1. "pea" +1.716lb | |
2. "onion" +1.681lb | |
3. "grape" +0.685lb | |
4. "tomato" +0.372lb | |
5. "champagne" +0.104lb | |
6. "arugula" +0.093lb | |
7. "chicken" +0.092lb | |
8. "ricotta" +0.089lb | |
9. "cannoli" +0.086lb | |
10. "pancetta" +0.074lb |
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
\list # lists all databases | |
create database database_name; # create a database | |
DROP DATABASE database_name; # drop database | |
\c db_name # connect to a certain database | |
\dt # lists all tables in the current database | |
\d table_name # view table | |
DROP TABLE table_name; # drop table | |
\q # exit |
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/python | |
import sys | |
def main(argv): | |
print("main") | |
if __name__ == "__main__": | |
main(sys.argv[1:]) |