A message is always sent as a JSON object. The following keys are allowed and denote different types of messages.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 bash_env --description 'Imports named variables from a bash script' | |
# Usage: | |
# bash_env script.bash VAR1 VAR2 VARN | |
# | |
set -l script $argv[1] | |
while read i; set code "$code""$i"\n; end < $script | |
set -l variables | |
for arg in $argv[2..-1] | |
set variables $variables "echo \"set -g $arg \${$arg}\""\n | |
end |
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 threading, Queue | |
Thread = threading.Thread | |
Empty = Queue.Empty | |
Queue = Queue.Queue | |
class Stop(Exception): | |
pass | |
class Actor(object): | |
def __init__(self): |
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 multiprocessing | |
import threading | |
import time | |
def f(i): | |
try: | |
print "starting f(%i)..." % i | |
time.sleep(i * 3 + 1) | |
print "stopping f(%i)..." % i |
NewerOlder