Skip to content

Instantly share code, notes, and snippets.

@lowply
lowply / aperture2photos.scpt
Created April 21, 2016 09:28
Dump photos of each album in Aperture and import them into Photos.app
global yr
set yr to "2012"
global basePath
set basePath to "Storage:Pictures:ApertureExport:" & yr & ":"
tell application "System Events"
set exportFolder to basePath
@skahack
skahack / index.html
Created January 22, 2016 08:37
iOS 9 Safari - workaround
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Viewport Test</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="/workaround.js"></script>
</head>
<body>
@ericmjl
ericmjl / merger.py
Created June 5, 2015 16:50
A Python script for merging PDF files together.
"""
Author: Eric J. Ma
Purpose: To merge PDFs together in an automated fashion.
"""
import os
from PyPDF2 import PdfFileReader, PdfFileMerger
@natcl
natcl / ImportPhoto.scpt
Last active November 11, 2020 18:56
OSX Folder Action to automatically import files added to a folder in Photos.app
property imageFiles : {"jpg", "pef", "dng", "jpeg"}
on adding folder items to theWatchedFolder after receiving theDetectedItems
repeat with theItem in theDetectedItems
set theItemPath to POSIX path of theItem
set ImageFile to POSIX file theItemPath
tell application "System Events"
if name extension of theItem is in imageFiles then
tell application "Photos"
set DestinationAlbumName to "Inbox"
@deanishe
deanishe / anki.py
Last active August 29, 2015 14:19
Demonstration of Alfred Script Filter interaction model for entering flash cards
#!/usr/bin/python
# encoding: utf-8
#
# Copyright © 2015 Dean Jackson <deanishe@deanishe.net>
#
# MIT Licence. See http://opensource.org/licenses/MIT
#
# Created on 2015-04-20
#
@redoPop
redoPop / anki_mobile_card.html
Created February 7, 2015 19:22
HTML used by AnkiMobile to render card templates; a reference for creating advanced Anki card templates with special HTML/CSS. When used by AnkiMobile, the card's HTML replaces the `<!-- (Card contents) -->` comment in this gist, with the shared styles dropped inline inside a `<style>` tag.
<!doctype html>
<html class=" webkit safari mobile iphone js">
<head>
<meta name="viewport" content="width=device-width;">
<style id="ss"></style>
<style>
body {
text-align: center;
font-size: 1em;
-webkit-transform: translate3d(0,0,0);
@subchen
subchen / copy-pre-code.html
Last active May 24, 2019 06:31
zero-clipboard demo
<style>
.zero-clipboard {
position: relative;
}
.btn-clipboard {
position: absolute;
top: 0;
right: 0;
z-index: 10;
display: block;
@fadhlirahim
fadhlirahim / installing_supervisor_macosx.md
Last active December 31, 2023 14:45
Setting up supervisord in Mac OS X

Installation

Installing Supervisor on OS X is simple:

sudo pip install supervisor

This assumes you have pip. If you don't:

@jacrook
jacrook / font_variables.scss
Last active June 16, 2024 18:15
Sass Css Font Stack Variables
//////////////////////////////////////////////////////////////
// Font Variables (http://cssfontstack.com/)
//////////////////////////////////////////////////////////////
//
// Serif font-stacks
//
$baskerville-font-stack: "Big Caslon", "Book Antiqua", "Palatino Linotype", Georgia, serif !default;
@fractaledmind
fractaledmind / Skim Page Splitter
Last active May 31, 2019 17:08
This little program uses the Mac app Skim to split scanned PDFs that have two pages layed out on a single PDF page in landscape mode.
(* SPLIT TWO-PAGE PDFS
--Stephen Margheim
-- 11/2/13
-- open source
VERSION 3.0
--Version 3 adds a feature for OCR'd PDFs. If your PDF has been OCR'd, the script now automatically crops the individual pages so that the text field is centered.
This little program uses the Mac app Skim to split scanned PDFs that have two pages layed out on a single PDF page in landscape mode: