Skip to content

Instantly share code, notes, and snippets.

View henkjanverkerk's full-sized avatar

Henk-Jan henkjanverkerk

  • ADP
  • Rotterdam, The Netherlands
View GitHub Profile
@henkjanverkerk
henkjanverkerk / merge.py
Last active October 19, 2016 13:46
Simple merger for flat files
# Needed this for merging a couple of log files into one file under conditions:
# - only files of type .log needed to be merged
# - only line starting with 'RLS' needed to be merged
import os
g = open('total.txt','a')
for file in os.listdir('.'):
if file.endswith('.log'):
f = open(file,'r')
for line in f:
@henkjanverkerk
henkjanverkerk / password.py
Last active April 6, 2016 08:24
Simple password generator
import random
def main():
length = int(raw_input('How long should your password be?\n'))
print('Here's the password I generated: ' + ''.join(random.sample('QWERTYUIOPASDFGHJKLZXCVBNM1234567890abcdefghijklmnopqrstuvwxyz1234567890!@$()_', length)))
main()
@henkjanverkerk
henkjanverkerk / build-numbers.txt
Last active March 16, 2016 09:58
Qlikview 11.20 SR / Build numbers
# Qlikview 11.20 Service releases and build numbers
Qlikview 11.20 SR 1 | 11.20.11718
Qlikview 11.20 SR 2 | 11.20.11922
Qlikview 11.20 SR 3 | 11.20.12018
Qlikview 11.20 SR 4 | 11.20.12129
Qlikview 11.20 SR 5 | 11.20.12235
Qlikview 11.20 SR 6 | 11.20.12347
Qlikview 11.20 SR 7 | 11.20.12451
Qlikview 11.20 SR 8 | 11.20.12577
@henkjanverkerk
henkjanverkerk / comparison.txt
Created July 31, 2015 06:10
Local vs. wide ping stats for Ziggo
--- 192.168.0.1 ping statistics ---
1016 packets transmitted, 1016 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.552/0.805/3.096/0.218 ms
--- 8.8.8.8 ping statistics ---
930 packets transmitted, 729 packets received, 21.6% packet loss
round-trip min/avg/max/stddev = 12.405/24.715/1031.789/38.960 ms
@henkjanverkerk
henkjanverkerk / zebrapuzzle.py
Last active August 29, 2015 14:12
Zebra puzzle / Einstein's riddle
# This script is a solution to this version of the Zebra Puzzle:
# http://csl.name/post/einsteins-puzzle/
# About which everything can be found at:
# http://en.wikipedia.org/wiki/Zebra_Puzzle
# After trying to generate all possible compositions of houses, nationality, color, drink, smoke and pet it still took too long for my machine to find the solution. So I took some business rules and applied these before generating the compositions. Eventually it still takes around a minute or two to find and print the solution. It was a nice challenge for a beginning programmer.
# Business rules:
# 1 The Brit lives in a red house.
# 2 The Swede keeps dogs as pets.