Skip to content

Instantly share code, notes, and snippets.

View turingsubtraction.yaml
name: binary increment
source code: |
# Adds 1 to a binary number.
input: '111101111'
blank: '0'
start state: right
table:
# scan to the rightmost digit
right:
0: {R: checkdone}
View bruce.java
package org.usfirst.frc.team295.robot;
import com.ctre.CANTalon;
import edu.wpi.first.wpilibj.Compressor;
import edu.wpi.first.wpilibj.DoubleSolenoid;
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.Joystick;
View compressorforklift.java
package org.usfirst.frc.team295.robot;
import edu.wpi.first.wpilibj.Compressor;
import edu.wpi.first.wpilibj.DoubleSolenoid;
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Talon;
View Robot.java
package org.usfirst.frc.team295.robot;
import edu.wpi.first.wpilibj.SampleRobot;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.Victor;
import edu.wpi.first.wpilibj.VictorSP;
@davidtsong
davidtsong / naut.css
Created Jul 10, 2015
Naut for Reddit .css for any subreddit
View naut.css
/*
Version 3.2
Stylesheet by Cryptonaut
Last modified: 01 MAY 2015
Details: This is a custom template made by /u/Cryptonaut.
Find out more on /r/Naut.
--------------------------------------------------------------------------
Just put this entire file into your Stylish Config
-------------------------------------------------------------------------- */
View keybase.md

Keybase proof

I hereby claim:

  • I am davidthesong on github.
  • I am davidsong (https://keybase.io/davidsong) on keybase.
  • I have a public key whose fingerprint is E420 A145 798A C8A7 3833 6313 F8C7 5505 330D F700

To claim this, I am signing this object:

@davidtsong
davidtsong / db.json
Created Jan 25, 2015
The json format standard for my application.
View db.json
{
"users":{
"akash":{
"age": 18,
"status": true,
"location":{
"long": 123,
"lat": 123
},
"email":"scrub@scrubmail.com",
@davidtsong
davidtsong / abstract.java
Created Jun 3, 2014
Java Abstract Class
View abstract.java
//Abstract concepts in OOP
public abstract class Food()
{
public abstract prepare()
{
}
}
View interface.java
public interface myInterface{
int constant;
String constant2;
void Method()
{
}
int intMethod()
{
@davidtsong
davidtsong / RunnableImplement.java
Created May 26, 2014
Create a thread by implementing a runnable
View RunnableImplement.java
public interface Runnable{
public void run();
}
public class MyRunnable() implements Runnable
{
public void run()
{
//Todo Code here
}