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 / ec2startup.sh
Created April 29, 2015 17:39
EC2 Startup Shell Script
#!/bin/bash
# Simple setup.sh for configuring Ubuntu 12.04 LTS EC2 instance
# for headless setup.
# Install nvm: node-version manager
# https://github.com/creationix/nvm
sudo apt-get install -y git
sudo apt-get install -y curl
curl https://raw.github.com/creationix/nvm/master/install.sh | sh
// vibrate can be 1, 2, 3
{"content":"Hello John,\nWelcome to Cards for Pebble!\n\nUpdated:\nSat, 30 May 2015 08:05:43 -0400","refresh_frequency":10,"vibrate":"1"}
@jonkiddy
jonkiddy / s3_butckets.php
Created July 11, 2015 18:40
Some example of dealing with objects in S3 buckets.
// https://docs.aws.amazon.com/aws-sdk-php/guide/latest/service-s3.html#uploading-a-file
/**
* set key & secret
*/
$client = S3Client::factory(array(
'key' => ‘YOUR-KEY’,
'secret' => ‘YOUR-SECRET’
));
#!/usr/bin/env php
<?php
// lists netbeans projects and shows current branch for each
$user = get_current_user();
$dir = scandir("/Users/$user/NetBeansProjects");
foreach ($dir as $d) {
if (!in_array($d, ['.', '..']) && strpos($d, '-nb') == false) {
$data = shell_exec("cd /Users/$user/NetBeansProjects/$d && git status");
$lines = explode("\n", $data);
print_r(str_replace('On branch ', '', $lines[0]) . ' ' . $d);

Settings

  • Firefox: about:config browser.sessionstore.interval 2700000
# Updating NPM
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
@jonkiddy
jonkiddy / Robot.java
Created January 25, 2017 17:24
Possible CameraServer code for use with the SmartDashboard
package org.usfirst.frc.team4930.robot;
import edu.wpi.first.wpilibj.SampleRobot;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj.CameraServer;
import edu.wpi.cscore.UsbCamera;
public class Robot extends SampleRobot {
@jonkiddy
jonkiddy / config.json
Last active February 11, 2017 15:25
Git Issue Creator
{
"projects_path": "PROJECTS",
"github": {
"username": "YOUR_GITHUB_USERNAME",
"email": "YOUR_EMAIL@gmail.com",
"token": "GITHUB_TOKEN"
}
}
# bash/zsh completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
# *) local and remote branch names
# *) local and remote tag names
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="12">
<profile kind="CodeFormatterProfile" name="4930-StyleGuide" version="12">
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>