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
So, what did I try? | |
Well, first I tried to find a CMS that didn't need MySQL. Painful. | |
Then, I tried installing MySQL. They have made this very hard to | |
automate. | |
Then, I tried running MySQL in a Docker container. The first annoying | |
thing here was that I needed a specific version of Docker's API but that | |
also meant a specific version of the Python library and adding |
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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>example.lambda</groupId> | |
<artifactId>jisho-b36491</artifactId> | |
<packaging>jar</packaging> | |
<version>1.0-SNAPSHOT</version> | |
<name>jisho-b36491</name> | |
<url>http://maven.apache.org</url> | |
<dependencies> |
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
/* | |
Software serial multple serial test | |
Receives from the hardware serial, sends to software serial. | |
Receives from software serial, sends to hardware serial. | |
The circuit: | |
* RX is digital pin 2 (connect to TX of other device) | |
* TX is digital pin 3 (connect to RX of other device) | |
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
-- Euclid's algorithm for calculating the greatest-common-divisor. | |
gcd :: Integer -> Integer -> Integer | |
gcd x y = | |
if r == 0 then y else (gcd y r) | |
where r = (mod x y) |
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
// A queue of integer values, implemented as a linked-list. | |
// Careful, don't pop the queue if it's empty! | |
// Copyright (c) James Davidson 2015. | |
// Publicly released under the terms of the MIT License. | |
// For educational purposes only, obviously; no warranty implied. | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#include <assert.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
module.exports = function (n,cb) { | |
function helper (sum,i) { | |
if (i == 0) return cb(sum); | |
else process.nextTick( helper.bind(null,sum*i,i-1) ); | |
}; | |
return helper(1,n); | |
} |
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
APPLE AE P AH L | |
ORANGE AO R AH N JH | |
PEAR P EH R | |
MANDARIN M AE N D ER AH N | |
GRAPE G R EY P | |
BANANA B AH N AE N AH |
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
; Retrieve a list of buckets. | |
; Retrieve the access-control-list. | |
; For each, print the owner's display-name. | |
(ns com.example | |
(:use amazonica.core | |
amazonica.aws.s3 | |
clojure.pprint)) | |
(defn retrieve-name [bucket] |
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
; Use Amazonica from https://github.com/mcohen01/amazonica | |
(ns com.example | |
(:use amazonica.aws.ec2 | |
amazonica.aws.s3 | |
amazonica.aws.route53)) | |
(describe-instances) | |
(list-buckets) | |
(map :name (list-buckets)) | |
(list-hosted-zones) |
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
main = mapM_ putStrLn $ take 25 fizzbuzz | |
fizzbuzz = map (\(f,b) -> f ++ b) $ zip fizzes buzzes | |
fizzes = map (moddy "fizz" 3) [1..] | |
buzzes = map (moddy "buzz" 5) [1..] | |
moddy str b i = if i `mod` b == 0 then str else "" |