Skip to content

Instantly share code, notes, and snippets.

<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
import UIKit
protocol YelpRequestDelegate {
func getYelpData() -> AnyObject
func processYelpData(data: NSData) -> NSData
}
class YelpAPI {
var delegate: YelpRequestDelegate?
@damionvega
damionvega / install-iojs-in-10s.sh
Last active September 15, 2015 02:05 — forked from izolate/install-iojs-in-10s.sh
Install io.js on Ubuntu in 10 seconds (no nvm)
IOJS_VERSION=v0.0.0
IOJS_DIR=$HOME/.iojs
iojs_install() {
iojs_setup
iojs_download
iojs_assemble
iojs_teardown
}
sudo yum install autoconf automake bzip2 bzip2-devel cmake freetype-devel gcc gcc-c++ git libtool make mercurial pkgconfig zlib-devel -y
mkdir ~/ffmpeg_sources
# nasm
cd ~/ffmpeg_sources
curl -O -L https://www.nasm.us/pub/nasm/releasebuilds/2.14.02/nasm-2.14.02.tar.bz2
tar xjvf nasm-2.14.02.tar.bz2
cd nasm-2.14.02
./autogen.sh
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin"
@damionvega
damionvega / iterm2_switch_automatic.md
Created May 4, 2020 02:49 — forked from FradSer/iterm2_switch_automatic.md
Switch iTerm2 color preset automatic base on macOS dark mode.
  1. Add switch_automatic.py to ~/Library/ApplicationSupport/iTerm2/Scripts/AutoLaunch with:
#!/usr/bin/env python3

import asyncio
import iterm2

async def main(connection):
    async with iterm2.VariableMonitor(connection, iterm2.VariableScopes.APP, "effectiveTheme", None) as mon: