Skip to content

Instantly share code, notes, and snippets.

View funkatron's full-sized avatar

Ed Finkler funkatron

View GitHub Profile
@funkatron
funkatron / redesign-idea2.html
Created January 7, 2011 17:39
shows some super fancy text kerning and positioning and shit. Uses jquery.lettering.js
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Page Title</title>
<link href='http://fonts.googleapis.com/css?family=Cardo:regular"' rel='stylesheet' type='text/css'>
<style type="text/css" media="screen">
BODY {
background-color:#999;
font-family:Cardo;
var resizeHandle = document.getElementById('resize-se');
resizeHandle.addEventListener('mousedown', function (e){
var isDragging = true;
var mousePosition = {x:event.clientX, y:event.clientY};
document.addEventListener('mousemove', drag, false);
document.addEventListener('mouseup', function (e){
document.removeEventListener('mousemove', drag, false);
document.removeEventListener('mouseup', arguments.callee, false);
var AppThemes = {
"Dreadnaught":{
"stylesheet":"Dreadnaught.css",
"palmtheme":'dark'
},
"Clean":{
"stylesheet":"Clean.css",
"palmtheme":'light'
}
};
var AppThemes = {
"Dreadnaught":{
"stylesheet":"Dreadnaught.css",
"palmtheme":'dark'
},
"Clean":{
"stylesheet":"Clean.css",
"palmtheme":'light'
},
"My Cool Theme":{
@funkatron
funkatron / chrometest.sh
Created February 9, 2011 15:20
To do testing on local HTML/JS apps in Chrome, I start it with this script to disable some security checks.
#!/bin/bash
# USAGE: /path/to/chrometest <localfile.html>
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
--disable-web-security \
--allow-file-access-from-files \
--allow-file-access \
--log-level 3 \
$@
@funkatron
funkatron / spaz_pullreq_stfu_120x90.html
Created March 3, 2011 19:58
HTML fragment for "Pull Request or STFU" shirt ad
<a href="http://spaz.spreadshirt.com" target="_blank"><img src="http://funkatron.com/images/pullreq_or_STFU_120x90.gif" width="120" height="90"></a>
<?php
// hey dude
$boom = 'flazm';
$heydude = function ($name) use ($boom) {
echo "Hey {$name}: {$boom}";
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Page Title</title>
<script src="http://ajax.cdnjs.com/ajax/libs/json2/20110223/json2.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script src="http://ajax.cdnjs.com/ajax/libs/less.js/1.0.41/less-1.0.41.min.js"></script>
<script src="http://ajax.cdnjs.com/ajax/libs/underscore.js/1.1.4/underscore-min.js"></script>
@funkatron
funkatron / spaz-webos-servicecall.js
Created March 11, 2011 01:12
This is an example of how you could make a service call to multiple appids, exiting on the first one that succeeds
function callSpaz(serviceParams, onFailure) {
var appids = ['com.funkatron.app.spaz-sped', 'com.funkatron.app.spaz', 'com.funkatron.app.spaz-beta'], index = 0;
function makeCall() {
if (index < appids.length) {
Mojo.Log.info('Trying to post with appid %s', appids[index]);
var request = new Mojo.Service.Request("palm://com.palm.applicationManager", {
@funkatron
funkatron / identica_cleaner.css
Created March 16, 2011 02:09
a "cleaner" look for identi.ca, usable as a CSS override style (Stylish, et al)
body {
font-family: "Helvetica", "Arial", sans-serif;
font-size: 1em;
background: #f2f2f2;
margin: 0;
padding: 0;
color: #666;
}