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 | |
/** | |
* Connect to a database and perform a query. | |
*/ | |
error_reporting(E_ALL); | |
require '/usr/local/share/php/monetdb/php_monetdb.php'; | |
define("DB", "maxroach"); | |
/* Establish a connection and report errors in case they occour */ |
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 | |
$GLOBALS['THRIFT_ROOT'] = 'src/'; | |
include 'gen-php/Hbase/Hbase_types.php'; | |
include 'gen-php/Hbase/Hbase.php'; | |
include 'src/transport/TSocket.php'; | |
include 'src/transport/TBufferedTransport.php'; | |
include 'src/protocol/TBinaryProtocol.php'; |
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
# -*- coding: utf-8 -*- | |
# Upside down tweet / earthquake plugin | |
# | |
# upd: | |
# | |
require 'pp' | |
class Upd | |
@@values = { | |
'a'=>'ɐ','b'=>'q','c'=>'ɔ','d'=>'p','e'=>'ǝ','f'=>'ɟ','g'=>'ƃ','h'=>'ɥ','i'=>'ı', | |
'j'=>'ɾ','k'=>'ʞ','l'=>'l','m'=>'ɯ','n'=>'u','o'=>'o','p'=>'d','q'=>'b','r'=>'ɹ', |
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
export HADOOP_PREFIX=/root/modules/hadoop-common | |
export OS_ARCH=amd64 | |
export JAVA_HOME=/etc/alternatives/java_sdk | |
export LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/$OS_ARCH/server:/usr/local/lib | |
export CLASSPATH=`find $HADOOP_PREFIX -name '*.jar' | grep -v 'test' | grep -v 'example' | perl -e '@jars=<STDIN>;chomp @jars; print join(":",@jars);'` | |
fuse_dfs -odebug -oserver=localhost -oport=9000 /mnt/hdfs |
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
object(lithium\action\Request)#27 (29) { | |
["url"]=> | |
string(33) "conversions/download/adid/from/to" | |
["params"]=> | |
array(0) { | |
} | |
["persist"]=> | |
array(0) { | |
} | |
["data"]=> |
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 | |
/usr/sbin/tmpwatch -m 50 /usr/local/mysqlbackup/backupdata | |
svr_name=`uname -n` | |
/usr/bin/mysqladmin stop-slave | |
sleep 10 | |
/sbin/service mysqld stop | |
sleep 10 | |
daystr=`date -d '1 days ago' '+%Y%m%d'` | |
cd /var/lib/mysql | |
tar czvf /usr/local/mysqlbackup/backupdata/$svr_name$daystr.tgz ./* > /dev/null 2>&1 |
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 | |
#### | |
#もしマスタが落ちたときの処理スクリプト | |
#とりあえず最終確認して、本当にダメだったらkeepalivedを落とす。 | |
#### | |
#ちょっと待つ | |
sleep 5 | |
#本当にmysqlが死んでいるかどうかの確認 | |
mysqlans=`mysql -u tbacojx -pdasuinzc -h 127.0.0.1 --port=3306 < /usr/local/keepscript/s | |
howmaster.sql | grep Bytes_received | awk '{print $1}'` |
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 | |
/sbin/service keepalived stop | |
/usr/sbin/tmpwatch -m 50 /usr/local/mysqlbackup/backupdata | |
svr_name=`uname -n` | |
/usr/bin/mysqladmin stop-slave | |
sleep 3 |
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
// tpsは自分の好きな名前なんでも。ルートのパッケージ名的な。 | |
// geoは機能別に好きな名前なんでも。 | |
if ( typeof(tps) == 'undefined' ) tps = {}; | |
if ( typeof(tps.geo) == 'undefined' ) tps.geo = {}; | |
tps.geo.prototype = { | |
prop01:false, | |
prop02:false, | |
init : function () { | |
this.func01(); |
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
./configure \ | |
--enable-mod-charset \ | |
--with-apxs2=/usr/local/apache2/bin/apxs \ | |
--disable-cgi \ | |
--with-libexpat-dir=/usr \ | |
--with-libxml-dir=/usr \ | |
--with-openssl \ | |
--with-openssl-dir=$(brew --prefix openssl) \ | |
--with-kerberos \ | |
--with-zlib \ |