Skip to content

Instantly share code, notes, and snippets.

View fowlie's full-sized avatar

Mats Faugli fowlie

View GitHub Profile
@fowlie
fowlie / smoketest.sh
Last active December 20, 2017 11:20
Shell Smoketest
#!/bin/bash
for module in "accounting-module" "customer-module" "product-module" "policy-module" "test-module"
do
url="http://$env/$module/webservice"
status=$(curl $url --silent --output /dev/null --write-out "%{http_code}")
echo "$url returned HTTP $status"
if [ $status -ne "200" ]; then
exit 1;
fi
done
@fowlie
fowlie / migratePackage.cli
Last active August 29, 2015 14:00
XebiaLabs XL Deploy Install Latest Package
import sys
if len(sys.argv)!=4:
print ''
print 'Usage: ' + sys.argv[0] + ' [ApplicationName] [FromEnvironment] [ToEnvironment]'
print ''
print 'The following example will upgrade WAS STEST with the package installed in WAS ITEST:'
print sys.argv[0] + ' webshop-deployit-bundle WAS/WEBSHOP_NO/it-was8-webshop-no WAS/WEBSHOP_NO/st-was8-webshop-no'
else:
# Read input arguments
@fowlie
fowlie / TicTacToe.java
Last active August 24, 2018 13:36
Algorithm for determining tic tac toe game over using a 3x3 magic square
class TicTacToe {
char board[] = new char[8];
int[] magicSquare = new int[]{4, 9, 2, 3, 5, 7, 8, 1, 6};
public static void main(String[] args) {
TicTacToe ticTacToe = new TicTacToe();
ticTacToe.board = new char[]{' ', ' ', 'x',
'o', 'x', 'o',
'x', ' ', 'o'};
ticTacToe.checkWinner();
@fowlie
fowlie / .ideavimrc
Last active August 8, 2019 11:00
My personal configuration file for IdeaVim
" vim-surround
set surround
" Selected IntelliSpace modules
source ~/intelli-space/spacemacs.vim
source ~/intelli-space/extra.vim
source ~/intelli-space/major.vim
source ~/intelli-space/hybrid.vim
" Map avy-goto-char-timer feature from KJump plugin