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
open System | |
open System.IO | |
open System.Text.RegularExpressions | |
type Instruction = { | |
command : string; | |
start: (int * int); | |
finish: (int * int) | |
} |
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
open System.IO | |
open System.Linq; | |
type niceness = | |
| vowel = 0 | |
| double = 1 | |
| naughty = 2 | |
let checkDoubles (p : char * char) = | |
let x, y = p |
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
open System; | |
open System.Linq; | |
open System.Text; | |
open System.Security.Cryptography; | |
let md5 = MD5.Create() | |
let md5hash (input : string) = | |
input | |
|> Encoding.UTF8.GetBytes |
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
open System | |
open System.IO | |
let getHouses directions = | |
directions | |
|> Seq.map (fun x -> | |
match x with | |
| '>' -> (fun (x: int, y: int) -> (x + 1, y)) | |
| '<' -> (fun (x: int, y: int) -> (x - 1, y)) | |
| '^' -> (fun (x: int, y: int) -> (x, y + 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
open System | |
let input = " | |
3x11x24 | |
13x5x19 | |
1x9x27 | |
24x8x21 | |
6x8x17 | |
19x18x22 | |
10x9x12 |
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
let input = """ | |
()(((()))(()()()((((()(((())(()(()((((((()(()(((())))((()(((()))((())(()((()()()()(((())(((((((())))()()(()(()(())(((((( | |
)()()((())(((((()()))))()(())(((())(())((((((())())))(()())))()))))()())()())((()()((()()()()(()((((((((()()())((()()((( | |
((()(((())((())(()))()((((()((((((((())()((()())(())((()))())((((()())(((((((((((()()(((((()(()))())(((()(()))())((()(() | |
())())())(()(((())(())())()()(()(()((()))((()))))((((()(((()))))((((()(()(()())())()(((()((((())((((()(((()()(())()()()( | |
))((()((((((()((()()))()((()))()(()()((())))(((()(((()))((()((()(()))(((()()(()(()()()))))()()(((()(((())())))))((()(((( | |
))()(()(())((()())))((((())))(()(()(()())()((()())))(((()((()(())()()((()((())(()()((())(())()))()))((()(())()))())((((( | |
((()(()()(()(())())))))))(()((((((())((((())((())())(()()))))()(())(()())()())((())(()))))(()))(()((()))()(()((((((()()( | |
)()((((((((()(()(())((()()(()()))(())()())()((())))()))()())(((()))(())()(())()))()((()((()(()()())(())()()()((())())))( | |
(()()(()()((()(())()()())(((()(()()))))( |
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 java.nio.charset.Charset; | |
import java.nio.file.FileSystems; | |
import java.nio.file.Files; | |
import java.util.List; | |
public class CodeForAmerica { | |
private static final int NAME = 8; | |
private static final int LAND_AREA = 11; | |
private static final int POPULATION = 13; |
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
@Grab('com.asual.lesscss:lesscss-engine:1.3.0') | |
import java.nio.file.FileSystems | |
import java.nio.file.StandardWatchEventKinds | |
import com.asual.lesscss.LessEngine | |
import com.asual.lesscss.LessOptions | |
CliBuilder cli = new CliBuilder() | |
cli.with { | |
w longOpt: 'watch', args: 1, argName: 'less file/directory', 'LESS file or directory of LESS files to watch, default: <current directory>' |
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
#!/usr/bin/env bash | |
# | |
# Copyright 2012 Zemian Deng | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
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
#################################### | |
# BASIC REQUIREMENTS | |
# http://graphite.wikidot.com/installation | |
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/ | |
# Last tested & updated 10/13/2011 | |
#################################### | |
sudo apt-get update | |
sudo apt-get upgrade |