Skip to content

Instantly share code, notes, and snippets.

-- get path of Finder window
tell application "Finder"
try
set finder_window to window 1
on error
error "There are no Finder windows"
end try
set start_path to POSIX path of (target of window 1 as alias)
end tell
set default_settings to "# This is the default .slate file.
# If no ~/.slate file exists this is the file that will be used.
config defaultToCurrentScreen true
config nudgePercentOf screenSize
config resizePercentOf screenSize
# Resize Bindings
bind right:alt resize +10% +0
bind left:alt resize -10% +0
on alfred_script(q)
set {the_path, file_name} to parse_path(first item of q)
tell application "iTerm"
set _terminal to make new terminal
tell _terminal
launch session "Vim"
tell the last session
write text "cd \"" & the_path & "\""
# Replace e with your vim command
@tzarskyz
tzarskyz / README.md
Created July 8, 2012 01:31 — forked from goblindegook/README.md
Notational Velocity (nvALT) Custom Stylesheet and Markup HTML

Usage

Copy these files to your ~/Library/Application Support/Notational Velocity/ folder.

FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
@tzarskyz
tzarskyz / gist:07ccdb64b7f860bd1f4c
Created June 6, 2014 11:41
Export Safari's Tab to frontmost FoldingText 2.x window - Alfred ready.
-- All code grabbed and requested help with from generous parties and unsuspecting github users.
--
-- Create Markdown link from front most tab in safari and append
-- to end of current FoldingText document as new list item.
-- UNCOMMENT FOR USE IN ALFRED
on alfred_script(q)
--on run
-- -- -- -- -- -- -- -- --
--
#!/bin/bash
# Created by Håvard Fossli <hfossli@gmail.com> in 2013
# This is free and unencumbered software released into the public domain.
# For more information, please refer to <http://unlicense.org/>
#
# Description
# A bash script for fetching all branches and tags of a git project as snapshots into separate folders
#
# Keywords
import sqlite3
# open connection and get a cursor
conn = sqlite3.connect(':memory:')
c = conn.cursor()
# create schema for a new table
c.execute('CREATE TABLE IF NOT EXISTS sometable (name, age INTEGER)')
conn.commit()
property myDefaultList : ""
on alfred_script(q)
set qt to q as text
set itemList to extractList(qt)
set expandedQT to expandDelay(expandDay(removeList(qt)))
tell application "Reminders"
activate
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Updated: 2010/12/05
// License: MIT
//
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it)
//
// Permission is hereby granted, free of charge, to any person