Skip to content

Instantly share code, notes, and snippets.

View nwillems's full-sized avatar

Nicolai Willems nwillems

View GitHub Profile
@nwillems
nwillems / derp.java
Created December 16, 2014 18:08
A Java exception wrapping method
// Demonstrate usage
class Mainer{
public static void main(String[] args){
Boolean b = exceptionJoe(new Callable<Boolean>{
public Boolean call(){
return Boolean.TRUE;
}
}, Boolean.FALSE);
}
}
@nwillems
nwillems / idea.md
Last active August 29, 2015 14:05
AppIdea - Shopper

IDEA Create an app that allows you to scan bar codes while shopping, to allow for you to automatically check of things on your shopping list.

Pain Why do I need to think about what I have to go shopping for, when I can have computers tell me what I usually shop for.

Gain in a couple of months you will be able to have an automatic shopping list, due to the things that you've already registered.

Making money By aggregating the data you(the developer/businessman/whatnot) can sell it as large-scale consumer statistics(I think scientific use), or maybe even(if morale allows) use it to effectively do personal targeting!

Challenges

@nwillems
nwillems / index.md
Last active August 29, 2015 13:58
SVN: The wrong parts

Allright, so that was a bold title! So far I've found one MAJOR thing, which I will describe in here.

This is not meant as a commercial for git, but I feel myself hitting problems with SVN which git solves perfectly. My experience with othe DVCS are pretty much non-existing, so comments are welcome.

And in general comments are very welcome!

Catching-up with the latest work

A typical workflow could look something like this: Me: Create branch for feature - MyFeatureBranch Me: Do some development - and commits it

@nwillems
nwillems / README.md
Last active August 29, 2015 13:57
Example for Datagist

Explanation of data

This data was generated by http://www.generatedata.com/ The template used is:

ID, autoincrement(1,1) Name, Names(Name Surname) City, City() Income, CUrrency(xxxxx, 5000, 10000, "$", "prefix") Distance, NormDist(0,3)

@nwillems
nwillems / README.md
Last active August 29, 2015 13:56
A language - thoughts on a higher level language

This is a gist describing some random thoughs on a possible programming language. It is by no means a specification or in anyway something concrete, at the moment it is some thoughts, put in this gist, to remove them from my head.

Comments are very welcome.

Forgiveness

It should be possible - without making them symbols - to have a compiler recognise public and pubilc or even pubic as the same symbol. Of course if you ever choose to use a variable name called pubilc this would not be possibl, but whatever else you do this should be possible.

Syntax

Curly braces are not bulky and blocky enough! Squarebrackets should indicate code-blocks! /sarcasm-off

@nwillems
nwillems / caconfig.cnf
Last active January 1, 2016 16:49
Procedure to make ca/server/client certificates for a MiG development setup
[ ca ]
default_ca = CA_default
[ CA_default ]
dir = /home/mig/certs
serial = $dir/serial
database = $dir/index.txt
new_certs_dir = $dir/certs
certificate = $dir/cacert.crt
private_key = $dir/cacert.key
default_days = 365
@nwillems
nwillems / readme.md
Last active December 22, 2015 23:39
Little script to provide link for the currently playing song on Berri radio(http://m.fatberris.com/)

When on http://m.fatberris.com press the F12-button and go to the console-tab. Copy and paste the below script into the console and press enter, skip a song, and the link appears together with remaining time.

# LOTS OF COMMENTS REMOVED FROM TOP
# DO NOT DISABLE!
# If you change this first entry you will need to make sure that the
# database superuser can access the database using some other method.
# Noninteractive access to all databases is required during automatic
# maintenance (custom daily cronjobs, replication, and similar tasks).
#
# Database administrative login by Unix domain socket
local all postgres peer
@nwillems
nwillems / nrpe.cfg
Created November 15, 2012 14:52
Nagios remote client configuration
#############################################################################
# Sample NRPE Config File
# Written by: Ethan Galstad (nagios@nagios.org)
#
# Last Modified: 11-23-2007
#
# NOTES:
# This is a sample configuration file for the NRPE daemon. It needs to be
# located on the remote host that is running the NRPE daemon, not the host
# from which the check_nrpe client is being executed.