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
{ | |
"strava": { | |
"client_id": "your_client_id", | |
"client_secret": "your_client_secret", | |
"access_token": "your_access_token", | |
"redirect_uri": "http://localhost:3000/auth" | |
} | |
} |
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 file-url { | |
echo "file:///home/chronos/user$(echo $([ "$1" ] && readlink -e "$1" || pwd -P) | sed "s@$HOME@@")" | |
} |
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.util.ArrayList; | |
public class ArgParse { | |
public static class Option { | |
public String flag, opt; | |
public Option(String flag) { | |
this(flag, null); | |
} |
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
/* | |
Copyright 2013 Cameron MacFarland | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
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
## ## () ## ^^ ## ## ## ## | |
## H1 C2 S1 <> S2 H2 DN ## | |
## %U <> %D *2 %L IZ .. ## | |
## ## ## .. ## DN *3 ## ## | |
## ## ## %R C1 IZ () ## ## | |
## ## ## ## >> *1 | |
## () *3 *1 %L () | |
// Set divisor and dividend |
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
<!doctype html> | |
<html> | |
<head> | |
<title>Tomato Timer</title> | |
<script src="tomato.js"></script> | |
</head> | |
<body> | |
<button id="start">Start Timer</button> | |
<button id="stop">Stop Timer</button> |
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 sys | |
def fibo(n): | |
return n if n < 2 else fibo(n-1) + fibo(n-2) | |
if __name__ == '__main__': | |
print(fibo(int(sys.argv[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 sys | |
import hashlib | |
try: | |
check = sys.argv[1] | |
except IndexError: | |
check = None | |
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
var ipv4 = /^((1?\d?\d|2([0-4]\d|5[0-5]))(\.|$)){4}$/; | |
var ipv6 = /^(([0-9a-f]{1,4})(:|$)){8}$/i; |
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
""" | |
Most of this code came from this page: | |
http://code.activestate.com/recipes/134892/#c5 | |
""" | |
import sys | |
import select | |
UP, DOWN, RIGHT, LEFT = 'A', 'B', 'C', 'D' |