Skip to content

Instantly share code, notes, and snippets.

View erichocean's full-sized avatar

Erich Ocean erichocean

  • Xy Group Ltd
  • North Carolina
View GitHub Profile
@erichocean
erichocean / C# test via PInvoke
Created June 2, 2016 07:11 — forked from buybackoff/C# test via PInvoke
LE query micro benchmark
[Test]
public void CursorShouldGetLessOrEqual() {
_db = _txn.OpenDatabase(flags: DbFlags.None);
var db2 = _txn.OpenDatabase("test_le",
DbFlags.Create | DbFlags.IntegerKey);
using (var cur = _txn.CreateCursor(db2)) {
int[] keys = new int[10000000];
@erichocean
erichocean / main.m
Created May 22, 2011 05:25 — forked from stuartcarnie/main.m
Demonstrates we can now support limited JIT compilation on recent versions of iOS (assuming Apple approves entitlements at some future point)
//
// main.m
// ProtectTest
// Demonstrates newer versions of iOS now support PROT_EXEC pages, for just-in-time compilation.
//
// Must be compiled with Thumb disabled
//
// Created by Stuart Carnie on 3/4/11.
// Copyright 2011 Manomio LLC. All rights reserved.
//

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For less, I'm using the ruby version because this is what they suggest on the website. The javascript version may be different.

Variables

@erichocean
erichocean / gist:799195
Created January 27, 2011 20:32 — forked from bxjx/gist:583836
how to create data-uris for images in node.js
var express = require('express'),
request = require('request'),
BufferList = require('bufferlist').BufferList,
sys = require('sys');
var app = express.createServer(
express.logger(),
express.bodyDecoder()
);
#!/bin/sh
#
# Deploys documentation
getGitBranchName()
{
branch="$(git symbolic-ref HEAD 2>/dev/null)" ||
"$(git describe --contains --all HEAD)"
echo ${branch##refs/heads/}
}
@erichocean
erichocean / client.js
Created January 24, 2010 08:30 — forked from felixge/client.js
node.js load testing client
var
PARALLEL_CONNECTS = 10,
http = require('http'),
sys = require('sys'),
connectionCount = 0,
messageCount = 0;
lastMessages = 0;
function addClient() {
// ==========================================================================
// myApp.MainMenuController
// ==========================================================================
require('core');
/** @class
(Document Your View Here)