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
| public float getCpuTemp() { | |
| Process p; | |
| try { | |
| p = Runtime.getRuntime().exec("cat sys/class/thermal/thermal_zone0/temp"); | |
| p.waitFor(); | |
| BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream())); | |
| String line = reader.readLine(); | |
| float temp = Float.parseFloat(line) / 1000.0f; |
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
| var db = require("redis-client").createClient(); | |
| require("http").createServer(function(request, response) { | |
| db.incr("count",function(err, reply) { | |
| response.writeHead(200, { "Content-Type": "text/plain" }); | |
| response.write(reply.toString()); | |
| response.end(); | |
| }); | |
| }).listen(8181); |
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
| error_page 400 404 405 =200 @40*_json; | |
| location @40*_json { | |
| default_type application/json; | |
| return 200 '{"code":"1", "message": "Not Found"}'; | |
| } | |
| error_page 500 502 503 504 =200 @50*_json; | |
| location @50*_json { |
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
| var pattern = /^[a-z][a-z0-9_]*(\.[a-z0-9_]+)+[0-9a-z_]$/i; | |
| [ | |
| "me.unfollowers.droid", | |
| "me_.unfollowers.droid", | |
| "me._unfollowers.droid", | |
| "me.unfo11llowers.droid", | |
| "me11.unfollowers.droid", | |
| "m11e.unfollowers.droid", | |
| "1me.unfollowers.droid", |
- Download the perforce visual tool suite from here: http://www.perforce.com/perforce/downloads/index.html
- Copy only the p4merge.app file into your /Applications/ directory
Subscriptions with stripe
Code examples use the stripe ruby gem. Most of the links are to stripe's documentation.
![stripe's object model][stripe_object_model_diagram]
To start, create some plans.