Clone the project:
$ git clone https://github.com/ToJans/jworklog.git
Cloning into 'jworklog'...
remote: Counting objects: 39, done.
remote: Compressing objects: 100% (30/30), done.
remote: Total 39 (delta 8), reused 36 (delta 5), pack-reused 0
| <?php | |
| // See http://symfony.com/doc/current/book/validation.html#validating-values-and-arrays | |
| $email = $app['request']->get('email'); | |
| $emailConstraint = new \Symfony\Component\Validator\Constraints\Email(); | |
| $emailConstraint->message = 'Invalid email address'; | |
| $errorList = $val->validate( | |
| $email, | |
| $emailConstraint | |
| ); | |
| var_dump($errorList); |
| #!/bin/bash | |
| NAME=selenium-server | |
| SCRIPT="/usr/bin/xvfb-run -- java -jar /root/${NAME}-standalone-2.44.0.jar" | |
| PIDFILE=/var/run/selenium-server.pid | |
| case "$1" in | |
| start) | |
| echo -n "Starting $DESC: " | |
| start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile --exec $SCRIPT |
| #!/bin/bash | |
| TOTAL=0 | |
| for i in `find /proc -maxdepth 2 -type f -name status`; do | |
| PID=`echo $i | cut -d/ -f3` | |
| SWAP=$(grep VmSwap /proc/$PID/status 2>/dev/null | cut -d: -f2 | xargs | grep -v '^0 kB$') | |
| if [ -n "$SWAP" ]; then | |
| echo "$PID (`ps -p $PID -o comm=`) = $SWAP" | |
| let TOTAL=$TOTAL+`echo $SWAP | cut -d' ' -f1` | |
| fi |
| #!/bin/bash | |
| function test { | |
| MESSAGE=$1 | |
| RECEIVED=$2 | |
| EXPECTED=$3 | |
| if [ "$RECEIVED" = "$EXPECTED" ]; then | |
| echo -e "\033[32m✔︎ Tested $MESSAGE" | |
| else |
| root@Debian77:~# pt-duplicate-key-checker --user=root --password=vagrant --database=drupal8 | |
| # ######################################################################## | |
| # drupal8.url_alias | |
| # ######################################################################## | |
| # Key source_langcode_pid ends with a prefix of the clustered index | |
| # Key definitions: | |
| # KEY `source_langcode_pid` (`source`,`langcode`,`pid`) | |
| # PRIMARY KEY (`pid`), | |
| # Column types: |
| $d = new DateTime(); | |
| $x = new IntlDateFormatter('nl_BE', IntlDateFormatter::NONE, IntlDateFormatter::NONE, null, null, 'd MMMM Y - H:mm:ss'); | |
| echo $x->format($d) . "\n"; | |
| // output 24 januari 2015 - 21:45:16 |
| module InventoryItems(Command(..), Event(..), handle) where | |
| import Data.Maybe(isJust) | |
| type Id = String | |
| type Name = String | |
| type Amount = Int | |
| data Command = CreateInventoryItem Id | |
| | RenameInventoryItem Id Name |
| syntax on | |
| colors elflord | |
| set tabstop=4 | |
| "set softtabstop=4 | |
| set expandtab | |
| set number | |
| "set showcmd | |
| set cursorline | |
| "set wildmenu | |
| "set lazyredraw |
| vi ~/.inputrc | |
| "\e[A": history-search-backward | |
| "\e[B": history-search-forward | |
| set show-all-if-ambiguous on | |
| set completion-ignore-case on | |
| # type ls, use arrows to get last directory you used |