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 / NSString+MD5HexDigest.h
Created September 12, 2011 20:07 — forked from gnrfan/NSString+MD5HexDigest.h
Extending the NSString class with a MD5 hex digest method using a category
#import <Cocoa/Cocoa.h>
#import <CommonCrypto/CommonDigest.h>
@interface NSString (md5)
-(NSString *) md5HexDigest;
@end
@emaxerrno
emaxerrno / Xcode4TestFlightintegration.sh
Created August 13, 2012 05:10 — forked from incanus/Xcode4TestFlightintegration.sh
Xcode 4 scheme Archive step Post-script for automatic TestFlight build uploading. See the blog post here: http://developmentseed.org/blog/2011/sep/02/automating-development-uploads-testflight-xcode
#!/bin/bash
#
# (Above line comes out when placing in Xcode scheme)
#
API_TOKEN=<TestFlight API token here>
TEAM_TOKEN=<TestFlight team token here>
SIGNING_IDENTITY="iPhone Distribution: Development Seed"
PROVISIONING_PROFILE="${HOME}/Library/MobileDevice/Provisioning Profiles/MapBox Ad Hoc.mobileprovision"
#LOG="/tmp/testflight.log"
@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))))

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.

#!/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

How to change Pantheon Terminal's color scheme

Many of us spend many hours of our days using their terminal. Plus, we all have different tastes when it comes to color schemes. That's why the ability to change the color scheme of a terminal is one of its more important featuresl. Throughout this tutorial, I'll teach you how you can change the looks of your terminal, step by step.

This tutorial is aimed at elementary OS users, but it also works for any Ubuntu user. Start by installing dconf-tools:

sudo apt-get install dconf-tools

Secondly, you need to decide which theme you're going to apply. You can find dozens of terminal color schemes online, you can even design your own using this web application. Design the color scheme, hit "Get Scheme" and choose "Terminator". You'll get a raw text file with a background color, a foreground color and a palette. Those strings define your color scheme. In this tutorial, I'll post an

forceRerenderOnWebkit: ->
@el.parentNode.style.cssText += ';-webkit-transform:rotateZ(0deg)'
@el.parentNode.offsetHeight
@el.parentNode.style.cssText += ';-webkit-transform:none'
private static final long addressOffset;
static {
try {
addressOffset = UnsafeAccess.unsafe.objectFieldOffset(Buffer.class.getDeclaredField("address"));
} catch (Exception e) {
throw new RuntimeException(e);
}
}
public static long getAddress(ByteBuffer buffy) {
#!/usr/bin/env python
"""A Python git pre-commit script for Go programming language projects.
Install the script by putting it in .git/hooks/ directory in your project
directory. The script file must be called "pre-commit". Make sure the
executable flag in the script file is set. The script assumes you are building
your project with make.
The script makes sure that all go source files in the project have valid
;; Prevent the cursor from blinking
(blink-cursor-mode 0)
;; Don't use messages that you don't read
(setq initial-scratch-message "")
(setq inhibit-startup-message t)
;; Don't let Emacs hurt your ears
(setq visible-bell t)
;; You need to set `inhibit-startup-echo-area-message' from the
;; customization interface: