Skip to content

Instantly share code, notes, and snippets.

View jonkiddy's full-sized avatar
🏠
Coffee + Music - Interruptions = Code

Jon Kiddy jonkiddy

🏠
Coffee + Music - Interruptions = Code
View GitHub Profile
@jonkiddy
jonkiddy / retirement.php
Created July 31, 2012 15:21
simple retirement calculator function
function retirement($salary, $years=30, $raise=1.029655){
$total = 0;
$data = array();
$format = '%=*(#10.2n';
setlocale(LC_MONETARY, 'en_US');
for($i=1;$i<=$years;$i++){
$salary = $salary*$raise;
$data[$i] = money_format($format, $salary);
$total = $total + $salary;
}
@jonkiddy
jonkiddy / countdown_div.html
Created August 7, 2012 15:05
JS Countdown Placement Holder
<div id="countdown" style="position:absolute;padding-top:410px;padding-left:555px;">
<div id="thecount" style="color:white;font-size:28px;font-family:Arial;font-weight:bold;"></div>
<script type="text/javascript">
//change the text below to reflect your own,
var before="Christmas!"
var current="Today is Christmas. Merry Christmas!"
var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
function countdown(yr,m,d){
theyear=yr;themonth=m;theday=d
@jonkiddy
jonkiddy / gist:3594120
Created September 2, 2012 02:30
quick graph based off of an array
public function graph($data){
// Get the total number of columns we are going to plot
$columns = count($data);
// Get the height and width of the final image
$width = 300;
$height = 200;
@jonkiddy
jonkiddy / 2013 FIRST Robotics Competition
Created February 3, 2013 05:15
A short collection of links to various topics related to the 2013 FIRST Robotics Competition.
2013 FIRST QA PDF
https://frc-qa.usfirst.org/ViewPDF/58/58_f09a7fe71f98821
FIRST "Ultimate Accent" 2013 intro/overview video
http://www.youtube.com/watch?v=wa5MGEZNrf0&list=PLZT9pIgNOV6b6ucRIEbEm45PCsFTOmhlb
Technical Resources for FIRST Robotics Competition
http://www.usfirst.org/roboticsprograms/frc/2013-Technical-Resources
@jonkiddy
jonkiddy / first_robotic_useful_links.html
Last active December 23, 2015 16:59
Useful FIRST Robotic Links
@jonkiddy
jonkiddy / Preferences.sublime-settings
Last active July 23, 2018 15:01
Sublime Text Preferences
keymap:
[
// Sublime
{ "keys": ["super+shift+i"], "command": "reindent" },
{ "keys": ["super+shift+o"], "command": "expand_tabs" },
{ "keys": ["command+shift+k"], "command": "toggle_side_bar" },
// PHP Companion
{ "keys": ["super+shift+u"], "command": "find_use" },
{ "keys": ["super+shift+n"], "command": "insert_php_constructor_property" },
@jonkiddy
jonkiddy / gist:e830ce2f525ba5169114
Created September 4, 2014 20:24
Controlling top bar in Phonegap app.
In MainViewController.m inside: - (void)viewWillAppear:(BOOL)animated add this:
//Lower screen 20px on ios 7
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
CGRect viewBounds = [self.webView bounds];
viewBounds.origin.y = 18;
viewBounds.size.height = viewBounds.size.height - 18;
self.webView.frame = viewBounds;
}
@jonkiddy
jonkiddy / table.md
Last active August 29, 2015 14:07
Table using markdown.
Header 1 Header 2
More data Some data
Random data Extra data
Associated data My data
Even more data Your data
---
aamu.edu: Alabama A&M University
ab.edu: Alderson Broaddus University
acu.edu: Abilene Christian University
adelphi.edu: Adelphi University
aic.edu: American International College
alaska.edu: University of Alaska System
alasu.edu: Alabama State University
albany.edu: University at Albany
albion.edu: Albion College
@jonkiddy
jonkiddy / gist:ac4a1477974e78fc1df4
Created February 24, 2015 19:55
jQuery-Mobile + Phonegap
// Correct way of using JQuery-Mobile/Phonegap together?
// the order of declaring script matters. First include jquery, THEN THIS CODE inside a script element, then jquery mobile js
var deviceReadyDeferred = $.Deferred();
var jqmReadyDeferred = $.Deferred();
document.addEventListener("deviceReady", deviceReady, false);
function deviceReady() {