Skip to content

Instantly share code, notes, and snippets.

View atomize's full-sized avatar
🎹
♩♩

Berti atomize

🎹
♩♩
View GitHub Profile
@atomize
atomize / twitter_processing.pde
Created March 1, 2012 08:10
Processing and Twitter API controlP5 for UI - search and see pretty spiraling #tweets
import processing.opengl.*;
import controlP5.*;
import napplet.test.*;
import napplet.*;
import interfascia.*;
// Twitter #trends visualization - random size, color, alpha - x,y within 500x500 frame... to form the core of RT.pjs
@atomize
atomize / process_webbanner.pde
Created March 1, 2012 08:13
Processing and Twitter - A little animated banner searching for a certain term
//berti thanks Jungho Yeom 2010-11-06
Twitter twitter;
java.util.List statuses = null;
PImage a;
PFont fontA, fontB;
String accessToken = "XXXXXXXXXXXXXXXXXX";
String accessTokenSecrect = "XXXXXXXXXXXXXXXXXX";
String consumerKey = "XXXXXXXXXXXXXXXXXX";
String consumerSecret = "XXXXXXXXXXXXXXXXXX";
@atomize
atomize / iscroll_dynamo.js
Created March 1, 2012 08:29
iScroll - dynamically create scrollable containers that properly refresh with .live()
$('ui-page').live("pageinit", function (event) {
if (undefined == $(this).data('scroll')) {
$(this).data('scroll', new iScroll($(this).find('.ui-wrapper')[0]));
}
}).live("pagehide", function (event) {
$(this).data('scroll').refresh();
$(this).data('scroll').scrollTo(0,0,0);
});
function initScroll() {
@atomize
atomize / zepto_stache.html
Created March 1, 2012 18:59
Zepto Mustache template Yahoo JSON API example
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Zepto Mustache Yahoo JSON</title>
<meta name="author" content="berti" />
<!-- Date: 2012-02-25 -->
</head>
<body>
@atomize
atomize / wgetposterous.sh
Created March 6, 2012 17:18
wget download entire posterous blog
#!/bin/bash
# ./wgetposterous http://www.yourposterousblog.com
wget -r -l inf -k -E -p -nc $1
<html>
<head>
<style>
body {
font: 14px/20px 'Helvetica Neue', Arial, sans-serif;
color: #fff;
background-color:#4fa6b9;
}
@atomize
atomize / responsive_960grid.css
Created March 7, 2012 03:53 — forked from adamjohnson/responsive_960grid.css
The Responsive 960 Grid System, Beta v0.6
/* Begin 960.css 12 and 16 column minified, 10-27-10 via 960-Grid-System at GitHub
* Licensed under GPL and MIT licenses, just like the original 960 Grid
* Adaptive media queries created by Adam Johnson. @adamj_design | http://adamjohnsondesign.com
*/
body{min-width:960px}.container_12,.container_16,.container_24{margin-left:auto;margin-right:auto;width:960px}.grid_1,.grid_2,.grid_3,.grid_4,.grid_5,.grid_6,.grid_7,.grid_8,.grid_9,.grid_10,.grid_11,.grid_12,.grid_13,.grid_14,.grid_15,.grid_16,.grid_17,.grid_18,.grid_19,.grid_20,.grid_21,.grid_22,.grid_23,.grid_24{display:inline;float:left;margin-left:10px;margin-right:10px}.push_1,.pull_1,.push_2,.pull_2,.push_3,.pull_3,.push_4,.pull_4,.push_5,.pull_5,.push_6,.pull_6,.push_7,.pull_7,.push_8,.pull_8,.push_9,.pull_9,.push_10,.pull_10,.push_11,.pull_11,.push_12,.pull_12,.push_13,.pull_13,.push_14,.pull_14,.push_15,.pull_15{position:relative}.container_12 .grid_3,.container_16 .grid_4{width:220px}.container_12 .grid_6,.container_16 .grid_8{width:460px}.containe
@atomize
atomize / saveFrame.pde
Created March 9, 2012 20:58
Processing saveFrame -- watch out... saves a TIFF everytime draw() runs if you run this as is!
color[] cols = new color[2];
int c = 0;
void setup() {
size(100, 100);
cols[0] = color(255, 0, 0);
cols[1] = color(0, 0, 255);
}
void draw() {
@atomize
atomize / username.github.com.text
Created March 10, 2012 18:26
How to setup username.github.com
Instructions for setting up username.github.com *
Create a repo named username.github.com
Push a `master` branch to GitHub and enjoy!
Instructions for setting up username.github.com/repo-name *
Caution: make your working directory clean before you do this (either stash or commit), otherwise this will lose any changes you've made to your project since the last commit.
cd /path/to/repo-name
git symbolic-ref HEAD refs/heads/gh-pages
rm .git/index
git clean -fdx
echo "My GitHub Page" > index.html
@atomize
atomize / Background.md
Created April 8, 2012 21:36
SQLite3 - Create a table with a Column that always holds the CURRENT TIME

#Background: ##SQLite3 - Create a table with a Column that always holds the CURRENT TIME

####tbl_w_currentTimeCol.sqlite

The DEFAULT constraint specifies a default value to use when doing an INSERT. The value may be NULL, a string constant, a number, or a constant expression enclosed in parentheses. The default value may also be one of the special case-independant keywords CURRENT_TIME, CURRENT_DATE or CURRENT_TIMESTAMP. If the value is NULL, a string constant or number, it is inserted into the column whenever an INSERT statement that does not specify a value for the column is executed. If the value is CURRENT_TIME, CURRENT_DATE or CURRENT_TIMESTAMP, then the current UTC date and/or time is inserted into the columns. For CURRENT_TIME, the format is HH:MM:SS. For CURRENT_DATE, YYYY-MM-DD. The format for CURRENT_TIMESTAMP is "YYYY-MM-DD HH:MM:SS".