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
PS1='${debian_chroot:+($debian_chroot)}\[\033[1;35m\]\u@\h\[\033[00m\] (\D{%F %T}):\[\033[1;34m\] \w$(__git_ps1 "\[\033[1;32m\] (%s)")\[\033[0;37m\] > ' | |
export ANSIBLE_NOCOWS=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
[alias] | |
lola = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --all |
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
var MongoClient = require('mongodb').MongoClient; | |
// Some docs for insertion | |
var docs = [{ | |
type: 'switch', | |
duration:0 | |
},{ | |
type: 'switch', | |
duration:0 | |
},{ |
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 Main { | |
def writeFile(fileName: String) { | |
val letter = new FileWriter(s"${System.getenv("USERPROFILE")}/${fileName}.txt") | |
try { | |
Stream.continually(readLine()).takeWhile(_ != ".").map(_ + "\n").foreach(letter.write) | |
} finally { | |
letter.close() | |
} | |
} | |
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
var http = require('http'), | |
url = require('url'), | |
path = require('path'), | |
fs = require('fs'); | |
var mimeTypes = { | |
"html": "text/html", | |
"jpeg": "image/jpeg", | |
"jpg": "image/jpeg", | |
"png": "image/png", | |
"js": "text/javascript", |
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
@echo off | |
if "%OS%" == "Windows_NT" ( | |
set "DIRNAME=%~dp0%" | |
) else ( | |
set DIRNAME=.\ | |
) | |
java -cp "%DIRNAME%\lib\*" %* play.core.server.NettyServer |
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/sh | |
### BEGIN INIT INFO | |
# Provides: playframework | |
# Required-Start: $local_fs $remote_fs $network $syslog | |
# Required-Stop: $local_fs $remote_fs $network $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start/Stop playframework | |
### END INIT INFO | |
# |
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
val suffix: Map[Symbol,Map[Symbol,Tuple2[String,String]]] = | |
""" | |
en=y:year,years|M:month,months|d:day,days|h:hour,hours|m:minute,minutes|s:seconde,secondes | |
fr=y:année,années|M:mois,mois|d:jour,jours|h:heure,heures|m:minute,minutes|s:seconde,secondes | |
""".split('\n').map(_.trim).filter(_.size > 0).map(_.split('=')).map { | |
line: Array[String] => // ["en","y:year,years|M:month,months|d:day,days|h:hour,hours|m:minute,minutes|s:seconde,secondes"] | |
Symbol(line(0)) -> line(1).split('|').map { | |
period: String => // "y:year,years" | |
Symbol(period(0).toString) -> period.drop(2).mkString | |
}.toMap.map { |