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
package main | |
import "net/http" | |
func main() { | |
panic(http.ListenAndServe(":8080", http.FileServer(http.Dir(".")))) | |
} |
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
// readCapacitivePin | |
// Input: Arduino pin number | |
// Output: A number, from 0 to 17 expressing | |
// how much capacitance is on the pin | |
// When you touch the pin, or whatever you have | |
// attached to it, the number will get higher | |
#include "pins_arduino.h" // Arduino pre-1.0 needs this | |
uint8_t readCapacitivePin(int pinToMeasure) { | |
// Variables used to translate from Arduino to AVR pin naming | |
volatile uint8_t* port; |
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 module for using AES encryption with ruby from | |
# http://www.brentsowers.com/2007/12/aes-encryption-and-decryption-in-ruby.html | |
require 'openssl' | |
require "base64" | |
module AESCrypt | |
# Decrypts a block of data (encrypted_data) given an encryption key | |
# and an initialization vector (iv). Keys, iv's, and the data | |
# returned are all binary strings. Cipher_type should be | |
# "AES-256-CBC", "AES-256-ECB", or any of the cipher types |