Skip to content

Instantly share code, notes, and snippets.

View Starefossen's full-sized avatar
🍉
Developer experience in the Norwegain Government

Hans Kristian Flaatten Starefossen

🍉
Developer experience in the Norwegain Government
View GitHub Profile
@Starefossen
Starefossen / count-connections-from-ip.sh
Last active December 24, 2015 01:29
Count number of open connections from one IP
netstat -tap | grep 127.0.0.1 | wc -l
@Starefossen
Starefossen / virtualbox-list-usb.sh
Created October 1, 2013 19:04
List available USB devices using VirtualBox's VBoxManage CLI interface
VBoxManage list usbhost
@Starefossen
Starefossen / move-gif.sh
Created October 11, 2013 16:20
MOV to GIF
ffmpeg -ss 00:00:00.000 -i input.mov -pix_fmt rgb24 -r 10 -s 320x240 -t 00:00:10.000 output.gif
convert -layers Optimize output.gif output_optimized.gif
@Starefossen
Starefossen / gist:7214701
Created October 29, 2013 13:33
Enable garbage collection api in node application
node --expose-gc test.js
global.gc();
netstat -tulpn
@Starefossen
Starefossen / server.coffee
Last active June 22, 2020 20:26
Stream MongoDB documents from Node.JS server
"use strict"
http = require 'http'
MongoClient = require('mongodb').MongoClient
stringify = require('JSONStream').stringify
db = null
server = http.createServer (req, res) ->
cursor = db.collection('turer').find()
curl -s -D - www.example.com -o /dev/null
@Starefossen
Starefossen / gist:8138222
Last active January 1, 2016 11:29
Checksum http body
curl -s www.example.com | md5
  • Vagrant
  • VirtualBox
  • Xcode Command Line Tools (git and c compiler)
  • Tmux
  • Vim modules

This is a test comment

  • foo

  • bar

    alert 'bar' # this is not syntax highligheted

Some other comment

alert 'bar' # this is