Skip to content

Instantly share code, notes, and snippets.

@cliss
cliss / organize-photos.py
Created October 6, 2013 14:43
Photo management script. This script will copy photos from "~/Pictures/iPhone Incoming" into a tree the script creates, with folders representing month and years, and photo names timestamped. Completely based on the work of the amazing Dr. Drang; see here: http://www.leancrew.com/all-this/2013/10/photo-management-via-the-finder/ You can see more…
#!/usr/bin/python
import sys
import os, shutil
import subprocess
import os.path
from datetime import datetime
######################## Functions #########################
@rbf
rbf / Default (OSX).sublime-keymap
Last active March 4, 2024 19:14 — forked from jasonlong/Default (OSX).sublime-keymap
A simple way to toggle between dark and light themes in Sublime Text 2 and 3.
// Copy this to your keybindings (Preferences > Key Bindings - User)
// Change the keybinding, color schemes, and themes to your preferences
{
"keys": ["ctrl+shift+s"], "command": "toggle_color_scheme",
"args": {
"light_color_scheme": "Packages/Solarized Color Scheme/Solarized (light).sublime-color-scheme",
"dark_color_scheme": "Packages/Solarized Color Scheme/Solarized (dark).sublime-color-scheme",
"light_theme": "Adaptive.sublime-theme",
"dark_theme": "Adaptive.sublime-theme"
@candostdagdeviren
candostdagdeviren / pre-commit
Last active December 27, 2024 14:24
Git Pre-Commit hook with SwiftLInt
#!/bin/bash
#Path to swiftlint
SWIFT_LINT=/usr/local/bin/swiftlint
#if $SWIFT_LINT >/dev/null 2>&1; then
if [[ -e "${SWIFT_LINT}" ]]; then
count=0
for file_path in $(git ls-files -m --exclude-from=.gitignore | grep ".swift$"); do
export SCRIPT_INPUT_FILE_$count=$file_path