Skip to content

Instantly share code, notes, and snippets.

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

Alexander Gallego emaxerrno

💭
I may be slow to respond.
View GitHub Profile
@emaxerrno
emaxerrno / Installing zookeper and monitoring it
Created August 20, 2012 19:52
Zookeeper on ubuntu and monitoring
#!/bin/sh
echo "assumes java 7 is instlaled openjdk versio"
#pre dependencies
sudo apt-get install git-core pkg-config libtool automake make g++ connect-proxy unzip python
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
#install zeromq
git clone git clone git://github.com/zeromq/libzmq.git
@emaxerrno
emaxerrno / gist:4009089
Created November 3, 2012 22:18 — forked from lclarkmichalek/gist:1657284
Flymake mode for golang
(require 'flymake)
(defvar go-compiler "8g")
(defun flymake-go-init ()
(let* ((temp-file (flymake-init-create-temp-buffer-copy
'flymake-create-temp-inplace))
(local-file (file-relative-name
temp-file
(file-name-directory buffer-file-name))))
@emaxerrno
emaxerrno / err
Created November 29, 2012 16:30
runtime
goroutine profile: total 105
1 @ 0x4df665 0x4df49a 0x4dc892 0x4386da 0x438822 0x429178 0x429fcc 0x428f8b 0x40f769
# 0x4df665 runtime/pprof.writeRuntimeProfile+0x88 /usr/lib/go/src/pkg/runtime/pprof/pprof.go:517
# 0x4df49a runtime/pprof.writeGoroutine+0x82 /usr/lib/go/src/pkg/runtime/pprof/pprof.go:479
# 0x4dc892 runtime/pprof.(*Profile).WriteTo+0xa2 /usr/lib/go/src/pkg/runtime/pprof/pprof.go:221
# 0x4386da net/http/pprof.handler.ServeHTTP+0x210 /usr/lib/go/src/pkg/net/http/pprof/pprof.go:163
# 0x438822 net/http/pprof.Index+0x143 /usr/lib/go/src/pkg/net/http/pprof/pprof.go:175
# 0x429178 net/http.HandlerFunc.ServeHTTP+0x3d /usr/lib/go/src/pkg/net/http/server.go:704
# 0x429fcc net/http.(*ServeMux).ServeHTTP+0xb9 /usr/lib/go/src/pkg/net/http/server.go:942
# 0x428f8b net/http.(*conn).serve+0x621 /usr/lib/go/src/pkg/net/http/server.go:670

Setting up Emacs daemon on OS X

Tired of waiting for emacs to start on OS X? This step by step guide will teach you how to install the latest version of emacs and configure it to start in the background (daemon mode) and use emacsclient as your main editor.

Install Homebrew

First you'll need to install the [Homebrew package manager][brew] if yo haven't already. It is amazing.

<div class="filterMenu">
<div class="toggleButton">
<a ng-click="toggle()"
ng-show="showList()"
href="#"><img src="/images/list-view-active.png"></a>
<a ng-click="toggle()"
ng-show="showGrid()"
href="#"><img src="/images/list-view-inactive.png"></a>
</div>
</div>
(function() {
'use strict';
angular.module('myap').directive('popover', function() {
return {
restrict: "AE",
require: "ngModel",
scope: {
popOverId: "@",
header: "@",
(function() {
'use strict';
angular.module('harvesttomarketApp').directive('popover', [
'$compile', function($compile) {
return {
restrict: "EA",
require: "?ngModel",
scope: {
popOverId: "@",
'use strict';
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
module.exports = function (grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*').concat(['gruntacular']).forEach(grunt.loadNpmTasks);
#!/bin/sh
# Demo http://ascii.io/a/3019
# build with debug flags
go build -gcflags "-N -l" -o out
# find the debugger comments
awk '/\/\/debugger/ { print "break " FILENAME ":" FNR; }' `find $PWD -name "*.go" | xargs` > .breakpoints
package com.yieldmo.common.protobuf
import com.google.protobuf.Message
import java.lang.AutoCloseable
import java.util.Properties
import kafka.producer.Producer
import kafka.producer.ProducerConfig
import kafka.producer.ProducerData
import kafka.serializer.Encoder
import scala.reflect.ClassDef