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
class Wrapper { | |
constructor(value) { | |
this.value = value | |
this.dep = new Set() | |
} | |
addDep() { | |
if (activeUpdate) { | |
this.dep.add(activeUpdate) | |
} | |
} |
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
// OO - Class - Copyright TJ Holowaychuk <[email protected]> (MIT Licensed) | |
// Based on http://ejohn.org/blog/simple-javascript-inheritance/ | |
// which is based on implementations by Prototype / base2 | |
;(function(){ | |
var global = this, initialize = true | |
var referencesSuper = /xyz/.test(function(){ xyz }) ? /\b__super__\b/ : /.*/ | |
/** |
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" | |
"time" | |
) | |
type Future struct { | |
C chan struct{} | |
} |
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
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<div id="test1"> | |
<div id="text"></div> | |
<canvas id="mycanvas" width="900px" height="800px"></canvas> |
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 | |
for i in *.ogg; | |
do ffmpeg -i "$i" -f mp3 "${i%.*}.mp3"; | |
done | |
rm *.ogg; | |
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" | |
) | |
var serverMap = map[int32]string{1: "server1", 2: "server2", 3: "server3"} | |
func main() { | |
var id int32 = 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
package main | |
import ( | |
"fmt" | |
"time" | |
"log" | |
"os" | |
) | |
func main() { |
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" | |
type CB func(int, interface{}) | |
type Array []interface{} | |
func (arr *Array) forEach(callback CB) { | |
for index, item := range *arr { |
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 ( | |
"log" | |
"net/http" | |
"os" | |
) | |
type Adapter func(http.Handler) http.Handler |
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" | |
"unsafe" | |
) | |
func main() { | |
b := []byte("some momery") | |
s := string(b) |
NewerOlder