Skip to content

Instantly share code, notes, and snippets.

@gskielian
gskielian / git-specify-ssh-key
Created October 14, 2014 16:51
Specifying SSH Key within Git Clone
#how to specify an ssh key to use when cloning a repo in Mac
ssh-agent bash -c 'ssh-add /Users/UR_USERNAME/.ssh/UR_PRIVATE_KEY; git clone git@DAS_GIT_URL'
@gskielian
gskielian / Mario.ino
Created August 1, 2013 21:44
Mario Theme in Arduino: )
tone(9,660,100);
delay(150);
tone(9,660,100);
delay(300);
tone(9,660,100);
delay(300);
tone(9,510,100);
delay(100);
tone(9,660,100);
delay(300);
@gskielian
gskielian / watchdog.sh
Created April 8, 2018 19:16
Forever Start @reboot
#!/bin/bash
# usage, replace the <path to app.js file> with full path to your node app
# set crontab to @reboot <full path to this script>
# make sure to chmod +x this script to make it runnable
export PATH=/usr/local/bin:$PATH
if [ `/usr/local/bin/forever list | /usr/bin/wc -l` -le 1 ]; then
/usr/local/bin/forever start <path to app.js file>
fi
@gskielian
gskielian / .gitignore
Created April 1, 2018 20:40
Altium Gitignore
# feel free to pull request
*.PCBDoc.htm
*.PCBDocPreview
*.PrjPrbStructure
*.SchDocPreview
*.SchDotPreview
*.cmp
*.swp
History
Project Logs*
# Utilities for quickly accessing frequently used directories in bash.
# Usage:
# $ cd /path/to/project/src/
# $ mark code # Will create a new shortcut.
# # Becomes interactive if a shortcut already exists
# # m is an alias for mark. You can also `m code`
#
# $ code # From now on, running this anywhere in the shell
# # will put you in /path/to/project/src/code
@gskielian
gskielian / Joystick with Click
Created August 7, 2013 17:51
How to make a Joystick with Click
int xPos = 0;
int yPos = 0;
int xCal;
int yCal;
void setup()
{
Mouse.begin();
delay(1000);
@gskielian
gskielian / Freq2Arduino
Created August 1, 2013 21:50
freq to arduino
cat freq.txt | sed 's/ /,/g' | sed 's/[^0-9,d]//g' | sed 's/^,/tone(9,/g' | sed 's/$/);/g' | sed 's/d,/delay(/g' | sed 's/^);//g' >gist.txt
@gskielian
gskielian / Freq2Arduino
Created August 1, 2013 21:50
freq to arduino
cat freq.txt | sed 's/ /,/g' | sed 's/[^0-9,d]//g' | sed 's/^,/tone(9,/g' | sed 's/$/);/g' | sed 's/d,/delay(/g' | sed 's/^);//g' >gist.txt
@gskielian
gskielian / GetTheGist?
Created July 22, 2013 15:46
Example of a Gist
Some Code Here
@gskielian
gskielian / CollisionLoadLevel.js
Created July 22, 2013 03:19
How to load a level upon collision.
#pragma strict
function OnTriggerEnter (col : Collider)
{
Application.LoadLevel(1); //loads level 1 when some object collides with this object's box-collider (added via the physics sub-menu)
}