Skip to content

Instantly share code, notes, and snippets.

View kuno's full-sized avatar

kuno kuno

View GitHub Profile
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"fmt"
"math/rand"
)
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"fmt"
"math/rand"
)
@kuno
kuno / pi.diff
Created March 29, 2013 14:49 — forked from davecheney/pi.diff
diff -r d2213960ade2 src/cmd/5l/asm.c
--- a/src/cmd/5l/asm.c Sat Jul 14 15:59:52 2012 +0400
+++ b/src/cmd/5l/asm.c Sun Jul 15 19:45:39 2012 +1000
@@ -33,6 +33,7 @@
#include "l.h"
#include "../ld/lib.h"
#include "../ld/elf.h"
+#include "../ld/dwarf.h"
static Prog *PP;
@kuno
kuno / es.sh
Created March 20, 2013 06:14 — forked from sgringwe/es.sh
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
# Download the compiled elasticsearch rather than the source.
wget http://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.5.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
sudo mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share
@kuno
kuno / _config.yml
Created March 18, 2013 06:39
staging yaml
exclude:
- .gitignore
- README.md
auto: true
server: true
permalink: none
title: teamchat.io
copyright: 'Copyright © 2013 <a href="http://devo.ps" target="_blank">devo.ps</a>'
url: http://192.168.1.178.xip.io:4000
@kuno
kuno / id_rsa.pub
Created January 17, 2013 07:43
pub key for wiredcraft ci server
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCwlQlnoapqvGAUXtZb6LqjUstAy3sQsId17+c+Spz1lfLlXVFrUmUrjy4mmDpvsalKKP2lwYzoMlLUzWart+Tmp7s7yBlXnG1k5ZW+bebKsV8twMHvz85o9Q5NNm07EPDZ7wzFwjgVAtiQAWqNG85ngBZZzz98BihV2aQPJ6nqjaM4XTvkOuK9W1ULbggfSsZsT4/p3Wvd/AIpmOtn7SI/N2h26JAyHKB2tty33HBG8Vsym83rCcgCB3ryOH+shDE5JbgMil1MDesgxz3aIB4LWXE8aTCe9EUk9GhJkv0vd65cctdWN8gPIvWTzk70Bp7JcZIkNm5FgPVxtcIUo5Hf wiredcraft@ci.balou.local
@kuno
kuno / promise.js
Last active December 10, 2015 18:18
p.then(function() {
var deferred = Q.defer();
org.updateInfo(doc._id, {}, deferred.makeNodeResolver());
return deferred.promise;
}).then(function(doc) {
res.json(doc);
}).fail(function(err) {
msg.result = false;
msg.code = 500;
@kuno
kuno / memory_leak.txt
Last active December 10, 2015 01:19
Memory leak report about GeoIP(https://github.com/kuno/GeoIP), by running 'valgrind --leak-check=full -v test/memory_leak.js', at commit https://github.com/kuno/GeoIP/commit/f96582669d53dd1f54baeba1ada217b2bccb77fe Update at: 2013/05/01
==8214== Memcheck, a memory error detector
==8214== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==8214== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==8214== Command: test/memory_leak.js
==8214==
--8214-- Valgrind options:
--8214-- --suppressions=/usr/lib/valgrind/debian-libc6-dbg.supp
--8214-- --leak-check=full
--8214-- -v
--8214-- Contents of /proc/version:
@kuno
kuno / compare.text
Created December 20, 2012 14:45
compare meory leak
==3963== Memcheck, a memory error detector
==3963== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==3963== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==3963== Command: node test/memory_leak.js
==3963==
--3963-- Valgrind options:
--3963-- --suppressions=/usr/lib/valgrind/debian-libc6-dbg.supp
--3963-- --leak-check=full
--3963-- -v
--3963-- Contents of /proc/version:
@kuno
kuno / 0.4.6.txt
Created December 19, 2012 02:12
GeoIP 0.4.6 memory leak report, by running 'valgrind --leak-check=full -v test/memory_leak.js' on ubuntu 12.04 64bit
==4302== Memcheck, a memory error detector
==4302== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==4302== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==4302== Command: node test/memory_leak.js
==4302==
--4302-- Valgrind options:
--4302-- --suppressions=/usr/lib/valgrind/debian-libc6-dbg.supp
--4302-- --leak-check=full
--4302-- -v
--4302-- Contents of /proc/version: