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
cd hadoop-snappy | |
# Mac OS X | |
tar xzvf ~/Downloads/snappy-1.0.3.tar.gz | |
cd snappy-1.0.3 | |
./configure --prefix=$(greadlink -m $PWD/../snappy) && make install | |
cd .. | |
# Linux | |
wget http://snappy.googlecode.com/files/snappy-1.0.3.tar.gz |
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/sh | |
pwd=`pwd` | |
for i in dot.* | |
do | |
if [ -d "$i" ] | |
then | |
for j in `find $i -type file` | |
do | |
s=`echo $j | sed -e s/^dot//` |
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 -e | |
# don't blunder on if an error occurs | |
set -e | |
# get configured | |
echo "Welcome to the TSC Hubot install script!" | |
read -ep "What hubot git should we install? " HUBOT_REPO | |
HUBOT_REPO=${HUBOT_REPO:-"git://github.com/TechSmith/hubot.git"} | |
read -ep "Where should it be checked out? " HUBOT_NAME |
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
# Perl snippet showing how to use netcat (nc) to poll a port, | |
# waiting for it to open | |
# | |
# NOTE: You could also increase the value passed to -w to 60 | |
# to do this, but you wouldn't get an up-to-the minute status | |
# message printed each second... | |
my $host = '192.168.1.100'; | |
my $port = '443'; | |
my $MAX_ATTEMPTS = 60; # Number of times to repeat the port check |
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
/* | |
Example of use | |
document.write = decorate (document.write, function () { | |
console.log(this === document);// true; | |
}, function () { | |
console.log('DOM is updated'); | |
}); | |
document.write = decorate (document.write, null, function () { | |
console.log('After document.write'); |
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 Yairc::Plugin::OXGame; | |
=pod | |
○×ゲーム | |
3×3のマスに○と×を交互に置いて | |
タテ・ヨコ・ナナメ3連続になった方の勝ち | |
タグは #ox | |
まずはTAGSにoxを追加しておきましょう。 |
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
public class PredefinedRulesSchema : IMessageSchemaProvider { | |
public MessageSchema GetSchema() { | |
return MessageSchema.Named("validated-message") | |
.WithRootName("Validated") | |
.WithProperty( | |
MessageSchemaProperty.Named("BooleanProperty") | |
.IsBoolean(BooleanTypes.YN) | |
) |
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
my $birth-date-string = prompt "When were you born (yyyy-mm-dd)?"; | |
my $birth-date = Date.new($birth-date-string); | |
my $today = Date.today; | |
my $age = $today.year - $birth-date.year; | |
# But your birthday this year may not have been yet | |
if $today.day-of-year < $birth-date.day-of-year { | |
$age--; | |
} |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:hdp="http://www.springframework.org/schema/hadoop" | |
xmlns:batch="http://www.springframework.org/schema/batch" | |
xmlns:util="http://www.springframework.org/schema/util" | |
xmlns:p="http://www.springframework.org/schema/p" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd | |
http://www.springframework.org/schema/hadoop http://www.springframework.org/schema/hadoop/spring-hadoop.xsd | |
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"> |
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
// | |
// GradientView.m | |
// GradientDemo | |
// | |
// Created by Tony Kong on 13-5-26. | |
// Copyright (c) 2013年 Tony Kong. All rights reserved. | |
// | |
#import "GradientView.h" |
OlderNewer