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
// ask for two strings and join the first half of the first string | |
// with the second half of the second string. | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#define SIZE 255 |
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 | |
# This script starts background processes, so I need to murder them. | |
function abort { kill $! &>/dev/null ; red ":(\n" ; exit 1 ; } | |
# For debugging purposes | |
function log { echo -e "Stardate `date`: $1" >> "$LOG" ; } | |
# Shove heredocs into variables. | |
function define { IFS='' read -r -d '' ${1} ; } |
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 | |
# | |
# Version 0.2, for Ubuntu 13.04 (Raring) | |
# | |
# Based on Chrubuntu 34v87 script | |
BASE_IMAGE_FILE="http://mirrors.med.harvard.edu/ubuntu-cdimage/lubuntu/releases/13.04/release/lubuntu-13.04-preinstalled-desktop-armhf+ac100.tar.gz" | |
# fw_type will always be developer for Mario. | |
# Alex and ZGB need the developer BIOS installed though. |
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
"This is a naive implementation of syllable guessing. This is for Amber smalltalk. It probably works elsewhere with minor changes." | |
| word | | |
word := 'tumult' asLowercase. | |
word := word replaceRegexp: '(?:[^laeiouy]es|ed|[^laeiouy]e)$' with: ''. | |
word := word replaceRegexp: '^y' with: ''. | |
console log: ( word matchesOf: ( RegularExpression fromString: '[aeiouy]{1,2}' flag: 'g' ) ) size. | |
"Use the CMU Pronunciation Dictionary to determine the number and stress of syllables in a word. Obviously this only works with words that are in the dictionary." |