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" ?> | |
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> | |
<log4j:configuration debug="true" | |
xmlns:log4j='http://jakarta.apache.org/log4j/'> | |
<appender name="console" class="org.apache.log4j.ConsoleAppender"> | |
<layout class="org.apache.log4j.PatternLayout"> | |
<param name="ConversionPattern" | |
value="%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}: - %m%n" /> | |
</layout> |
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
# Maintainer: Daichi Shinozaki <[email protected]> | |
pkgname=mesos | |
pkgver=0.20.0 | |
pkgrel=1 | |
pkgdesc="A cluster manager that simplifies the complexity of running applications on a shared pool of servers" | |
arch=('x86_64') | |
url='http://mesos.apache.org/' | |
license=('Apache') | |
groups=('science') | |
depends=('python2' 'python2-boto' 'curl' 'libsasl' 'leveldb' 'java-environment' 'libunwind') |
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 | |
set -euo pipefail | |
if [ $# -eq 0 ]; then | |
sleep 0.2 # xmonad holds keyboard; race condition fix | |
scrot -s -e "$0 \$f" | |
exit | |
fi |
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
//Setup Option[String]s | |
val maybeValue1 : Option[String] = Some("Value1") | |
val maybeValue2 : Option[String] = Some("Value2") | |
val maybeValue3 : Option[String] = None | |
(maybeValue1, maybeValue2, maybeValue3) match { | |
case (Some(v1), Some(v2), Some(v3)) => (v1, v2, v3) | |
case _ => println("Handle error here") | |
} |
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
(eval-after-load 'rcirc | |
'(defun-rcirc-command matt (arg) | |
"Matt cycling" | |
(interactive "i") | |
(rcirc-send-message process target "http://i.imgur.com/YkhDPmH.png"))) |
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
Feb 20, 2013 5:11:28 AM org.apache.solr.update.processor.DistributedUpdateProcessor doDefensiveChecks | |
SEVERE: ClusterState says we are the leader, but locally we don't think so | |
Feb 20, 2013 5:11:28 AM org.apache.solr.update.processor.DistributedUpdateProcessor doDefensiveChecks | |
SEVERE: ClusterState says we are the leader, but locally we don't think so | |
Feb 20, 2013 5:11:28 AM org.apache.solr.update.processor.DistributedUpdateProcessor doDefensiveChecks | |
SEVERE: ClusterState says we are the leader, but locally we don't think so | |
Feb 20, 2013 5:11:28 AM org.apache.solr.common.SolrException log | |
SEVERE: org.apache.solr.common.SolrException: ClusterState says we are the leader, but locally we don't think so | |
at org.apache.solr.update.processor.DistributedUpdateProcessor.doDefensiveChecks(DistributedUpdateProcessor.java:295) | |
at org.apache.solr.update.processor.DistributedUpdateProcessor.setupRequest(DistributedUpdateProcessor.java:230) |
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
scala> val m = Map("baz" -> 1, "foo" -> null) | |
m: scala.collection.mutable.Map[String,Any] = Map(baz -> 1, foo -> null) | |
scala> m.get("baz") | |
res2: Option[Any] = Some(1) | |
scala> m.get("foo") | |
res3: Option[Any] = Some(null) | |
scala> m.get("huh?") |
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
;; gist | |
(add-to-list 'load-path (concat dotfiles-dir "gh.el")) | |
(require 'gist) | |
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 | |
date=`date "+%Y%m%d"` | |
file="/tmp/mysql-${date}.dump.gz" | |
mysqldump -h"host" -u"user" -p"pass" tr_production | gzip > $file | |
s3cmd put $file s3://bucket/mysqlbackups/ 2> /dev/null | |
rm -f $file |
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
# system config | |
script "increase nofiles to 300k" do | |
interpreter "bash" | |
flags "-e" | |
user "root" | |
creates "/etc/security/limits.d/nofiles.conf" | |
code <<-EOH | |
echo "* hard nofile 300000" >> /etc/security/limits.d/nofiles.conf | |
echo "* soft nofile 300000" >> /etc/security/limits.d/nofiles.conf | |
echo "root hard nofile 300000" >> /etc/security/limits.d/nofiles.conf |
NewerOlder