Skip to content

Instantly share code, notes, and snippets.

@rsobik
rsobik / boost.sh
Created November 17, 2013 13:20
Build Boost 1.55.0 for iOS 7 and OS X including 64 Bit
#===============================================================================
# Filename: boost.sh
# Author: Pete Goodliffe
# Copyright: (c) Copyright 2009 Pete Goodliffe
# Licence: Please feel free to use this, with attribution
# Modified version
#===============================================================================
#
# Builds a Boost framework for the iPhone.
# Creates a set of universal libraries that can be used on an iPhone and in the
@sabof
sabof / gist:7363048
Created November 7, 2013 22:35
es-make-minibuffer-frame
(defun es-make-minibuffer-frame ()
(interactive)
(let* (( last-recursion-depth )
( frame (make-frame '((width . 60)
(height . 4)
(minibuffer . only)
(title . "Emacs-Minibuffer"))))
( enable-recursive-minibuffers t)
;; Runs when going down a level, or when entering a prompt. Not ideal
( minibuffer-exit-hook (list (lambda ()
@jdmonaco
jdmonaco / organize-photos.py
Last active October 29, 2021 20:35 — forked from cliss/organize-photos.py
Update of @cliss's update of Dr. Drang's photo management scripts. Replaced shutil calls with subprocess calls. Added a log file that gets written to the destination directory. Source can now be a directory tree (using os.walk). Replaced comments/docstrings with slightly better code organization and function names. Replaced path string concatena…
#!/usr/bin/env python
"""
organize-photos.py - Organize an unstructured folder tree of photos and movie
files into a month-and-year folder structure.
Note: This is a minor rewrite of @cliss's extension [1,2] of @drdrang's
photo management scripts [3], and includes a tweak from @jamiepinkham [4,5].
The lists of raw [6] and video [7] file extensions were found elsewhere.
@sloria
sloria / bobp-python.md
Last active May 28, 2025 02:41
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@Pitometsu
Pitometsu / after.el
Created October 6, 2013 04:43
macro for lazy customizing el-get packages init-files
;; helper macro for multiply plugin interaction
(defmacro after (mode &rest body)
"`eval-after-load' MODE evaluate BODY."
(declare (indent defun))
`(if (featurep ,mode)
(progn ,@body)
(eval-after-load ,mode
'(progn ,@body))))
(font-lock-add-keywords 'emacs-lisp-mode
@orkoden
orkoden / easyReleaseNotesWithGit.sh
Last active December 21, 2015 12:29
easy release notes with git.gets all commit messages since the last tag. useful when preparing release notes.cut is there to get rid of the commit hashes, sort is there because then all commits starting with "fix: bug 9001" or "change: will be next to each other.put into .bashrc, .profile, .zshrc depending on your shell.only works if you tag you…
# replace mate with editor of your choice
alias releasenotes="git log --oneline --no-merges `git describe --abbrev=0 --tags`..HEAD | cut -c 9- | sort | mate"
@PaulKinlan
PaulKinlan / criticalcss-bookmarklet-devtool-snippet.js
Last active March 12, 2025 01:22
CriticalCSS Bookmarklet and Devtool Snippet.js
(function() {
var CSSCriticalPath = function(w, d, opts) {
var opt = opts || {};
var css = {};
var pushCSS = function(r) {
if(!!css[r.selectorText] === false) css[r.selectorText] = {};
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/);
for(var i = 0; i < styles.length; i++) {
if(!!styles[i] === false) continue;
var pair = styles[i].split(": ");
@philgruneich
philgruneich / Send long markdown email
Created July 31, 2013 01:02
one-tap send clipboard message in markdown as an HTML email using Drafts and Launch Center Pro. This action takes the first line as recipients and the remaining as the content. This action works for emails with more than a single paragraph.
//Create the following rule at Launch Center Pro:
drafts://x-callback-url/create?text={{[[clipboard]]}}&action=Markdown%20Long
//Add the following rule to Drafts, named Markdown Long:
drafts://x-callback-url/create?text=[[body]]&action=Markdown%3A%20Copy%20to%20Clipboard&x-source=Drafts&x-success={{drafts://x-callback-url/create?text=[[title]]&action=Long%20Clipboard%20Mail&afterSuccess=Delete}}&afterSuccess=Delete
//Add this other rule to Drafts, named Long Clipboard Mail:
@philgruneich
philgruneich / Send short markdown email
Created July 31, 2013 00:59
one-tap send clipboard message in markdown as an HTML email using Drafts and Launch Center Pro. This action takes the first line as recipients, second line as subject and moves your content around using the clipboard. It only works for short emails that use no more than a single paragraph.
//Create the following rule at Launch Center Pro:
drafts://x-callback-url/create?text={{[[clipboard]]}}&action=Markdown%20Short
//Add the following rule to Drafts, named Markdown Short:
drafts://x-callback-url/create?text=[[line|3]]&action=Markdown%3A%20Copy%20to%20Clipboard&x-source=Drafts&x-success={{drafts://x-callback-url/create?text=[[line|1]]%0A[[line|2]]&action=Short%20Clipboard%20Mail&afterSuccess=Delete}}&afterSuccess=Delete
//Add this other rule to Drafts, named Short Clipboard Mail:
@nicolasH
nicolasH / apple system status.py
Last active December 8, 2016 19:59
apple system status
import sys
import console
import requests
from bs4 import BeautifulSoup
from datetime import datetime
#
# Check the status of the Apple Dev Center systems.
# Offline systems appear in orange
# Online systems appear in black
#