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
package main | |
import ( | |
"bytes" | |
"fmt" | |
"net/http" | |
"os" | |
) | |
func main() { |
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/guile -s | |
!# | |
; define square | |
(define (square x) (* x x)) | |
; define average | |
(define (average x y) | |
(/ (+ x y)2)) |
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 fib(n): | |
... if n > 3: | |
... return fib(n -1) + (fib(n-2) * 2) + (fib(n-3) * 3) | |
... else: | |
... return n | |
... | |
>>> fib(9) | |
696 |
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
package main | |
import "fmt" | |
//using iota to declare value and inc | |
const ( | |
A1 = iota //Start at 0 | |
B1 = iota //Inc by 1 | |
C1 = iota //Inc by 1 | |
) |
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
cd ~/git | |
git clone https://github.com/bungle/lua-resty-nettle.git | |
git clone https://github.com/bungle/lua-resty-random | |
git clone https://github.com/r4wm/ectoken | |
cd ~/Downloads | |
wget https://openresty.org/download/openresty-1.11.2.5.tar.gz | |
wget https://www.openssl.org/source/openssl-1.0.2n.tar.gz | |
wget https://ftp.gnu.org/gnu/nettle/nettle-3.4.tar.gz | |
#make install openssl and nettle |
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
package main | |
import ( | |
"fmt" | |
"sync" | |
) | |
var wg = sync.WaitGroup{} | |
func main() { |
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
curl 'https://httpbin.org/get' | jq '.origin' |
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/python | |
#Learn what sys.exit does in python | |
import sys | |
#This returns a LIST of the args passed | |
users_args = sys.argv[1:] | |
print "I see these args: ", users_args |
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 python | |
import os | |
import json | |
filelist = [] | |
for i in os.listdir('.'): | |
if i.endswith(".json"): | |
filelist.append(i) |
OlderNewer