Skip to content

Instantly share code, notes, and snippets.

import adnpy
import sys
# Set the default access token for API calls.
adnpy.api.add_authorization_token('AQAAAAAACqdtFdqwsJmFbaDL036aIM8RDgQKvbDhXBfFJRMl0IQkurrGfBROJQ5Qx0mEf0oYYdnecAyEZR29jgkEPUTaPes_zg')
while True:
try:
text = raw_input('> ')
if text:
@scripting
scripting / RiverReader
Last active August 29, 2015 14:03
Minimal code for reading a river
<html>
<head>
<title>Minimal River Reader</title>
<script src="http://fargo.io/code/jquery-1.9.1.min.js"></script>
</head>
<body>
<script>
var theRiver;
function onGetRiverStream (updatedFeeds) {
theRiver = updatedFeeds;
<?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');
@BenWard
BenWard / faves.php
Created August 17, 2009 20:54 — forked from blowery/faves.php
<?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');
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
@forrestfrazier
forrestfrazier / login
Created December 19, 2010 19:12
log in to web app and return data to be saved in titanium app
//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+'")');
@nitinthewiz
nitinthewiz / appnet_widget
Created October 5, 2012 02:13
The App.net widget for wordpress blogs :)
<iframe src="http://appnetizens.com/embed_adn?userid=1538&width=180" width="180" height="260" frameborder="0" scrolling="no"></iframe>
@abraham
abraham / index.html
Created October 29, 2012 02:50
ADN Widgets alpha install instructions
<html>
<head>
<!-- ADN Widgets alpha -->
<!-- Sign up for alpha deprecation announcements: https://groups.google.com/forum/#!forum/adn-widgets-announce -->
<!-- To install: include script on your web site and add the <a> tag where you want the follow button -->
<!-- Tested to work in the latest Chrome, Firefox, Safari, and IE9 -->
<!-- ADN Widgets: https://alpha.app.net/widgets -->
<script async src='https://adnwidgets.herokuapp.com/alpha.js'></script>
</head>
import base64
from scene import *
from PIL import Image
def load_keyboard(retina_display = False):
kb_filename = "keyboard.png"
if retina_display:
kb_filename = "keyboard@2x.png"
kb_image = load_image_file(kb_filename)
if not kb_image:
@se4c0met
se4c0met / ls.php
Created November 23, 2012 09:33
Browse AppFog file system (PHP instance)
<?php
/*
due to the open_basedir restriction, $tgtPath must be something like the following path param:
http://<your domain>.aws.af.cm/ls.php?path=/var/vcap.local/dea/apps/f-0-21341234123412abcdefgc75cc0f96b9/app/
to discover what are the allowed paths, try supplying any path, e.g. '/' then view the error logs via:
af logs <your app name>
*/