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
function activator | |
~/Downloads/activator-1.2.3-minimal/./activator $argv | |
end |
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 scala.annotation.tailrec | |
object UnicodeTranslator { | |
private lazy val unicodeRegex = """(\\u[0-9a-fA-F]{4})""".r | |
def escapeUnicode(stringToEscape:String) = stringToEscape.foldLeft("") { (escaped, char) => | |
if (char <= 127) { | |
escaped + char | |
} else { |
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
<TMS> | |
<Title>Ordnance Survey</Title> | |
<Layer idx="0"> | |
<Script><![CDATA[ | |
( | |
function convert(z1, x1, y1) | |
{ | |
serverpart = 0 | |
serverpart = (serverpart + 1) % 4; | |
function encodeQuadTree(zoom, tilex, tiley) |
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
function getPrettyDateRange($fromDate, $toDate) { | |
$fromTime = strtotime($fromDate); | |
$toTime = strtotime($toDate); | |
$fromDay = date("jS", $fromTime); | |
$fromMonth = date("F", $fromTime); | |
$fromYear = date("Y", $fromTime); | |
$toDay = date("jS", $toTime); | |
$toMonth = date("F", $toTime); |
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
"(" + StringUtils.join(params, ",") + ")" |
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/perl | |
use strict; | |
use warnings; | |
my $n = $ARGV[0]; | |
my $country = $ARGV[1]; | |
if ($country eq "GB") { | |
if ($n =~ /^0(\d{10})$/x) { |
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
package util; | |
import java.util.LinkedList; | |
import java.util.List; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
public class Regex { | |
/** |
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
package utils; | |
import java.io.BufferedReader; | |
import java.io.DataInputStream; | |
import java.io.File; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.util.HashMap; |
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
package net.blerg; | |
import java.io.UnsupportedEncodingException; | |
import java.net.URLEncoder; | |
import java.util.Map; | |
import java.util.Map.Entry; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; |
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
package net.blerg.util; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.io.OutputStreamWriter; | |
import java.io.UnsupportedEncodingException; | |
import java.net.MalformedURLException; | |
import java.net.URL; |
OlderNewer