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
#!/bin/bash | |
db_set() { | |
echo "$1, $2" >> database.st | |
} | |
db_get () { | |
grep "^$1," database.st | sed -e "s/^$1,//" | tail -n 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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"os" | |
"time" |
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 cryptogcd | |
//GCD Greatest Common Divisor (Factor) | |
func GCD(a, b int) int { | |
var Remainder int | |
for { | |
Remainder = a % b | |
a = b | |
b = Remainder | |
if b == 0 { |
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 singleton | |
import ( | |
"fmt" | |
"sync" | |
) | |
//singleton variables | |
type singleton map[string]interface{} |
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 ( | |
"patternsample/mq" | |
"fmt" | |
"time" | |
) | |
func main() { |