As configured in my dotfiles.
start new:
tmux
start new with session name:
#!/usr/bin/env bash | |
# Formatting constants | |
export BOLD=`tput bold` | |
export UNDERLINE_ON=`tput smul` | |
export UNDERLINE_OFF=`tput rmul` | |
export TEXT_BLACK=`tput setaf 0` | |
export TEXT_RED=`tput setaf 1` | |
export TEXT_GREEN=`tput setaf 2` | |
export TEXT_YELLOW=`tput setaf 3` |
# _______ _ _ _ _ _ | |
# |__ __| | (_) (_) | | | | | |
# | | | |__ _ ___ ___ ___ _ __ _ _ __ | |_ _ __ ___ _____ _____ __| | | |
# | | | '_ \| / __| / __|/ __| '__| | '_ \| __| | '_ ` _ \ / _ \ \ / / _ \/ _` | | |
# | | | | | | \__ \ \__ \ (__| | | | |_) | |_ | | | | | | (_) \ V / __/ (_| | | |
# |_| |_| |_|_|___/ |___/\___|_| |_| .__/ \__| |_| |_| |_|\___/ \_/ \___|\__,_| | |
# | | | |
# |_| | |
# | |
# New home : https://github.com/bric3/osx-jdk5-installer |
# This is file ~/.gitconfig | |
[merge] | |
tool = extMerge | |
[mergetool "extMerge"] | |
cmd = ~/bin/extMerge \"$BASE\" \"$LOCAL\" \"$REMOTE\" -o \"$MERGED\" |
As configured in my dotfiles.
start new:
tmux
start new with session name:
#!/bin/sh | |
## | |
# This is a script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# Run in interactive mode with: | |
# $ sh -c "$(curl -sL https://raw.github.com/gist/2108403/hack.sh)" | |
# | |
# or run it without prompt questions: |
#!/bin/bash -e | |
# NB: the file is named git-incr-build.sh to let Gist colorize, but you should name it git-incr-build | |
# Put this script in your PATH and call it this way: | |
# git incr-build clean install | |
# Can be combined with git pull --rebase and git push to make an "fast & safe push" script | |
function branchName { | |
git rev-parse --symbolic-full-name --abbrev-ref $1 | |
} |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
#!/bin/bash | |
# WebSocket shell, start & browse to http://<Host>:6655/ | |
# Requires bash 4.x, openssl. | |
# Author: rootshell@corelogics.de (which isn't me, apk) | |
coproc d { nc -l -p 6656 -q 0; } | |
nc -l -p 6655 -q 1 > /dev/null <<-ENDOFPAGE | |
HTTP/1.1 200 OK | |
<html><head><script language="javascript"> | |
var url = location.hostname + ':' + (parseInt(location.port) + 1); |
- Télécharger Play 2 | |
- L'application en question : play-2.0/samples/scala/computer-database | |
- Lancer play : play -DapplyEvolutions.default=true | |
- Faire "start" (ne pas faire "play run" au début, sinon vous n'êtes pas en mode prod) | |
- Attendre que Scala compile :-) | |
- Voici le script : | |
<?xml version="1.0" encoding="UTF-8"?> | |
<jmeterTestPlan version="1.2" properties="2.2"> |
The other day, I saw Harold Cooper's One-line tree in Python via autovivication, and wondered if the same thing was possible in Groovy.
The answer is yes! But you need to define the variable tree
before you can assign it to the self-referential withDefault
closure, hence with Groovy, it's a two-line solution ;-)
Anyway, given:
def tree = { [:].withDefault{ owner.call() } }