Instantly share code, notes, and snippets.

View twittercard.js
/*
A copy of https://gist.github.com/airhadoken/8742d16a2a190a3505a2
See also: https://botwiki.org/bots/twitterbots/emoji__polls/
*/
var T = require("twit");
var Q = require("Q");
// key and secret for Twitter for iPhone.
// A whitelisted app is needed to access the cards API; you can't just create your own currently.
View twitter-poll.py
# Original: https://paste.wuffs.org/raw/160201.220633.4garttu6
from twitter import *
import json
import sys
import mysql.connector
import random
conn = mysql.connector.connect(user='wikistuff', password='ffutsikiw', unix_socket='/var/run/mysqld/mysqld.sock', database='wikistuff')
c = conn.cursor()
View getweatherforlocation.php
<?php
if (isset($_REQUEST["owapikey"]) && isset($_REQUEST["units"]) && isset($_REQUEST["location"])){
$owapikey = $_REQUEST['owapikey'];
$units = $_REQUEST['units'];
$location = $_REQUEST['location'];
$request = json_decode(file_get_contents("http://api.openweathermap.org/data/2.5/weather?q={$location}&units={$units}&APPID={$owapikey}"));
$weather = array(
View getlocationandweather.php
<?php
if (isset($_REQUEST["owapikey"]) && isset($_REQUEST["units"])){
$ip = $_SERVER['REMOTE_ADDR'];
$owapikey = $_REQUEST['owapikey'];
$units = $_REQUEST['units'];
// $request = json_decode(file_get_contents("http://smart-ip.net/geoip-json/{$ip}"));
$latitude = $request->latitude;
View keybase.md

Keybase proof

I hereby claim:

  • I am fourtonfish on github.
  • I am fourtonfish (https://keybase.io/fourtonfish) on keybase.
  • I have a public key whose fingerprint is 08E6 1F26 D587 2E83 D671 215C D02B E80F 2CA4 FC74

To claim this, I am signing this object: