Skip to content

Instantly share code, notes, and snippets.

View janbaer's full-sized avatar
🏠
Working from home

Jan Baer janbaer

🏠
Working from home
View GitHub Profile

Angular2 + JSPM cheat sheet

First time setup

  • install jspm beta: npm install -g jspm@beta
  • set up your project: jspm init
  • install dependencies: jspm install angular2 reflect-metadata zone.js es6-shim

This will create a jspm_packages folder, and a config.js file.

Open the config.js file - this file manages options for the System.js loader - tweak it as appropriate

@alejandro
alejandro / clone.js
Created December 2, 2011 05:33
Clone all your gists
#!/usr/bin/env node
var request = require("request");
var exec = require("child_process").exec;
if (process.argv.length < 3) {
console.log("Ocupo un usuario");
}
var username = process.argv[2];
@learningjs
learningjs / config
Created December 13, 2015 01:46
i3wm config
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
@jensens
jensens / .Xresources
Last active March 1, 2021 09:53
config
i3-wm.bar.trayoutput: eDP-1
i3-wm.gaps.focus_follows_mouse: yes
i3-wm.program.files: /usr/bin/nemo
i3-wm.workspace.01.name: 1:<span font_desc='JetBrains Mono Medium 10'> 1 terminal </span>
i3-wm.workspace.02.name: 2:<span font_desc='JetBrains Mono Medium 10'> 2 web </span>
i3-wm.workspace.03.name: 3:<span font_desc='JetBrains Mono Medium 10'> 3 dev </span>
i3-wm.workspace.04.name: 4:<span font_desc='JetBrains Mono Medium 10'> 4 mail </span>
i3-wm.workspace.05.name: 5:<span font_desc='JetBrains Mono Medium 10'> 5 chat </span>
@davecheney
davecheney / go1.0-vs-go1.11.txt
Created October 7, 2018 11:13
test/bench/go1 benchmark results
name old time/op new time/op delta
BinaryTree17 5.44s ± 2% 3.27s ± 2% -39.90% (p=0.000 n=20+19)
Fannkuch11 4.95s ± 2% 2.68s ± 2% -45.87% (p=0.000 n=20+20)
FmtFprintfEmpty 142ns ± 2% 49ns ± 3% -65.39% (p=0.000 n=20+18)
FmtFprintfFloat 765ns ± 2% 260ns ± 2% -66.02% (p=0.000 n=20+20)
FmtFprintfInt 341ns ± 2% 95ns ± 2% -72.08% (p=0.000 n=19+20)
FmtFprintfIntInt 554ns ± 2% 150ns ± 1% -72.95% (p=0.000 n=20+19)
FmtFprintfPrefixedInt 497ns ± 3% 178ns ± 3% -64.12% (p=0.000 n=20+20)
FmtFprintfString 466ns ± 2% 86ns ± 3% -81.54% (p=0.000 n=20+20)
FmtManyArgs 2.23µs ± 2% 0.59µs ± 1% -73.46% (p=0.000 n=20+17)
@a-r-g-v
a-r-g-v / nsqd.service
Created February 21, 2016 23:59
nsqd, nsqdlookupd systemd service files
[Unit]
Description=NSQD
After=network.target
[Service]
WorkingDirectory=/usr/local/nsq
ExecStart=/usr/local/nsq/bin/nsqd -http-address 127.0.0.1:4151 -tcp-address 127.0.0.1:4150 -lookupd-tcp-address 127.0.0.1:4160
ExecReload=/bin/kill -HUP $MAINPID
Type=simple
KillMode=process
@alefteris
alefteris / .eslintrc
Created May 9, 2015 17:01
ESLint default config in YAML format
---
parser: espree
env:
amd: false
browser: false
es6: false
jasmine: false
jquery: false
meteor: false
mocha: false
@lmullen
lmullen / Makefile
Last active February 25, 2023 21:14
PDF slides and handouts using Pandoc and Beamer
SLIDES := $(patsubst %.md,%.md.slides.pdf,$(wildcard *.md))
HANDOUTS := $(patsubst %.md,%.md.handout.pdf,$(wildcard *.md))
all : $(SLIDES) $(HANDOUTS)
%.md.slides.pdf : %.md
pandoc $^ -t beamer --slide-level 2 -o $@
%.md.handout.pdf : %.md
pandoc $^ -t beamer --slide-level 2 -V handout -o $@
@reiki4040
reiki4040 / signal.go
Created October 2, 2014 14:38
signal handling example for golang
package main
import (
"fmt"
"os"
"os/signal"
"syscall"
)
func main() {