Skip to content

Instantly share code, notes, and snippets.

@obonyojimmy
obonyojimmy / active-window.go
Created January 1, 2017 02:50
Go lang get current foreground window
package main
import (
"fmt"
"syscall"
"unsafe"
"golang.org/x/sys/windows"
)
var (
@argon
argon / apn-bench.js
Created March 30, 2015 22:31
node-apn benchmark
var apn = require('apn');
var token = "<token here>";
var service = new apn.connection({
maxConnections: 1
});
service.on("completed", function() { console.log("Completed!")});
service.on("connected", function() { console.log("Connected"); });
@elidupuis
elidupuis / handlebars-helpers.js
Last active December 7, 2021 02:24
Simple Handlebars.js helpers
/*! ******************************
Handlebars helpers
*******************************/
// debug helper
// usage: {{debug}} or {{debug someValue}}
// from: @commondream (http://thinkvitamin.com/code/handlebars-js-part-3-tips-and-tricks/)
Handlebars.registerHelper("debug", function(optionalValue) {
console.log("Current Context");
console.log("====================");