Skip to content

Instantly share code, notes, and snippets.

View lambder's full-sized avatar

Lambder lambder

View GitHub Profile
@lambder
lambder / latency.txt
Created January 31, 2017 17:08 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
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
@lambder
lambder / README.md
Created January 30, 2017 17:03 — forked from cs8425/README.md
How to REAL install Remix OS on VirtualBox

How to REAL install Remix OS on VirtualBox

This is how to REAL install Remix OS on VirtualBox. rootfs could be writable!!!

Needs:

  • any linux liveCD iso file (Xubuntu here)
  • Remix OS iso file ("Remix_OS_for_PC_Android_M_32bit_B2016092201.iso" here)
  • VirtualBox
@lambder
lambder / auxpattern.scala
Created December 30, 2016 17:57 — forked from gigiigig/auxpattern.scala
Aux Pattern
import shapeless._
import scalaz._
import Scalaz._
object console extends App {
trait Foo[A] {
type B
def value: B
@lambder
lambder / property-based-testing-tools.md
Created October 29, 2016 08:35 — forked from npryce/property-based-testing-tools.md
Property-Based Testing Tools

If you're coming to the Property-Based TDD As If You Meant It Workshop, you will need to bring a laptop with your favourite programming environment, a property-based testing library and, depending on the language, a test framework to run the property-based-tests.

Any other languages or suggestions? Comment below.

.NET (C#, F#, VB)

Python:

@lambder
lambder / angularjs_directive_attribute_explanation.md
Created August 16, 2016 09:48 — forked from CMCDragonkai/angularjs_directive_attribute_explanation.md
JS: AngularJS Directive Attribute Binding Explanation

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>
@lambder
lambder / Counter.elm
Created May 18, 2016 16:34 — forked from pdamoc/Counter.elm
Widget Union
module Counter exposing (..)
import Html exposing (..)
import Html.Attributes exposing (style)
import Html.Events exposing (onClick)
-- MODEL
type alias Model = Int
@lambder
lambder / README.md
Created April 15, 2016 10:17 — forked from magnetikonline/README.md
IE 7/8/9/10/11 Virtual machines from Microsoft - Linux w/VirtualBox installation notes.
@lambder
lambder / externs_for_cljs.clj
Created April 6, 2016 15:23 — forked from Chouser/externs_for_cljs.clj
Generate an externs.js file for arbitrary JS libraries for use in advanced Google Closure compilation, based on the ClojureScript code that uses the libraries.
(ns n01se.externs-for-cljs
(:require [clojure.java.io :as io]
[cljs.compiler :as comp]
[cljs.analyzer :as ana]))
(defn read-file [file]
(let [eof (Object.)]
(with-open [stream (clojure.lang.LineNumberingPushbackReader. (io/reader file))]
(vec (take-while #(not= % eof)
(repeatedly #(read stream false eof)))))))
@lambder
lambder / ocr.markdown
Created February 8, 2016 17:23 — forked from henrik/ocr.markdown
OCR on OS X with tesseract

Install ImageMagick for image conversion:

brew install imagemagick

Install tesseract for OCR:

brew install tesseract --all-languages

Or install without --all-languages and install them manually as needed.