Skip to content

Instantly share code, notes, and snippets.

@eyeseast
eyeseast / 2019.md
Last active January 1, 2020 03:30
2019 goals
  • Save 20% of our income
  • Take a family vacation
  • Get a nice (professional) family photo taken
  • Get passports for the kids
  • Cook three new things from Marcella Hazan's cookbook, from different chapters (so only one pasta, etc), or from Food Matters, of NYT Cooking
  • Catalog all my email subscriptions and unsubscribe from 75 percent of them
  • Compete in jiujitsu at least once
  • Play at least one game of chess a week

Projects:

@alghanmi
alghanmi / podcastgen.py
Last active July 29, 2024 07:43
Podcast Feed Generator -- Generate an podcast RSS feed for a set of media in a directory.
"""Podcast Feed Generator
Generate an podcast RSS feed for a set of media in a directory.
Use the list-extensions argument to see the list of supported extensions. You can add custom extensions using
Usage:
podcastgen.py gen <directory> --title=<podcast-title> --link=<podcast-link> --desc=<description> [--output=<rss-feed-file>] [--feed-link=<feed-url>] [--id=<podcast-id>] [--logo=<image_file>] [--category=<itunes-category> [--subcategory=<itunes-category>]] [--language=<language>] [--use-extension=<ext>]
podcastgen.py list-categories
podcastgen.py list-extensions
podcastgen.py -h | --help
@stophlong
stophlong / pythonista_google_tts.py
Created February 2, 2014 19:28
Ios 7 pythonista script: takes clipboard (in Spanish) and reads it aloud (in Spanish) using Google Text to Speech
# -*- coding: utf-8 -*-
""" ios clipboard to google TTS (in Spanish)
This was written for ios pythonista, a python 2.x language. It takes whatever is in the clipboard
and reads it out using google text-to-speech. The present form takes Spanish and reads it aloud as my
interest is in learning to understand spoken Spanish. I take text from the immersion part of
Duolingo and listen. It should be quite easy to modify for different purposes.
On a jail-broken device one can even: copy to clipboard, use activator to launch the pythonista script, and
have it start speaking! I simple gathered some python from the web, fit it together, debugged a bit, and I
had a new tool. Pythonista blew my mind.
@ttscoff
ttscoff / jekyllpre.rb
Last active September 7, 2019 16:02
Marked Custom Processor for Jekyll/Octopress previews with img/gist Liquid tags
#!/usr/bin/ruby
# encoding: utf-8
# Version 1
#
# Example custom processor for use with Marked <http://markedapp.com> and Jekyll _posts
# It's geared toward my personal set of plugins and tags, but you'll get the idea.
# It turns
# {% img alignright /images/heythere.jpg 100 100 "Hey there" "hi" %}
# into
# <img src="../images/heythere.jpg" alt="Hey there" class="alignright" title="hi" />
@rafaelrinaldi
rafaelrinaldi / README.md
Created October 20, 2012 04:45
Command for the native Markdown bundle of TextMate which allows you to preview the current document on Marked.

This is a simple TextMate command that allows you to preview the current document you're editing right on Marked editor.

Installation

  • Go to BundlesBundle EditorShow Bundle Editor (or simply ⌃⌥⌘B):
  • Locate the Markdown bundle then click on it:
  • On the bottom of the window you'll find a plus icon. Click on it then select New Command:
@sirkitree
sirkitree / gist:3341061
Created August 13, 2012 14:06 — forked from deviantintegral/gist:3340625
Bookmarklet to show Yammer postings in chronological order
<a href="javascript:(function(){ul=jQuery('.yj-feed-messages');ul.children().each(function(i,li){ul.prepend(li)})})();">drag</a>
@relrod
relrod / README.md
Created April 19, 2012 08:25
Color Palette Generator in Ruby

Color Palette Generator

Ever have a list of colors and want to find out what they look like without plopping them all into GIMP/Photoshop?

This script will take an argument, a comma-separated list of color hashes (be sure to quote if your shell uses # for comment), and generates a quick HTML document for showing what the colors look like, in a table:

color sample | color code

Usage is:

@marians
marians / db.sql
Created February 20, 2012 11:11
Collecting tweets mentioning given keywords, storing the result to a MySQL table
CREATE TABLE `tweets` (
`id` varchar(24) NOT NULL DEFAULT '',
`created_at` datetime NOT NULL,
`user_id` bigint(20) unsigned NOT NULL,
`user_name` varchar(128) NOT NULL DEFAULT '',
`user_followers` int(11) unsigned NOT NULL,
`user_friends` int(10) unsigned DEFAULT NULL,
`user_listed` int(10) unsigned DEFAULT NULL,
`user_statuses` int(10) unsigned DEFAULT NULL,
`user_location` varchar(100) DEFAULT NULL,
@ttscoff
ttscoff / grabicon.sh
Created March 4, 2011 23:45
Rough Bash script for pulling icon files from Mac applications
#!/bin/bash
APP=`echo $1|sed -e 's/\.app$//'`
# Removes ".app" if it was passed
ICON=`defaults read /Applications/$APP.app/Contents/Info CFBundleIconFile|sed -e 's/\.icns$//'`
# Removes ".icns" if the Info.plist has it
# Harcoded for /Applications, needs to be rewritten for other locations or droplets
## Save icon on Desktop in JPEG format, resized to 256 max width/height
@navitronic
navitronic / gist:758177
Created December 29, 2010 04:35
PHP Code to remove Google Analytics cruft from urls
<?php
preg_replace('/(\?|\&)?utm_[a-z]+=[^\&]+/', '', 'http://mashable.com/2010/12/14/android-quick-start-guide/?utm_source=twitterfeed&utm_medium=twitter&utm_campaign=Feed%3A+Mashable+%28Mashable%29');
// Returns http://mashable.com/2010/12/14/android-quick-start-guide/
# 100 urls to test against
# ========================
#
# http://activeinboxhq.com/?utm_medium=Argyle+Social&utm_source=TweetDeck&utm_content=http=//activeinboxhq.com/