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
<?PHP | |
//Executes a CURL request to bitcoin ticket APIs, gets the JSON reply | |
//Todo: API JSON error detection, more sites | |
$bitcoin_sites = array( | |
array( | |
'name' => 'Mt.Gox [Dead]', | |
'coins' => array( | |
array( |
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
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
int main(int argc, char** argv) { | |
//Todo: extract registry value automatically, more validation | |
//Date lives here: | |
//HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\SystemBiosDate |
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
#!/usr/bin/python | |
#Todo: smoother control, need to find optimal rate of movement | |
import serial | |
import math | |
import time | |
import curses | |
#User constants | |
ROBOT_STEP_AMOUNT = 25; |
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
% Values you will most likely want to change: | |
ROBOT_STEPS = 20; | |
COM_PORT = 'COM9'; | |
POLL_RATE = 0.1; | |
% Set up joystick | |
disp('Connecting to Xbox Controller... '); | |
XBOX_CONTROLLER = vrjoystick(1); | |
disp(caps(XBOX_CONTROLLER)); | |
%disp(INSTRFIND); |
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
#include <Adafruit_NeoPixel.h> | |
#define PIN 4 | |
// Parameter 1 = number of pixels in strip | |
// Parameter 2 = pin number (most are valid) | |
// Parameter 3 = pixel type flags, add together as needed: | |
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs) | |
// NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers) | |
// NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products) |
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
const int TRIGGER_PIN = 8; | |
const double HIGH_TIME = .012; | |
const int LOW_TIME = 10; | |
const int PULSE_DELAY = 98; | |
const int GROUP_DELAY = 920; | |
void setup() { | |
TRIGGER_PINMode(TRIGGER_PIN, OUTPUT); | |
} |
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
var fizz_buzz = function(count) { | |
for (var i = 1; i <= count; i++) { | |
var output = i; | |
var fizz = false; | |
if (i % 3 == 0) { | |
output = 'Fizz'; | |
fizz = true; | |
} |
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
function add(num1, num2) { | |
chain = function(num2) { return num1 + num2 }; | |
if (num2) { | |
return chain(num2) | |
} else { | |
return chain | |
} | |
}; |
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
/* | |
Gur qrpvzny mvc bs gjb aba-artngvir vagrtref N naq O vf na vagrtre P jubfr | |
qrpvzny ercerfragngvba vf perngrq sebz gur qrpvzny ercerfragngvbaf | |
bs N naq O nf sbyybjf: | |
• gur svefg (v.r. gur zbfg fvtavsvpnag) qvtvg bs P vf gur svefg qvtvg bs N; | |
• gur frpbaq qvtvg bs P vf gur svefg qvtvg bs O; | |
• gur guveq qvtvg bs P vf gur frpbaq qvtvg bs N; | |
• gur sbhegu qvtvg bs P vf gur frpbaq qvtvg bs O; | |
• rgp. | |
Vs bar bs gur vagrtref N naq O ehaf bhg bs qvtvgf, gur erznvavat qvtvgf bs |
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
diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme | |
index 103041e..079ed90 100644 | |
--- a/themes/agnoster.zsh-theme | |
+++ b/themes/agnoster.zsh-theme | |
@@ -164,7 +164,7 @@ prompt_hg() { | |
# Dir: current working directory | |
prompt_dir() { | |
- prompt_segment blue black '%~' | |
+ prompt_segment blue white '%~' |
OlderNewer