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
#!/bin/bash | |
if [ "$#" == 0 ]; then | |
browser=Google\ Chrome | |
elif [ "$#" == 1 ]; then | |
browser=$1 | |
else | |
echo "please pass me a browser name or run with no argument (default browser is 'Google\ Chrome')" | |
echo "e.g. './open_cloud_tabs.bash Safari'" | |
exit 1 | |
fi |
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
#!/bin/bash | |
if [ "$#" -ne 2 ]; then | |
echo "please pass me 2 application names" | |
echo "e.g. './copy_tabs.bash Safari Google\ Chrome'" | |
exit 1 | |
fi | |
from_browser=$1 | |
to_browser=$2 | |
osascript <<EOF | while read line; do open -a "$to_browser" $line; done | |
set urls to "" |
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
#!/bin/bash | |
osascript <<EOF | tr ', ' '\n' | while read line; do open -a Google\ Chrome $line; done | |
tell application "Safari" | |
activate | |
windows's tab's URL | |
end tell | |
EOF |
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
{ | |
"go.formatTool": "goimports", | |
"editor.formatOnSave": true, | |
"go.useLanguageServer": true, | |
"files.autoSave": "afterDelay", | |
"terminal.integrated.shell.osx": "/usr/local/bin/bash", | |
"workbench.editor.enablePreview": false, | |
"go.gotoSymbol.includeImports": true, | |
"explorer.autoReveal": false, | |
} |
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
#!/bin/bash | |
while read line; do | |
echo $line | |
go get $line | |
refsafe $line/... | |
done |
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
.PHONY: up down url | |
up: | |
(cd docker/jupyter && ./up.sh) | |
down: | |
(cd docker/jupyter && ./down.sh) | |
url: | |
(cd docker/jupyter && docker-compose exec jupyter jupyter notebook list | grep http | sed -E 's/ .*//g') |
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
from socket import * | |
import sys | |
if len(sys.argv) != 2: | |
print("Please give me port number.") | |
else: | |
try: | |
port=int(sys.argv[1]) | |
except ValueError: | |
print('Invalid port number.') |
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
Send: "\e:w\n" |
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
package main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
func check(a interface{}) bool { | |
fmt.Println(a) | |
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
v = [0]; x = [100]; a = [] | |
t = n = 0 | |
T = 5 | |
h = 1 | |
output_required_t = [] | |
while t < T: | |
a.append(-10) | |
if t % 1 == 0: |