A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
#=============================================================================== | |
# 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 |
(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 () |
#!/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. |
;; 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 |
# 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" |
(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(": "); |
//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: |
//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: |
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 | |
# |