Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@nevir
nevir / license_generator.js
Last active August 31, 2018 00:25 — forked from davidtsai/license_generator.js
Generate a csv of package dependency licenses for due dilligence
const fs = require('fs');
const path = require('path');
// https://github.com/shinnn/spdx-license-ids/blob/master/index.json
const spdx = [
'0BSD',
'AAL',
'Abstyles',
'Adobe-2006',
'Adobe-Glyph',
{
"resourceGeneration": {
"minAreaRockRatio": 0.05,
"maxAreaSize": 8,
"startThreshold": 20,
"endThreshold": 5,
"injectAttempts": 30,
"favourite": 1.5,
"secondFavourite": 1.2,
"minFailInjectCount": 4,
@nevir
nevir / gist:5229850
Last active December 15, 2015 08:19
package main
import (
"fmt"
"runtime"
"time"
)
var NUM_THINGS = 100000
var NUM_RUNS = 5
@nevir
nevir / gist:5226483
Last active December 15, 2015 07:49
package main
import (
"encoding/json"
"fmt"
"go/build"
"os"
"path/filepath"
"strings"
)
@nevir
nevir / gist:5226063
Created March 23, 2013 01:55
The fishes elude me!
Mar 22 18:54:54 NevPhone kernel[0] <Debug>: launchd[148] Builtin profile: container (sandbox)
Mar 22 18:54:54 NevPhone kernel[0] <Debug>: launchd[148] Container: /private/var/mobile/Applications/4F9984E4-64FB-432E-A9DF-BEF08A8A603B (sandbox)
Mar 22 18:54:54 NevPhone Ridiculous Fishing[148] <Warning>: Creating OpenGL ES2 Renderer
Mar 22 18:54:54 NevPhone Ridiculous Fishing[148] <Warning>: Failed to load vertex shader
Mar 22 18:54:54 NevPhone Ridiculous Fishing[148] <Warning>: Failed to compile vertex shader
Mar 22 18:54:54 NevPhone Ridiculous Fishing[148] <Warning>: OpenGL ES2 failed
Mar 22 18:54:54 NevPhone Ridiculous Fishing[148] <Warning>: Creating OpenGL ES1 Renderer
Mar 22 18:54:56 NevPhone Ridiculous Fishing[148] <Warning>: Could not load the "iPhone_PhoneMockupDev3.png" image referenced from a nib in the bundle with identifier "com.vlambeer.ridfishing"
Mar 22 18:54:59 NevPhone backboardd[26] <Warning>: BKSendGSEvent ERROR sending event type 23: (ipc/send) timed out (0x10000004)
Mar 22
@nevir
nevir / README.md
Last active December 15, 2015 01:49
README-driven project metadata

Package Name (1.2.3)

Short package description; useful for quick one-liners when displaying information about it on various sites/contexts.

Normal Readme Stuff

Blah, blah blah. The order of readme sections doesn't matter: organize it however you like.

call /Users/ian/coding/rb-documentation/lib/documentation/markdown/base.rb:23 headers_seen Documentation::Markdown::Base
line /Users/ian/coding/rb-documentation/lib/documentation/markdown/base.rb:24 headers_seen Documentation::Markdown::Base
return /Users/ian/coding/rb-documentation/lib/documentation/markdown/base.rb:25 headers_seen Documentation::Markdown::Base
line /Users/ian/coding/rb-documentation/lib/documentation/markdown/base.rb:130 slug_for_header_text Documentation::Markdown::Base
c-call /Users/ian/coding/rb-documentation/lib/documentation/markdown/base.rb:130 to_s Fixnum
c-return /Users/ian/coding/rb-documentation/lib/documentation/markdown/base.rb:130 to_s Fixnum
call /Users/ian/coding/rb-documentation/lib/documentation/markdown/base.rb:23 headers_seen Documentation::Markdown::Base
line /Users/ian/coding/rb-documentation/lib/documentation/markdown/base.rb:24 headers_seen Documentation::Markdown::Base
return /Users/ian/coding/rb-documentation/lib/documentati
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>themes</key>
<dict>
<key>alfred.theme.custom.4EE6F090-9496-434A-9E0E-160C703A164B</key>
<dict>
<key>background</key>
<data>
@nevir
nevir / to_a.rb
Last active December 11, 2015 01:19
Rehearsal -------------------------------------------------------------
Small (Enumerable): 0.390000 0.020000 0.410000 ( 0.419549)
Small (WithEnumerator): 0.400000 0.020000 0.420000 ( 0.413934)
Small (Custom): 0.720000 0.020000 0.740000 ( 0.737232)
Medium (Enumerable): 1.840000 0.100000 1.940000 ( 1.943128)
Medium (WithEnumerator): 1.850000 0.100000 1.950000 ( 1.955634)
Medium (Custom): 3.480000 0.120000 3.600000 ( 3.582538)
Large (Enumerable): 9.100000 1.120000 10.220000 ( 10.227774)
Large (WithEnumerator): 9.070000 1.080000 10.150000 ( 10.139284)
Large (Custom): 17.600000 1.200000 18.800000 ( 18.794277)
@nevir
nevir / gist:4390714
Created December 27, 2012 18:34
Array#fetch...
irb(main):001:0> a = [11, 22, 33, 44]
=> [11, 22, 33, 44]
irb(main):002:0> a.fetch(0) { |i| i }
=> 11
irb(main):003:0> a.fetch(1) { |i| i }
=> 22
irb(main):004:0> a.fetch(2) { |i| i }
=> 33
irb(main):005:0> a.fetch(3) { |i| i }
=> 44