The FAQ maintained by Github covers most stumbling blocks, some other tips and tricks supplied here.
Add _site
to .gitignore
. The generated site should not be uploaded to Github since its gets generated by github.
package main | |
import ( | |
"bytes" | |
"exec" | |
"log" | |
"os" | |
) | |
// Pipeline strings together the given exec.Cmd commands in a similar fashion |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
The FAQ maintained by Github covers most stumbling blocks, some other tips and tricks supplied here.
Add _site
to .gitignore
. The generated site should not be uploaded to Github since its gets generated by github.
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
// author: Pawel Kozlowski | |
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" |
更新: | 2014-04-14 |
---|---|
バージョン: | 0.1.1 |
作者: | @voluntas |
URL: | http://voluntas.github.io/ |
Erlang の mock/stub ライブラリである meck の使い方をまとめました
// Detecting data URLs | |
// data URI - MDN https://developer.mozilla.org/en-US/docs/data_URIs | |
// The "data" URL scheme: http://tools.ietf.org/html/rfc2397 | |
// Valid URL Characters: http://tools.ietf.org/html/rfc2396#section2 | |
function isDataURL(s) { | |
return !!s.match(isDataURL.regex); | |
} | |
isDataURL.regex = /^\s*data:([a-z]+\/[a-z]+(;[a-z\-]+\=[a-z\-]+)?)?(;base64)?,[a-z0-9\!\$\&\'\,\(\)\*\+\,\;\=\-\.\_\~\:\@\/\?\%\s]*\s*$/i; |
; /usr/local/bin/nasm -f macho 32.asm && ld -macosx_version_min 10.7.0 -o 32 32.o && ./32 | |
global start | |
section .text | |
start: | |
push dword msg.len | |
push dword msg | |
push dword 1 | |
mov eax, 4 |
... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
Javaを書いていると単純な処理はずなのにやたらめったら,長いコードになることがある気がするので, Java8で導入されたFunctionalでイカれたメンバーを紹介するぜ!
#![allow(unstable)] | |
use std::os; | |
use std::io; | |
use std::io::stdio; | |
use std::result; | |
use std::str::StrExt; | |
struct Record { | |
filename: String, |