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
function f(){ | |
console.log(this) | |
} | |
// window scope | |
f() | |
// object scope | |
var o = { | |
'f':f |
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" | |
"encoding/csv" | |
"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
package main | |
import ( | |
"fmt" | |
"io" | |
"os" | |
"time" | |
"path/filepath" | |
"github.com/garyburd/redigo/redis" | |
) |
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" | |
"os" | |
"bytes" | |
"errors" | |
"sync" | |
"path/filepath" | |
"strconv" |
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
Shell 1 // this will create a named pipe @ /tmp/gfifo and read from the pipe 4eva | |
> ./gopipe | |
2014/03/12 20:53:35 Created Pipe | |
Shell 2 | |
> echo "ASD" > /tmp/gfifo | |
Shell 1 // prints bytes | |
> [65 83 68] |
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" | |
"reflect" | |
) | |
type Foo struct { | |
FirstName string `tag_name:"tag 1"` | |
LastName string `tag_name:"tag 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
package main | |
import "fmt" | |
import "encoding/json" | |
type My struct { | |
Name string | |
} |
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
{%for item in items%} | |
{% if forloop.first or forloop.counter0|divisibleby:3 %} | |
<div class = "row"> | |
{%endif%} | |
{# We need to add a new Bootstrap row every after every third item item#} | |
<div class = "span4"> | |
<h3><a href ="">{{title}}</a></h3> | |
<span>Posted on {{created_on}} </span> | |
</div> |
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
""" | |
Summary Level Definitions | |
Defined as: | |
SUMLEV: (Geographies, Hierarchy(when avail)) | |
""" | |
SUMLEV = { | |
'010':('United States', 'United States'), | |
'020':('Region'), | |
'030':('Division'), | |
'040':('State','State'), |
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
// a simple addition function | |
function add_these(num1, num2){ | |
$result = $num1 + $num2; | |
return $result; | |
} |
OlderNewer