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
implicit object AnyJsonFormat extends JsonFormat[Any] { | |
def write(x: Any) = x match { | |
case n: Int => JsNumber(n) | |
case s: String => JsString(s) | |
case x: Seq[_] => seqFormat[Any].write(x) | |
case m: Map[String, _] @unchecked => mapFormat[String, Any].write(m) | |
case b: Boolean if b => JsTrue | |
case b: Boolean if !b => JsFalse | |
case x => | |
serializationError( |
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
# Add -h <host> -u <user> -p if needed | |
mysqldump --single-transaction --skip-lock-tables database [table1 table2 table3] | pv -W | gzip -c > [filename].sql.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/bash | |
KillNode() { | |
NODE_PID=`ps aux | grep [n]ode | awk '{print $2}'` | |
kill $NODE_PID 2>/dev/null | |
} | |
if [ -z $1 ]; then | |
echo "I need ghost version number as parameter." |