Skip to content

Instantly share code, notes, and snippets.

View lukaszkorecki's full-sized avatar
🌴
🛹

Łukasz Korecki lukaszkorecki

🌴
🛹
View GitHub Profile
define(function(require){
var App = {};
App.SomeView = require('some/view/view');
})
base = { op: 1 }
settings1 = _.extend(base, { op2 : 2 });
settings2 = _.extend(base, { op2 : 3 });
''.split(',') # => ['']
"".split(',') # => []
package main
import (
"fmt"
"strings"
)
func main() {
r := strings.Split("", ",")
fmt.Printf("%T\n%T\n", r, r[0])
@lukaszkorecki
lukaszkorecki / keyboards.md
Last active August 29, 2015 14:17
Keyboards for sale

HELLO

I'm seeling 2 out of my 3 mechanical keyboards. Email me at lukasz 🐹 korecki.me if you're interested. I'm based in London, UK so picking up in person is prefered but I'm sure we can work something out.

Noppo Choc Mini SOLD

# from https://github.com/etsy/statsd/issues/100#issuecomment-6355430
exec 3<> /dev/udp/statsd_ip_address/8125
# send data:
echo "whatever|whatever" >&3
# close udp socket:
exec 3<&-
exec 3>&-
ha = {
a: 1,
b: 2,
c: 3
}
# With default.
s = [:a, :d, :c].map { |k| { k => ha.fetch(k, -1) } }.reduce(&:merge!)
puts ha
readonly user=wu
readonly name=tang
cat > /home/$user/.conf <<-EOF
[init]
name=$name
EOF
@lukaszkorecki
lukaszkorecki / ed.sh
Created February 11, 2015 14:59
editor 1
cat > mayfile.txt <<-EOF
Wu-Tang Clan Ain’t Nothing to
EOF