This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# feel free to pull request | |
*.PCBDoc.htm | |
*.PCBDocPreview | |
*.PrjPrbStructure | |
*.SchDocPreview | |
*.SchDotPreview | |
*.cmp | |
*.swp | |
History | |
Project Logs* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Blink | |
Turns on an LED on for one second, then off for one second, repeatedly. | |
you connect the leds to | |
pin 13 and gnd | |
connect another to | |
pin 3, pin 4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#check if numeric | |
is_numeric() { | |
if [ "$1" -eq "$1" ] 2> /dev/null; then | |
return 0 | |
else | |
echo "Error, time input \"$1\" not int, see -h for help" | cowsay -f tux | |
exit 1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
au BufWinLeave ?* mkview | |
au BufWinEnter ?* silent loadview |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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' | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.a1_awesome_intents; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.view.Menu; | |
import android.view.View; | |
import android.widget.Button; | |
public class MainActivity extends Activity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
Button doStuffButton = (Button) findViewById(R.id.do_stuff_button); | |
TextView myTextView = (TextView) findViewById(R.id.textView1); | |
//remember lowerCamelCase for buttons | |
doStuffButton.setOnClickListener(new View.OnClickListener() { | |
//here we send the user to the next activity |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.swing.*; | |
import java.awt.*; | |
import java.awt.event.*; | |
public class SwingHelloWorld extends JFrame{ | |
public static void main(String[] args){ | |
SwingHelloWorld frame = new SwingHelloWorld("Hello"); | |
frame.setSize(500,500); | |
frame.setVisible(true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
char ch; | |
void setup() { | |
pinMode(13, OUTPUT); | |
Serial.begin(9600); | |
} | |
void loop() { | |
if (Serial.available()) { |
NewerOlder