Skip to content

Instantly share code, notes, and snippets.

View ginatrapani's full-sized avatar
🏳️‍🌈
a work in progress

Gina Trapani ginatrapani

🏳️‍🌈
a work in progress
View GitHub Profile
@ginatrapani
ginatrapani / gist:1072329
Created July 8, 2011 17:32
TODOTXT_FINAL_FILTER
#!/bin/bash
export COLOR_CONTEXT=$GREEN
export COLOR_PROJECT=$RED
export COLOR_DATE=$LIGHT_GREEN
# Force gawk to behave posixly. Comment out if you get an error about
# no such option -W.
# AWK_OPTIONS="-W posix"
if [ "$TODOTXT_PLAIN" -eq "0" ]; then
awk $AWK_OPTIONS '
function highlight(colorVar, color) {
@ginatrapani
ginatrapani / todo.txt final filter
Created January 19, 2011 17:31
Specially colorizes priority, date and project.
#!/bin/bash
COLOR_CONTEXT=$GREEN
COLOR_PROJECT=$RED
COLOR_DATE=$LIGHT_GREEN
# Force gawk to behave posixly. Comment out if you get an error about
# no such option -W.
# AWK_OPTIONS="-W posix"
if [ "$TODOTXT_PLAIN" -eq "0" ]; then
awk $AWK_OPTIONS "
{ color = \"$DEFAULT\" }
@ginatrapani
ginatrapani / Favorites crawl log
Created November 16, 2010 23:18
I deleted all rows from tu_favorites, and set all the favorite-related tu_instance table fields to 0 and ran the crawler. Here's what happened.
2010-11-16 15:24:33 | 3.27 MB | ginatrapani | CrawlerTwitterAPIAccessorOAuth:Errors to tolerate: 10
2010-11-16 15:24:36 | 3.91 MB | ginatrapani | CrawlerTwitterAPIAccessorOAuth:API request: https://api.twitter.com/1/account/rate_limit_status.xml
2010-11-16 15:24:36 | 3.91 MB | ginatrapani | CrawlerTwitterAPIAccessorOAuth:Parsing XML data from https://api.twitter.com/1/account/rate_limit_status.xml
2010-11-16 15:24:36 | 3.91 MB | ginatrapani | CrawlerTwitterAPIAccessorOAuth:45 of 350 API calls left this hour; 7 for crawler until 15:43:11
2010-11-16 15:24:36 | 3.91 MB | ginatrapani | TwitterCrawler:***in fetchInstanceUserTweets
2010-11-16 15:24:37 | 3.91 MB | ginatrapani | CrawlerTwitterAPIAccessorOAuth:API request: https://api.twitter.com/1/users/show/ginatrapani.xml
2010-11-16 15:24:37 | 3.91 MB | ginatrapani | CrawlerTwitterAPIAccessorOAuth:44 of 350 API calls left this hour; 6 for crawler until 15:43:11
2010-11-16 15:24:37 | 3.97 MB | ginatrapani | UserMySQLDAO:User ginatrapani updated in system.
2010-11-1
CREATE TABLE tu_posts_tmp ( post_id bigint(11) NOT NULL );
INSERT INTO tu_posts_tmp
SELECT p.post_id FROM tu_posts p
INNER JOIN tu_posts p1 ON p.in_reply_to_post_id = p1.post_id
WHERE p.network = 'facebook' AND p1.network='facebook page';
UPDATE tu_posts, tu_posts_tmp
SET network = 'facebook page'
/**
* LICENSE:
*
* This file is part of ThinkUp.
*
* ThinkUp is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any
* later version.
*
* ThinkUp is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
<?php
header( 'Location: http://localhost/thinkup/plugins/twitter/auth.php?oauth_token='.$_GET['oauth_token'] ) ;
// Assumes http://localhost/thinkup is the URL to access ThinkUp on your local server.
?>
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'DESCRIPTION: This script will clean up any files that have a last modified
' date greater than or equal to the number specified.
'CREATED BY: Brian Plexico - microISV.com
'MODIFIED BY: Gina Trapani (ginatrapani@gmail.com)
'CREATE DATE: 07/19/2005
'UPDATED: 08/10/2007
'
'INSTRUCTIONS: 1. Enter the path to the directory you'd like to clean on line 28.
' Make sure to only change the text that currently reads: