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
#!/bin/bash | |
#set -e | |
#set -x | |
fail() { | |
echo $1 | |
[ -e ${EBS_DEVICE} ] && [ "$VOLUME_ID" != "" ] && [ $REGION != "" ] && { | |
ec2-detach-volume --region $REGION $VOLUME_ID | |
ec2-delete-volume --region $REGION $VOLUME_ID |
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 Control.Concurrent (forkIO) | |
import Control.Monad (forever) | |
import Network | |
import System.IO | |
import System.Random | |
rand :: Int -> IO Int | |
rand p = getStdRandom (randomR (0, p)) | |
fortune :: [String] -> (Handle, HostName, PortNumber) -> IO () |
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
CFLAGS = -g -Wall | |
all : problem_7 | |
problem_7 : problem_7.c | |
$(CC) $(CFLAGS) -o $@ $< -lm |
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 <Wire.h> | |
#include <Adafruit_NeoPixel.h> | |
#include <Adafruit_Sensor.h> | |
#include <Adafruit_TSL2561.h> | |
#define PIN 6 | |
#define MINIMUM_LUX 20 | |
// Parameter 1 = number of pixels in strip | |
// Parameter 2 = pin number (most are valid) |
NewerOlder