Skip to content

Instantly share code, notes, and snippets.

@ivanzoid
ivanzoid / setupGOROOT.sh
Created August 26, 2012 10:43
Aumatically setup $GOROOT in HomeBrew
#
# Place this code to your .profile, .bashrc, .bash_profile or whatever
#
program_exists () {
type "$1" &> /dev/null ;
}
if program_exists go; then
@kimmobrunfeldt
kimmobrunfeldt / 0-osx-for-web-development.md
Last active July 26, 2022 13:30
Install web development tools to Mavericks (OS X 10.9)

Install web development tools to Mavericks (OS X 10.9)

Strongly opinionated set of guides to quickly setup OS X Mavericks for web development. By default OS X hides stuff that normal people don't need to see. These settings are better defaults for developers.

I don't want: any sounds, annoying confirmation dialogs, hidden extensions, superflous animations, unnecessary things running like Dashboard, Notification center or Dock(Alfred/spotlight works better for me).

These are my opinions. Read this document through and pick up the good parts to your preferences.

System preferences

@krodak
krodak / Realm+CascadeDeleting.swift
Last active April 27, 2023 19:16
Cascade deletion for RealmSwift
import RealmSwift
import Realm
protocol CascadeDeleting: class {
func delete<Entity>(_ list: List<Entity>, cascading: Bool)
func delete<Entity>(_ results: Results<Entity>, cascading: Bool)
func delete<Entity: Object>(_ entity: Entity, cascading: Bool)
}
@lachesis
lachesis / letsencrypt_notes.sh
Last active December 13, 2023 11:02
Set up LetsEncrypt using acme.sh without root
# How to use "acme.sh" to set up Lets Encrypt without root permissions
# See https://github.com/Neilpang/acme.sh for more
# This assumes that your website has a webroot at "/var/www/<domain>"
# I'll use the domain "EXAMPLE.com" as an example
# When this is done, there will be an "acme" user that handles issuing,
# updating, and installing certificates. This account will have the following
# (fairly minimal) permissions:
# - Host files at http://EXAMPLE.com/.well-known/acme-challenge
@saetia
saetia / gist:1623487
Last active March 19, 2024 15:21
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt