Skip to content

Instantly share code, notes, and snippets.

@ttscoff
ttscoff / font_grabber.rb
Last active February 20, 2025 09:34
Give it a <link> from Google fonts and get back CSS with fonts embedded
#!/usr/bin/ruby
# encoding: utf-8
# Grab google web fonts and embed them as base64 data URIs
# <http://brettterpstra.com/2015/03/14/embedding-google-web-fonts/>
require 'base64'
if ARGV.length > 0
input = ARGV
elsif STDIN.stat.size > 0
input = STDIN.read.strip.split(/\n+/)
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump | grep -B6 bindings:.*:
@mygeekdaddy
mygeekdaddy / universal_image_merge.py
Created October 14, 2014 04:08
Pythonista script to merge two images together
# ** Universal iOS screenshot merge **
# Script will take two images of same orientation and merge them together.
#
# By: Jason Verly (@mygeekdaddy)
# Date: 2014-10-13
# Ver: 1.02
import clipboard
import Image
import console
@djui
djui / tips.md
Created September 2, 2014 09:36
Tips

Tips

This is a collection of all kinds of tips that I found to be useful over the years as most of them reflect repetative tasks but that are seldom applied. As a human... I forget. This list will soon be merge with a much longer and older list and then, I guess, I will publish it maybe as gist on Github or part of my dot-files Git repository.

OS X / Mac

@pwenzel
pwenzel / lamp-stack-osx-virtualhostx.md
Last active March 5, 2025 14:53
LAMP stack on OSX with Homebrew, built-in Apache, multiple PHP versions, VirtualhostX optional

This guide shows how to set up a PHP and MySQL development environment using OSX's built-in Apache, using Homebrew to install necessary components. With this strategy, you can use different versions of PHP for certain virtual hosts.

VirtualHostX is a convenient way to manage development sites, but not required.

Install PHP and MySQL with Homebrew

brew update
brew install php56
brew install php56-mcrypt
brew install mysql
@bachya
bachya / Update Grocery Stores.py
Last active October 28, 2016 18:24
Pythonista script to create a Launch Center Pro action related to Trello lists
# Pythonista script to create a Launch Center Pro action with all my
# updated grocery lists.
# Author: Aaron Bach
# www: http://www.bachyaproductions.com/
import json
import os
import sys
import urllib
import urllib2
@philippkeller
philippkeller / private.xml
Last active September 12, 2018 19:48 — forked from behrends/private.xml
Karabiner Umlauts (alt+u ⇒ ü, etc.)
<?xml version="1.0"?>
<root>
<item>
<name>Easy access for Umlauts</name>
<identifier>private.easy_umlaut_access</identifier>
<autogen>
--KeyToKey--
KeyCode::A, ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L,
KeyCode::U, ModifierFlag::OPTION_L, KeyCode::A, ModifierFlag::SHIFT_L
</autogen>
<!--Text-based Social Media Buttons-->
<p>
<!--Facebook-->
<a class="top_social" href="javascript:window.location=%22http://www.facebook.com/sharer.php?u=%22+encodeURIComponent(document.location)+%22&#38;t=%22+encodeURIComponent(document.title)" title="Share on Facebook...">Like</a> |
<!--Google Plus-->
<a href="https://plusone.google.com/_/+1/confirm?hl=en&url=<?php if(is_home()){echo home_url();}else{the_permalink();} ?>" target="_blank" title="Plus one this page on Google">Google +1</a> |
<!--Twitter-->
<a class="top_social" href="javascript:window.location=%22https://twitter.com/share?url=%22+encodeURIComponent(document.location)+%22&text=%22+encodeURIComponent(document.title)">Tweet</a> |
<!--LinkedIn-->
<a href="http://www.linkedin.com/shareArticle?mini=true&url=<?php if(is_home()){echo home_url();}else{the_permalink();} ?>" target="_blank">Share on LinkedIn</a> |
@golderweb
golderweb / autolister.sh
Created June 23, 2014 18:28
Automatic generation of e-mail black- and whitelists for maildrop from mails in specific (IMAP-)folders by "From"-header
#!/bin/bash
#
# Automatic generation of e-mail black- and whitelists for maildrop from mails in specific (IMAP-)folders by "From"-header
#
# For more information see <http://golderweb.de/2014/06/blacklist-fuer-maildrop-halbautomatisch-erstellen/> (German)
#
# Copyright 2014, GOLDERWEB – Jonathan Golder <[email protected]>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ryanzhou
ryanzhou / pf.md
Last active October 21, 2019 03:52
Getting Pow to work in OS X Yosemite

Getting Pow to work in OS X Yosemite

Some parts taken from: https://gist.github.com/kujohn/7209628

ipfw is officially deprecated and removed in OS X Yosemite. Pow requires another program pf to handle the port forwarding.

1. Anchor file

Create file /etc/pf.anchors/pow