Skip to content

Instantly share code, notes, and snippets.

View tangzero's full-sized avatar
🏠
Working from home

Jairinho tangzero

🏠
Working from home
View GitHub Profile
@donpdonp
donpdonp / boom!
Created July 23, 2015 15:41
DigitalOcean + CoreOS with Terraform
$ ssh core@45.55.11.xxx
Warning: Permanently added '45.55.11.xxx' (ED25519) to the list of known hosts.
CoreOS stable (717.3.0)
core@rethink-cluster-sfo1 ~ $
@dmitshur
dmitshur / gist:6927554
Last active July 14, 2024 16:13
[Legacy GOPATH mode] How to `go get` private repos using SSH key auth instead of password auth.
@howlingblast
howlingblast / gist:5814547
Created June 19, 2013 14:00
CoffeeScript: getter/setter example
Function::property = (prop, desc) ->
Object.defineProperty @prototype, prop, desc
class Person
constructor: (@firstName, @lastName) ->
@property 'fullName',
get: -> "#{@firstName} #{@lastName}"
set: (name) -> [@firstName, @lastName] = name.split ' '
p = new Person 'Leroy', 'Jenkins'
@robertwahler
robertwahler / basic_moai_helper.rb
Last active December 13, 2015 21:48
Thor tasks to run MOAI binaries independent of OS.
require 'pathname'
require 'rbconfig'
require 'fileutils'
module BasicMoai
ROOT_FOLDER = File.expand_path(File.join(File.dirname(__FILE__), ".."))
SRC_FOLDER = File.join(ROOT_FOLDER, "src")
VENDOR_FOLDER = File.join(ROOT_FOLDER, "vendor")
TMP_FOLDER = File.join(ROOT_FOLDER, "tmp")
@adamgit
adamgit / gist:3705459
Last active December 11, 2023 16:27
Automatically create cross-platform (simulator + device) static libraries for Objective C / iPhone / iPad
##########################################
#
# c.f. http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4
#
# Version 2.82
#
# Latest Change:
# - MORE tweaks to get the iOS 10+ and 9- working
# - Support iOS 10+
# - Corrected typo for iOS 1-10+ (thanks @stuikomma)
@statico
statico / gist:3172711
Created July 24, 2012 21:15
How to use a PS3 controller on Mac OS X 10.7 (Lion)

How to use a PS3 controller on Mac OS X 10.7 (Lion)

  1. Open Apple menu -> System Preferences -> Bluetooth and disable Bluetooth on Mac as well as any other nearby Macs or devices which will try to pair with and confuse the controller.

  2. Reset PS3 controller by inserting paperclip into pinhole near L2 button.

  3. Connect PS3 controller to Mac with USB cable.

  4. Enable Bluetooth.