Skip to content

Instantly share code, notes, and snippets.

dome_height = 14.1;
dome_radius = 53;
propeller_d = 2 * dome_radius;
difference() {
union() {
scale([1,1,dome_height/dome_radius])
sphere(r=dome_radius, $fn=72);
@cdn
cdn / streaming.py
Created January 31, 2016 11:17
current streaming.py detokened [ originally http://paste-app.net/m/kbb-4okq4 ]
#!/usr/bin/env python3
# https://github.com/tweepy/tweepy/raw/master/examples/streaming.py
from __future__ import absolute_import, print_function
from tweepy.streaming import StreamListener
from tweepy import OAuthHandler
from tweepy import Stream
### Keybase proof
I hereby claim:
* I am cdn on github.
* I am cn (https://keybase.io/cn) on keybase.
* I have a public key whose fingerprint is 47DC DE47 23C3 EEA1 6114 2A59 321B 2183 04DF F0CD
To claim this, I am signing this object:
@cdn
cdn / file_upload_sample.py
Last active January 4, 2016 00:19 — forked from mthurman/file_upload_sample.py
Revised gist for newer request
import mimetypes
import pprint
import requests # pip install requests [apt-get install python-pip]
import simplejson as json
from os.path import basename
from os.path import expanduser
base_url = 'https://alpha-api.app.net/stream/0'
token = 'USER ACCESS TOKEN'
@cdn
cdn / AppDotNet-Files_API.php
Last active December 12, 2015 00:18
Functions for file fetch and two-stage upload ...
<?php
// part of the AppDotNetPHP class
// some code bias towards image handling
// ....
/**
* Returns a user's file objects.
@cdn
cdn / gist:4168206
Created November 29, 2012 10:59
Textual emoticons/smilies from various sources
0 Smiley ': )', ': ]'
:-) (:-) :) (-: ^^ :'-) =) ^.^ ^?^ ^-^ :-]
1 Winking '; )'
'-) ;-) ;) ‘-) `-)
2 Tongue
:-p :-P :p :P :b :-b
:p
3 Grin
# xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by failsafeDexconf, using
# values from the debconf database and some overrides to use vesa mode.
#
# You should use dexconf or another such tool for creating a "real" xorg.conf
# For example:
# sudo dpkg-reconfigure -phigh xserver-xorg
Section "Files"
EndSection
# xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by failsafeDexconf, using
# values from the debconf database and some overrides to use vesa mode.
#
# You should use dexconf or another such tool for creating a "real" xorg.conf
# For example:
# sudo dpkg-reconfigure -phigh xserver-xorg
Section "Files"
EndSection
/*
http://a0.twimg.com/a/1268179522/stylesheets/twitter.css?1268181179
.minor-notification{background-color:#e3f1fa;border:solid #c6e4f2;border-width:1px 0;padding:.5em 1em;text-shadow:0 1px 1px rgba(255,255,255,.5);
*/
@-moz-document url-prefix(http://twitter.com/) {
<?php
ini_set('display_errors', 1);
error_reporting(7);
$lastfm_apikey = 'API Key from last.fm/api/account';
$lastfm_user = 'cdn';
// Amazon associate ID [-21 - GBR]
$_amz = 'cdn-21';