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
kibana_host: logstash.openstack.org | |
alerts: | |
messagealert2: | |
field: message | |
query: eyJzZWFyY2giOiIiLCJmaWVsZHMiOltdLCJvZmZzZXQiOjAsInRpbWVmcmFtZSI6OTAwLCJncmFwaG1vZGUiOiJjb3VudCJ9 | |
limit: 10 |
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 com.typesafe.slick.examples.lifted | |
// Use H2Driver to connect to an H2 database | |
import scala.slick.driver.H2Driver.simple._ | |
// Use the implicit threadLocalSession | |
import Database.threadLocalSession | |
/** | |
* A simple example that uses statically typed queries against an in-memory |
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
(ns test) | |
(defn test [a] | |
(println "hepp")) |
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
tell application "Dock" | |
activate | |
end tell | |
tell application "System Events" | |
tell process "Dock" | |
set frontmost to true | |
activate | |
tell list 1 | |
perform action "AXShowMenu" of UI element "Wimp" | |
delay 1 |
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
def partall = List(1, 2, 3).filter { t => t % 2 == 0 }; |
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
Process: VLC [30909] | |
Path: /Applications/VLC.app/Contents/MacOS/VLC | |
Identifier: VLC | |
Version: ??? (???) | |
Code Type: X86-64 (Native) | |
Parent Process: bash [28915] | |
Date/Time: 2011-10-02 20:20:18.113 +0200 | |
OS Version: Mac OS X 10.6.8 (10K549) | |
Report Version: 6 |
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
val list = List(1,2,3) |
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> case class |#|(arg1: String, arg2: String) | |
defined class $bar$hash$bar | |
scala> val hash = |#|("en", "to") | |
hash: |#| = |#|(en,to) | |
scala> hash match { | |
| case en |#| to => println(en +" "+ to) | |
| } | |
en to |
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 myOpt:Option[Int] = Some(1234) | |
myOpt: Option[Int] = Some(1234) | |
scala> myOpt.map { _.toString.reverse.mkString("*")}.getOrElse("unknown") | |
res2: String = 4*3*2*1 | |
scala> val myOpt:Option[Int] = None | |
myOpt: Option[Int] = None | |
scala> myOpt.map { _.toString.reverse.mkString("*")}.getOrElse("unknown") |
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
# SHIP | |
#!/bin/bash | |
TO_SHIP_TO=$1 | |
CURRENT=`git branch | grep '\*' | awk '{print $2}'` | |
if [ -z $TO_SHIP_TO ]; then | |
echo "First argument has to be one of these branches:" | |
git branch | grep -v $CURRENT | |
exit 1 | |
fi |