Skip to content

Instantly share code, notes, and snippets.

@jpinnix
jpinnix / Pixelgrazer.taskpapertheme
Created July 8, 2010 17:59
Pixelgrazer TaskPaper Theme
<theme>
<!-- Window Style -->
<color id="foreground" red="1.0" green="0.776" blue="0.427" alpha="1.0" />
<color id="background" red="0.255" green="0.255" blue="0.255" alpha="1.0" />
<window foregroundColorID="foreground" backgroundColorID="background" shouldUseHUDScrollers="no" />
<!-- Text View Style -->
<color id="tag" red="0.800" green="0.471" blue="0.200" alpha="1.0" />
<color id="handle" extendsColorID="foreground" />
<color id="insertionPoint" red="1.0" green="1.0" blue="1.0" alpha="1.0" />
@visnup
visnup / gist:733671
Created December 8, 2010 18:24
/etc/newsyslog.d/local.conf
We couldn’t find that file to show.
@msabramo
msabramo / rebuild_services_menu.sh
Created January 4, 2011 02:06
How to force the OS X Services menu to rebuild itself; a good thing to try if your Services menu is stuck saying "Building..."
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
# - or -
launchctl stop com.apple.pbs
@joe-pindell
joe-pindell / ExportThingsToTaskPaper.scpt
Created April 8, 2011 20:18
An Applescript to export from Things to TaskPaper
set thePath to (path to desktop as Unicode text) & "ThingsToDo.txt"
set thingsToDoFile to (open for access file thePath with write permission)
set eof of thingsToDoFile to 0
set cr to ASCII character 10
tell application "Things"
-- Export to-dos from Inbox
write "Inbox:" & return to thingsToDoFile as «class utf8»
repeat with td in to dos of list "Inbox"
@imathis
imathis / Pullquote.css
Created June 19, 2011 02:52
Jekyll Pullquote plugin for Octopress
.has-pullquote:before {
/* Reset metrics. */
padding: 0;
border: none;
/* Content */
content: attr(data-pullquote);
/* Pull out to the right, modular scale based margins. */
float: right;
@dsanson
dsanson / custom.css
Created July 12, 2011 18:16
A custom.css for use with Marked.app
/*
This is my hacked up copy of Marked.app/Contents/Resources/gridless.css
Changes:
1. Smaller headings
2. ~~No scrollbars~~ (I now prefer the Lion default behavior)
3. Styling of definition lists ala LaTeX description lists.
4. Centering h1.title, h3.author, h4.date (pandoc's title/author/date block).
@melpomene
melpomene / wordcollector.py
Created October 11, 2011 11:33
Wordlist generating script that parses websites for words.
#!/usr/bin/env python2.7
''' Creates wordlists from web scraping. BeautifulSoup requierd (pip install beautifulsoup) '''
import sys
import os
import robotparser
from BeautifulSoup import BeautifulSoup as bs
import urllib2
from urlparse import urlparse
@vanto
vanto / README.md
Last active December 23, 2021 21:28
OEmbed Liquid Tag for Jekyll

OEmbed Liquid Tag for Jekyll

This is a simple liquid tag that helps to easily embed images, videos or slides from OEmbed enabled providers. It uses Magnus Holm's great oembed gem which connects to the OEmbed endpoint of the link's provider and retrieves the HTML code to embed the content properly (i.e. an in-place YouTube player, Image tag for Flickr, in-place slideshare viewer etc.). By default it supports the following OEmbed providers (but can fallback to Embed.ly or OoEmbed for other providers):

  • Youtube
  • Flickr
  • Viddler
  • Qik
  • Revision3
  • Hulu
  • Vimeo
@timsavery
timsavery / Ruby Download Parse JSON
Created January 22, 2012 15:19
Example For Downloading and Parsing JSON (Ruby)
require "rubygems"
require "json"
require "net/http"
require "uri"
uri = URI.parse("http://api.sejmometr.pl/posiedzenia/BZfWZ/projekty")
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Get.new(uri.request_uri)
@dyba
dyba / asa_cmds_rule_deletion.rb
Created January 27, 2012 16:18
Cisco ASA Firewall Rule Deletion Generator via RedSeal Device Cleanup Analysis Results
#
# PURPOSE:
# The purpose of this script is to generate a list of commands to delete unused access rules from a
# Cisco PIX or ASA firewall. This script is appropriate if you use the RedSeal application:
# http://www.redsealnetworks.com. Currently the results are printed to the screen only.
#
# INSTRUCTIONS:
# When you want to clean up unused rules on a firewall. Use the RedSeal application to run a cleanup:
# Tools > Manage Device Cleanup (Alt+T, C). When finished, export the results as a CSV file. Don't
# forget to include the .CSV extension. Run this script and type the name of the file with the