Skip to content

Instantly share code, notes, and snippets.

View petejkim's full-sized avatar
💭
I may be slow to respond.

Pete Kim petejkim

💭
I may be slow to respond.
View GitHub Profile
@petejkim
petejkim / macruby_deploy
Last active December 12, 2015 00:09 — forked from joefiorini/macruby_deploy
use product name instead of project name to find the app bundle
#!/Library/Frameworks/MacRuby.framework/Versions/0.13/usr/bin/macruby
# MacRuby Deployer.
#
# This file is covered by the Ruby license.
#
# Copyright (C) 2012, The MacRuby Team
# Copyright (C) 2009-2011, Apple Inc
require 'optparse'
require 'rbconfig'
@petejkim
petejkim / parse-installer-nitrousio.sh
Created June 4, 2013 21:51
Parse installer for Nitrous.IO boxes
#!/bin/bash
TMP_FILE=/tmp/parse.tmp
if [ -e /tmp/parse.tmp ]; then
echo "Cleaning up from previous install failure"
rm -f /tmp/parse.tmp
fi
echo "Fetching latest version ..."
curl --progress-bar https://www.parse.com/downloads/cloud_code/parse -o /tmp/parse.tmp
//
// NSObject+ProcObservation.h
// Version 1.0
//
// Andy Matuschak
// andy@andymatuschak.org
// Public domain because I love you. Let me know how you use it.
//
// NTW 2009-Oct-21: Added selectors with an options argument.
// NTW 2009-Oct-30: Transplanted new observation key from MYUtilities's KVUtils.
@petejkim
petejkim / yawl.js
Created December 17, 2013 01:04
Yawl - Yet Another Watcher Library
/*
* Yawl - Yet Another Watcher Library
* Copyright (c) 2013 Peter Jihoon Kim. This software is licensed under the MIT License.
*/
(function() {
"use strict";
var fs = require('fs');
var Path = require('path');
@petejkim
petejkim / error
Last active August 29, 2015 14:14
Proxy Error Page
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Server Not Accessible &middot; Nitrous</title>
<style type="text/css">
body {
margin: 0;
padding: 0;
background: #2a3239;

Some perspective...

$1.2 million is almost equal to an entire month's revenue.
With two small tweaks to our website could help drive this kind of money.
No extra sales guy or new pricing model required.

Information Architecture

What is Information Architecture?

Information architecture (IA) is the art and science of organizing and labelling websites, intranets, online communities and software to support usability. --Wikipedia

@petejkim
petejkim / latency.txt
Created January 31, 2017 18:05 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD

Keybase proof

I hereby claim:

  • I am petejkim on github.
  • I am petekim (https://keybase.io/petekim) on keybase.
  • I have a public key ASBTIuvfWxQTjxapDenDjsqu1xMzQZyml-zl5f1Kts9TuAo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am petejkim on github.
  • I am petejkim (https://keybase.io/petejkim) on keybase.
  • I have a public key ASDGaLk8Q2VEX3AdCG65-mbhACdLf6uE2fwva3_iaTRQNQo

To claim this, I am signing this object:

// solidityPack module in Cipher Browser
// HardFork Inc. - MPL 2.0
import {
hexToBuffer,
hexToEvenLengthHex,
isHex,
keccak256,
numberToHex,
setLengthLeft,