Skip to content

Instantly share code, notes, and snippets.

View a-r-d's full-sized avatar
🍌

Aaron Decker a-r-d

🍌
View GitHub Profile
@a-r-d
a-r-d / simpletimer.js
Created May 12, 2012 00:29
JS timer. Plain text. Uses jQuery.
// A timer that uses jQuery only cause I'm lazy...
// Include the jQuery lib and
// set a div to id='timerArea' and it will render
// a timer that counts down from the following date settings:
//Set up your timer!
timerLocation = "#timerArea";
timerYear = 2013;
timerMonth = 5;
@a-r-d
a-r-d / numBg.js
Created May 21, 2012 01:42
jQuery plugin: Fills the background with nums when called. Was bored @ work.
// Numbers BG jQuery Plugin
/*
Who:
Aaron Decker
me@a-r-d.me
MIT license
What is this:
Just a silly self contained jQuery plugin that
will cause the background of the screen to be filled
@a-r-d
a-r-d / 10leds.ino
Created June 2, 2012 06:07
10 LED bar graph code for Arduino uno.
/*
Little code for my 10 LED bar graph.
This is just a basic outline for making all the segments light up at diff. intervals.
looks OK but not super organized.
*/
int numPins = 10;
int ledPins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
int ledStates[] = {LOW, LOW, LOW, LOW, LOW, LOW, LOW, LOW, LOW, LOW};
@a-r-d
a-r-d / 10ledPoten.ino
Created June 2, 2012 08:17
10 LED bar graph controlled by potentiometer- arduino uno
/*
Reads input from a 10,000 ohm potentiometer.
Lights up an array of ten LEDs based on how much signal is going through.
*/
int numPins = 10;
int ledPins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
int ledStates[] = {LOW, LOW, LOW, LOW, LOW, LOW, LOW, LOW, LOW, LOW};
// Analog pin A0 is where you hook the potentiometer up. Or microphone. Or w/e.
@a-r-d
a-r-d / Readme.md
Created June 3, 2012 18:41
Push email to arduino-> to LED ASCII display
@a-r-d
a-r-d / CustomAwesomeEvent.as
Created June 22, 2012 02:58
Custom event dispatching example Flash Builder 4.6
package myEvents
{
import flash.events.Event;
public class CustomAwesomeEvent extends Event
{
public static const ENABLE_CHANGED:String = "enableChanged";
public function CustomAwesomeEvent(type:String, isEnabled:Boolean=false)
@a-r-d
a-r-d / signup.php
Created July 7, 2012 19:52
Form validation using dynamic event handlers. jQuery $.each() and bind()
<script type='text/javascript'>
// the validate.js content goes here.
</script>
<p>
<button value='' onClick='testFormValidation()'>fill with test data</button>
<br />
<button value='' onClick='clearForm()'>Clear Form Data</button>
</p>
@a-r-d
a-r-d / appFile.mxml
Created October 15, 2012 00:39
Dealing with Screen Resolution in FLEX android apps
<?xml version="1.0" encoding="utf-8"?>
<s:ViewNavigatorApplication name="DodgeABroApp"
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" firstView="views.DodgeABroHomeView"
applicationDPI="160"
applicationComplete="tabbedviewnavigatorapplication1_applicationCompleteHandler(event)"
frameRate="40"
resizeForSoftKeyboard="true"
>
<fx:Declarations>
@a-r-d
a-r-d / 513.py
Created October 29, 2012 18:28
generate all phones in area code
def main():
f = open("phonenums.txt", "w")
start = 513000000
while(start < 514000000):
f.write("%s\n" % start)
start += 1
f.close()
main()
@a-r-d
a-r-d / split_csv_to_files.py
Created November 6, 2012 22:15
Takes a big long CSV, splits in more CSVs by sorting uniques in a column
#windows :)
#
# split_csv_to_files.py
# ard - me@a-r-d.me
#
# Example usage:
# python .\csv_sort.py -i test.csv -o testing --col 12
#
# Why?
# -Lets say you have a dump of clients or contacts and want to organize them all by state city or company