Skip to content

Instantly share code, notes, and snippets.

View angerman's full-sized avatar
🇸🇬

Moritz Angermann angerman

🇸🇬
View GitHub Profile
@ChillingHsu
ChillingHsu / emacs.sh
Last active December 29, 2021 16:15
Run Emacs.app as Client/Server, for someone who likes GUI emacs and emacsclient to speed up start-up time.
#!/bin/bash
BG_RED=`tput setaf 1`
BG_GREEN=`tput setaf 2`
BOLD=`tput bold`
RESET=`tput sgr0`
EMACS='/Applications/Emacs.app'
EMACS_CLIENT='/Applications/Emacs.app/Contents/MacOS/bin/emacsclient'
DEFAULT_EVAL='(switch-to-buffer "*scratch*")'
compiler-check: match-exact
resolver: lts-7.10
compiler: ghc-8.0.1.20161117
setup-info:
ghc:
linux64:
8.0.1.20161117:
url: http://downloads.haskell.org/~ghc/8.0.2-rc1/ghc-8.0.1.20161117-x86_64-deb8-linux.tar.xz
content-length: 112047972
sha1: 6a6e4c9c53c71cc84b6966a9f61948542fd2f15a
@steipete
steipete / PSPDFUIKitMainThreadGuard.m
Last active March 10, 2024 19:23
This is a guard that tracks down UIKit access on threads other than main. This snippet is taken from the commercial iOS PDF framework http://pspdfkit.com, but relicensed under MIT. Works because a lot of calls internally call setNeedsDisplay or setNeedsLayout. Won't catch everything, but it's very lightweight and usually does the job.You might n…
// Taken from the commercial iOS PDF framework http://pspdfkit.com.
// Copyright (c) 2014 Peter Steinberger, PSPDFKit GmbH. All rights reserved.
// Licensed under MIT (http://opensource.org/licenses/MIT)
//
// You should only use this in debug builds. It doesn't use private API, but I wouldn't ship it.
// PLEASE DUPE rdar://27192338 (https://openradar.appspot.com/27192338) if you would like to see this in UIKit.
#import <objc/runtime.h>
#import <objc/message.h>
@mbixby
mbixby / EXTNull.h
Last active December 14, 2015 17:59
EXTNull
/**
EXTNull
Experimental
EXTNull is a subclass of NSNull that acts more like nil.
Calling unrecognized methods on EXTNull *will not* throw
a NSInvalidArgumentException but again return EXTNull.
@thirtified
thirtified / xcode-git-version.sh
Created July 16, 2012 09:14 — forked from jpwatts/xcode-git-version.sh
This Xcode 4 build phase script automatically sets the version and short version string of an application bundle based on information from the containing Git repository.
#!/bin/bash
# This script automatically sets the version and short version string of
# an Xcode project from the Git repository containing the project.
#
# - Uses version from latest git tag for CFBundleShortVersionString
# (e.g. 1.2.3 from "v1.2.3")
# - Uses combined string <commit number>.<short commit hash> for CFBundleVersion
# (e.g. 18.9d75e30)
#
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@rust
rust / emacs.rb
Created August 6, 2011 03:59 — forked from pingles/emacs.rb
Homebrew Emacs for OSX Lion with native full-screen
require 'formula'
class Emacs < Formula
url 'http://ftp.gnu.org/pub/gnu/emacs/emacs-23.3a.tar.bz2'
md5 'f2cf8dc6f28f8ae59bc695b4ddda339c'
homepage 'http://www.gnu.org/software/emacs/'
if ARGV.include? "--use-git-head"
head 'git://repo.or.cz/emacs.git'
else