Skip to content

Instantly share code, notes, and snippets.

Avatar

Miguel Araujo miguelarauj1o

View GitHub Profile
@miguelarauj1o
miguelarauj1o / Makefile
Created Nov 28, 2016 — forked from leandrosilva/Makefile
Makefile to compile, run, and test Erlang applications
View Makefile
APP_NAME := my_awesome_app
all: compile
compile: clear
@cp src/$(APP_NAME).app ebin/
@erlc -pa ebin/ -o ebin/ src/*.erl
compile_test: compile
@erlc -pa ebin/ -o ebin/ test/*.erl
View gist:757275804a8d59f4034d2351ab0babb8
import Cocoa
class GeneralThing<S> {
var stuff: S?
func doIt() {
if let s = stuff {
doWithStuff(s)
}
}
@miguelarauj1o
miguelarauj1o / iterm2-solarized.md
Created Nov 1, 2016 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font (OS X / macOS)
View RandomNumbers.swift
import Darwin
public func arc4random <T: IntegerLiteralConvertible> (type: T.Type) -> T {
var r: T = 0
arc4random_buf(&r, UInt(sizeof(T)))
return r
}
public extension UInt {
public static func random(lower: UInt = min, upper: UInt = max) -> UInt {
@miguelarauj1o
miguelarauj1o / introrx.md
Created Aug 24, 2016 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
View introrx.md
View FRP iOS Learning resources.md

Videos

@miguelarauj1o
miguelarauj1o / # alluxio - 2016-08-23_15-46-47.txt
Created Aug 23, 2016
alluxio on Mac OS X 10.11.6 - Homebrew build logs
View # alluxio - 2016-08-23_15-46-47.txt
Homebrew build logs for alluxio on Mac OS X 10.11.6
Build date: 2016-08-23 15:46:47
@miguelarauj1o
miguelarauj1o / .profile
Created Apr 21, 2016 — forked from bmhatfield/.profile
Automatic Git commit signing with GPG on OSX
View .profile
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@miguelarauj1o
miguelarauj1o / NSString+Random.h
Created Apr 7, 2016 — forked from mdippery/NSString+Random.h
Generate random strings in Objective-C
View NSString+Random.h
/*
* Copyright (C) 2011 Michael Dippery <mdippery@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
@miguelarauj1o
miguelarauj1o / podforceupdate.sh
Created Apr 7, 2016 — forked from mbinna/podforceupdate.sh
Clear CocoaPods cache, re-download and re-install all pods
View podforceupdate.sh
#!/usr/bin/env bash
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
pod update