Skip to content

Instantly share code, notes, and snippets.

View atypical's full-sized avatar

MDavid Low atypical

View GitHub Profile
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
var Kinvey = require('/services/kinvey-titanium-0.9.10');
//
// create base UI tab and root window
//
var win = Titanium.UI.createWindow({
title : 'Tab 1',
backgroundColor : '#fff'
});
//
// http://devcenter.kinvey.com/titanium/
//
var Kinvey = require('kinvey-titanium-0.9.14');
// new appcelerator facebook module
var FB = require('facebook');
// my good friend momentjs
var moment = require('moment');
/**
*
* this code was inspired by the work done by David Riccitelli
*
* Copyright 2011 Aaron K. Saunders, Clearly Innovative Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
@atypical
atypical / kbd.md
Created August 12, 2013 21:31 — forked from jakebellacera/kbd.md

Use this shortcut to make your computer faster: ⌥+⇧+⌘+Q

@atypical
atypical / gist:4347485
Created December 20, 2012 18:25
// Plugin definition
// Plugin definition
$.fn.moduleName = function( options ) {
var args = Array.prototype.slice.call( arguments, 1 );
return this.each(function() {
var self = $(this),
moduleName = self.data('moduleName');
// If we don't have a stored moduleName, make a new one and save it
if ( !moduleName ) {
moduleName = new ModuleName( self, options );
@atypical
atypical / redirect.js
Created September 4, 2012 23:21
iPhone / iPod / iPad / Android Redirect JS
<script type="text/javascript"> // <![CDATA[
if ((navigator.userAgent.indexOf('iPhone') != -1) || (navigator.userAgent.indexOf('iPod') != -1)) {
document.location = "vx_iphone_experience";
} // ]]>
if ((navigator.userAgent.indexOf('iPad') != -1)) {
document.location = "vx_ipad_experience";
} // ]]>
if ( (navigator.userAgent.indexOf('Android') != -1) ) {
document.location = "vx_iphone_experience";
} // ]]>
@atypical
atypical / Fuck WIND
Created July 4, 2012 02:25
FUCK WIND
long pulsewidth1;
float wspeed1;
void setup()
{
Serial.begin(9600);
pinMode(13,INPUT); //Anemometer 1
}
<!DOCTYPE html>
<html>
<head>
<title>Dope</title>
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script src="js/wait.js"></script>
<script type="text/javascript" language="javascript">
$(function() {
@atypical
atypical / ad
Created April 27, 2012 20:30
ad
<form action="url/servo.php?servo=0&position=<? echo $position; ?>" method="post">
<input type="range" min="0" max="180" value="0" step="1" onchange="showValue(this.value)" / style="width:75%; margin:100px auto;">
<input type="submit" name="button" />
</form>
<span id="range">0</span>
<script type="text/javascript">
function showValue(newValue)
{
@atypical
atypical / teleduino.php
Created April 27, 2012 20:10
teleduino
<?php
include_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'_config.php');
include_once(dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR.'teleduino328_php.php');
if(isset($_SERVER['HTTP_HOST']))
{
echo "<pre>";
}
$Teleduino328PHP = new Teleduino328PHP();