This file contains 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 java.io.*; | |
import java.net.*; | |
public class Main { | |
public static void main(String... args) throws IOException { | |
try ( | |
BufferedReader controller = new BufferedReader(new FileReader("/dev/cu.usbserial-A601EQIH"))) { | |
controller |
This file contains 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
/ source("http://s3-eu-west-1.amazonaws.com/your.bucket.name/index.html") | |
/{+path} source("http://s3-eu-west-1.amazonaws.com/your.bucket.name/{+path}") |
This file contains 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
GZIPOutputStream zip = new GZIPOutputStream(outputStream){{def.setLevel(Deflater.BEST_COMPRESSION);}}; |
This file contains 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
# On branch master | |
# Your branch is ahead of 'origin/master' by 4 commits. | |
# (use "git push" to publish your local commits) | |
# | |
# Changes not staged for commit: | |
# (use "git add/rm <file>..." to update what will be committed) | |
# (use "git checkout -- <file>..." to discard changes in working directory) | |
# | |
# deleted: "e\314\201tude de marche\314\201.md" | |
# deleted: "\303\251tude de march\303\251.md" |
This file contains 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
// Reads temperature from TMP36 sensor (from SparkFun electronics) on Arduino Pro Mini 3.3V 8MHz | |
// Reports the readings to serial port | |
// Plug Vcc of sensor to digital 12 | |
// Plug Gnd of sensor to gnd of the board | |
// Plug Vout of sensor to analog 0 | |
// Monitoring diode (digital 13) blinks while sensor is being read | |
const int power = 12; | |
const int monitor = 13; | |
const int analog = A0; | |
const int serialRate = 9600 * 4; |
This file contains 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
let a := "My cool, brand new, bootstrap 2.1 based website", | |
let b := "Some nastyness when resizing lower or over the usual dimensions", | |
let c := "The GitHub repository holding all of my new website related stuff", | |
led d := "A nice pull request to fix all of " + a + b " on " + c", | |
led e := "A super reward for the man who submit " + d |
This file contains 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
/** | |
* Retrieves all descendants in breadth-first enumeration. | |
* Ordering for a particular level is undetermined. | |
*/ | |
public List<Folder> getDescendants() { | |
List<Folder> folders = new ArrayList<Folder>(getChildren()); | |
int i = 0; | |
while(i < folders.size()) { | |
Folder folder = folders.get(i); | |
folders.addAll(folder.getChildren()); |
This file contains 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
/* | |
ChuckNorrisException Java Puzzle | |
You should be able to say which of the two proposition below is true: | |
a) The program prints "Norris caught the exception" | |
b) The program prints "Chuck Norris only can catch ChuckNorrisExceptions" | |
If you can't, run the program, and try to be ChuckNorris: Catch the exception for yourself | |
*/ | |
import java.util.Map; | |
import java.util.HashMap; |
This file contains 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 com.amazonaws.auth.PropertiesCredentials; | |
import com.amazonaws.services.ec2.AmazonEC2; | |
import com.amazonaws.services.ec2.AmazonEC2Client; | |
import com.amazonaws.services.ec2.model.RunInstancesRequest; | |
import java.io.File; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import org.apache.commons.codec.binary.Base64; | |
/** |