View faves.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (isset($_GET['errors'])) { error_reporting(E_ALL); } else { error_reporting(0); } | |
// Requires the Universal Feed Writer from http://www.phpclasses.org/browse/package/4427.html | |
include("FeedWriter.php"); | |
define('FIREWALLED', true); | |
define('FIREWALL_ROOT', 'firewall/'); | |
include(FIREWALL_ROOT.'config/db.php'); |
View faves.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (isset($_GET['errors'])) { error_reporting(E_ALL); } else { error_reporting(0); } | |
// Requires the Universal Feed Writer from http://www.phpclasses.org/browse/package/4427.html | |
include("FeedWriter.php"); | |
define('FIREWALLED', true); | |
define('FIREWALL_ROOT', 'firewall/'); | |
include(FIREWALL_ROOT.'config/db.php'); |
View fever-sharing.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Evernote - e | |
http://s.evernote.com/grclip?url=%u&title=%t | |
Pinboard - p | |
http://pinboard.in/add?url=%u&title=%t | |
Pinboard read later - l | |
http://pinboard.in/add?url=%u&title=%t&later=yes&noui=yes&jump=close |
View object-watch.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* object.watch polyfill | |
* | |
* 2012-04-03 | |
* | |
* By Eli Grey, http://eligrey.com | |
* Public Domain. | |
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
*/ |
View node-and-npm-in-30-seconds.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
View kill_attrs.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from BeautifulSoup import BeautifulSoup | |
def _remove_attrs(soup): | |
for tag in soup.findAll(True): | |
tag.attrs = None | |
return soup | |
def example(): | |
doc = '<html><head><title>test</title></head><body id="foo" onload="whatever"><p class="whatever">junk</p><div style="background: yellow;" id="foo" class="blah">blah</div></body></html>' |
View login
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//var win = Titanium.UI.currentWindow; | |
var currentWin = Ti.UI.currentWindow; | |
// if successful login - save user data to database | |
function insertRows(dbData) { | |
// call the database and table | |
var db = Ti.Database.install('../myapp.sqlite','users'); | |
// call out the info to save then save it | |
var theData = db.execute('INSERT INTO users (username, email) VALUES("'+name.value+'","'+email.value+'")'); | |
View ril_to_instapaper.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# 1. export your RIL bookmarks | |
# 2. save this file to the same directory where your ril_export.html is | |
# 3. change username and password in the script bellow | |
# 4. run 'ruby ril_to_instapaper.rb' in terminal | |
require "cgi" | |
require "net/http" | |
require "net/https" |
View gist:964905
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Yaron Schoen | |
http://yaronschoen.com/ | |
http://www.yaronschoen.com/site/atom/ | |
Oli Studholme | |
http://oli.jp/ | |
http://oli.jp/articles.atom | |
Ben Bleikamp | |
http://www.bleikamp.com |
View hatchshow.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
$(window).load(function(){ | |
$().hatchShow(); | |
}); | |
jQuery.fn.hatchShow = function(){ | |
$('.hsjs').css('display','inner-block').css('white-space','pre').each(function(){ | |
var t = $(this); | |
t.wrap("<span class='hatchshow_temp' style='display:block'>"); | |
var pw = t.parent().width(); |
OlderNewer