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
# If external, don't allow them to log in (won't be able to connect anyway) | |
# (Derived from the data in the 'relay filters' page) | |
RewriteLog /tmp/rewrite_testing | |
RewriteLogLevel 4 | |
RewriteCond %{REQUEST_URI} ^/authentication/login$ [NC] | |
RewriteCond %{REMOTE_ADDR} !^192\.168\.[45]\d\. | |
RewriteCond %{REMOTE_ADDR} !^192\.168\.(71|76|176|86)\. | |
RewriteCond %{REMOTE_ADDR} !^192\.168\.(8|9|11|12|13|14|68|20)\. | |
RewriteRule ^/(.*) https://example.com/usethevpninstead [R] |
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
action.oncefirst( { | |
'cancel' : function(msg) { | |
... | |
}, | |
'error' : function(msg) { | |
... | |
}, | |
'complete;' : function(data) { | |
... | |
} |
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
/* | |
* Created: 26/04/2013 2:57:59 PM | |
*/ | |
#include <avr/io.h> | |
#include <inttypes.h> | |
#include <util/delay.h> | |
#define FCPU 8000000UL | |
#define CHA 1<<0 |
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
# PORTC = 0b00001000; | |
00000053 LDI R24,0x08 Load immediate | |
00000054 OUT 0x08,R24 Out to I/O location | |
# DDRC = 0b0001|(leds[0]?0b0010:0)|(leds[1]?0b0100:0)|(leds[2]?0b1000:0); | |
00000055 LDS R24,0x0104 Load direct from data space | |
00000057 TST R24 Test for Zero or Minus | |
00000058 BREQ PC+0x03 Branch if equal | |
00000059 LDI R24,0x03 Load immediate | |
0000005A RJMP PC+0x0002 Relative jump | |
0000005B LDI R24,0x01 Load immediate |
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
/* | |
* StackManipulation.c | |
* | |
* Created: 27/04/2013 2:34:22 PM | |
* Author: MrTrick | |
*/ | |
#include <avr/io.h> | |
#include <avr/interrupt.h> |
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 bserver_lib_path = APP_PATH + '/var/bserver.js'; | |
var age = Date.now() - (fs.existsSync(bserver_lib_path) && fs.statSync(bserver_lib_path).mtime.getTime()); | |
var bserver = null; | |
if (age < 10000 ) bserver = require(bserver_lib_path); | |
else { | |
console.log("Reloading bserver.js from BSERVER server"); | |
var file = fs.createWriteStream(bserver_lib_path); | |
var request = require('http').get(settings.bserver_server + "/bserver.js", function(response) { | |
response.pipe(file); | |
response.on('end', function() { |
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
void loop() { | |
... | |
if (state == IDLE) { | |
//Start? If an interval is given, and there is no error. | |
if ((digitalRead(RUN_BTN) == HIGH) && (interval != 0) && !has_error) { setState(RUN); beep(); return; } | |
//Are some buttons pressed? Adjust the interval. | |
boolean p1 = (digitalRead(P1_BTN) == LOW); | |
boolean p10 = (digitalRead(P10_BTN) == LOW); |
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
//--------------------------------------------- | |
// Libraries | |
//--------------------------------------------- | |
#include <Wire.h> | |
#include <Adafruit_LEDBackpack.h> | |
#include <Adafruit_GFX.h> | |
#include <Adafruit_MotorShield.h> | |
//--------------------------------------------- | |
// Pin configuration |
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
#include <Wire.h> | |
#include <Adafruit_LEDBackpack.h> | |
#include <Adafruit_GFX.h> | |
#include <Adafruit_MotorShield.h> | |
// Configuration | |
#define AUGER_OUT 1 //M1 on Adafruit V2 motor shield | |
// Variables and Setup | |
Adafruit_7segment time_display = Adafruit_7segment(); |
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
/*************************************************** | |
* THIS FILE HAS BEEN MINIMALLY MODIFIED TO USE | |
* SOFTWARE i2c ALL FEATURES OF THE LIBRARY REMAIN THE SAME, | |
* EXCEPT THAT begin() has signature; | |
* Adafruit_LEDBackpack::begin(const byte sdapin, const byte sclpin, uint8_t _addr = 0x70) | |
*************************************************** | |
This is a library for our I2C LED Backpacks | |
Designed specifically to work with the Adafruit LED Matrix backpacks |