Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am jakschu on github.
* I am jakschu (https://keybase.io/jakschu) on keybase.
* I have a public key whose fingerprint is CD1A 574F D607 39C2 D903 79AB 2E6E 5D7C CF0B 4208
To claim this, I am signing this object:
@jakschu
jakschu / main.go
Last active August 29, 2015 14:27 — forked from TheHippo/main.go
Benchmarking Go Mutex overhead
package main
import (
"fmt"
"sync"
)
type unlocked struct {
i int
}
func byteMachine(l int) []byte {
var byte1024 = []byte{230, 225, 70, 140, 19, 33, 53, 107, 97, 54, 151, 254, 181, 73, 233, 11, 1, 44, 248, 104, 2, 250, 200, 23, 150, 25, 61, 217, 213, 205, 75, 220, 24, 129, 231, 70, 123, 47, 224, 41, 98, 227, 147, 10, 204, 223, 11, 107, 19, 102, 96, 104, 90, 131, 35, 253, 202, 234, 7, 152, 53, 227, 215, 95, 4, 89, 209, 62, 190, 33, 141, 244, 172, 150, 150, 183, 31, 22, 109, 187, 222, 29, 84, 22, 129, 137, 236, 75, 209, 125, 87, 148, 122, 129, 231, 5, 2, 88, 32, 161, 83, 129, 71, 247, 118, 150, 52, 203, 233, 71, 70, 170, 241, 16, 201, 86, 118, 53, 216, 15, 114, 180, 41, 35, 2, 113, 135, 104, 230, 213, 72, 115, 122, 70, 213, 129, 212, 67, 104, 231, 30, 44, 196, 241, 69, 244, 52, 48, 21, 99, 105, 221, 79, 103, 52, 115, 203, 100, 4, 18, 240, 6, 49, 216, 244, 184, 217, 115, 116, 245, 254, 91, 222, 201, 177, 151, 6, 56, 156, 157, 65, 139, 18, 106, 104, 200, 240, 144, 70, 37, 158, 52, 128, 239, 215, 118, 212, 175, 203, 59, 179, 213, 141, 159, 234, 177, 67, 54, 234, 237, 92, 17, 66,
<table>
<thead>
<tr>
<th scope="col">Name</th>
<th scope="col">Email</th>
<th scope="col">Dept, Title</th>
<th scope="col">Phone</th>
</tr>
</thead>
<tbody>
@jakschu
jakschu / index.html
Created February 20, 2013 19:21
A CodePen by Joey Hoer. SVG Semi-Conical Gradient - SVG semi-conical gradient in CSS with SCSS
<div>
<h1>L<span>o</span>ading</h1>
@jakschu
jakschu / index.html
Created February 21, 2013 05:36
A CodePen by jakschu.
<h1><a href="http://blokkfont.com/" target="_blank">BLOKK font &rarr;</a></h1>
<section class="main-content" role="main">
<article>
<h2>Dogs and Cats, Living Together</h1>
<p>Yep vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
@jakschu
jakschu / e_stack.js
Created February 22, 2013 18:06
error.stack
function a() {
document.write("inside a.\n");
return d;
}
try {
a();
} catch (e) {
document.write("<p>" + e.stack + "</p>");
// or console.log(e.stack);
}
if(Meteor.isServer){
Meteor.methods({
myMeteorMethod: function() {
// load Future
Future = Npm.require('fibers/future');
var myFuture = new Future();
// call the function and store its result
SomeAsynchronousFunction("foo", function (error,results){
if(Meteor.isClient){
// set Session variable in method callback
Meteor.call('myMeteorMethod', "foo", function(error, result){
Session.set('myMethodResult', result);
});
// use reactive Session variable in helper
Template.myTemplate.helpers({
myHelper: function(){
(function() {
var hidden = "hidden";
// Standards:
if (hidden in document)
document.addEventListener("visibilitychange", onchange);
else if ((hidden = "mozHidden") in document)
document.addEventListener("mozvisibilitychange", onchange);
else if ((hidden = "webkitHidden") in document)
document.addEventListener("webkitvisibilitychange", onchange);