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
# Elixir Enigma Machine Simulator | |
# August 2016 | |
# Mike Boone | |
# https://github.com/boone | |
# https://twitter.com/boonedocks | |
# Trying to learn Elixir by modeling an Enigma machine, inspired by the Ruby | |
# code written by @albert_still in: | |
# http://red-badger.com/blog/2015/02/23/understanding-the-enigma-machine-with-30-lines-of-ruby-star-of-the-2014-film-the-imitation-game |
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
<?php | |
// $Id: image.module,v 1.197.2.1 2006/07/13 15:42:33 walkah Exp $ | |
// Modified to use filemanager.module | |
// by Mike Boone (contact me at: http://boonedocks.net/mailmike.php) | |
// Version 0.1, 2006-08-27 | |
// | |
// Version History | |
// 0.1, 2006-08-27, first working version | |
// | |
// I borrowed some ideas from this code: |
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
<?php | |
/* | |
Banker's Rounding v1.01, 2006-08-15 | |
Copyright 2006 Michael Boone | |
[email protected] (remove the X) | |
http://boonedocks.net/ | |
Provided under the a BSD-style License | |
A GPL licensed version is available at: | |
http://boonedocks.net/code/bround.inc.phps |
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
<?php | |
/* | |
Banker's Rounding v1.01, 2006-08-15 | |
Copyright 2006 Michael Boone | |
[email protected] (remove the X) | |
http://boonedocks.net/ | |
Provided under the GNU General Public License | |
Contact me for use outside the bounds of that license |
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
<?php | |
/* | |
Location Parser v1.01, 2005-04-17 | |
Copyright 2005 Michael Boone | |
[email protected] (remove the X) | |
http://boonedocks.net/ | |
Provided under the GNU General Public License | |
Contact me for use outside the bounds of that license |
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
<?php | |
// $Id: antispamquestion.module $ | |
// | |
// Anti-Spam Question Module | |
// for Drupal 4.7.x | |
// by Mike Boone (contact me at: http://boonedocks.net/mailmike.php) | |
// Version 0.1, 2007-05-30 | |
// | |
// Version History | |
// 0.1, 2007-05-30, first working version |
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
// http://adventofcode.com/day/10 | |
// run with "./advent_day_10 input iterations" | |
// e.g. ./advent_day_10 1113122113 40 | |
package main | |
import "fmt" | |
import "os" | |
import "strconv" |
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
#!/bin/bash | |
# http://adventofcode.com/day/5 | |
# Part 1 | |
grep ".*[aeiou].*[aeiou].*[aeiou].*" day5_input.txt | grep -E "([a-z])\1" | grep -v -E "(ab|cd|pq|xy)" | wc -l | |
# Part 2 | |
grep -E "([a-z]).{1}\1" day5_input.txt | grep -E "([a-z]{2}).*\1" | wc -l |
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
// http://adventofcode.com/day/4 | |
// key should be passed on the command line as the first argument | |
// number of leading zeroes is the second argument | |
package main | |
import "crypto/md5" | |
import "fmt" | |
import "os" | |
import "strconv" | |
import "strings" |
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
# http://adventofcode.com/day/3 - part 1 | |
# | |
# instructions - String with sequentials commands for which direction to take. | |
# ^ north, v south, > east, < west | |
# | |
# Returns an integer of the area of wrapping paper required, in square feet. | |
def houses_visited_by_santa(instructions): | |
visited = [[0, 0]] | |
x = y = 0 |
NewerOlder