Skip to content

Instantly share code, notes, and snippets.

View SijmenHuizenga's full-sized avatar
❤️
line by line

Sijmen SijmenHuizenga

❤️
line by line
View GitHub Profile
package nl.sijmenhuizenga.sqlcompiler;
import java.io.File;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.*;
import java.nio.file.attribute.BasicFileAttributes;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.*;
@SijmenHuizenga
SijmenHuizenga / clock.html
Created February 15, 2016 09:17
JS Clock Counter @ clock.sijmenhuizenga.nl
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
@SijmenHuizenga
SijmenHuizenga / GlazenBol.java
Created February 15, 2016 10:07
Lottotrekking
package it.sijmen;
import java.util.ArrayList;
import java.util.Random;
/**
* Created by Sijmen on 15-2-2016.
*/
public class GlazenBol {
@SijmenHuizenga
SijmenHuizenga / App.java
Created February 23, 2016 10:36
Theading Example
package threading.test;
public class App implements Runnable{
public App() {
Thread newThread = new Thread(this);
//als het programma stopt, stop ook deze thread
newThread.setDaemon(true);
//start de nieuwe thread
@SijmenHuizenga
SijmenHuizenga / SqlCompiler.java
Created July 18, 2016 08:20
A little application that concats SQL files into one single file.
package nl.sijmenhuizenga.sqlcompiler;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.*;
import java.nio.file.attribute.BasicFileAttributes;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.*;
def rule() : Int = {
println("To rule them all"); 10
}
@SijmenHuizenga
SijmenHuizenga / gist:168ab5098afd2775deafd271014edd48
Created April 19, 2017 20:22
Gitlab Autorunner DigitalOcean UserData startup script (ubuntu 16.04)
#!/bin/bash
echo 'starting setup...'
echo 'installing docker...'
curl -sSL https://get.docker.com/ | sh
echo 'installing gitlab-ci-multi-runner repository'
curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-ci-multi-runner/script.deb.sh | sudo bash
echo 'installing gitlab-ci-multi-runner'
sudo apt-get install gitlab-ci-multi-runner
echo 'registering gitlab-ci-multi-runner'
gitlab-ci-multi-runner register --non-interactive --name "$HOSTNAME" --url "https://gitlab.com/ci" \
@SijmenHuizenga
SijmenHuizenga / message.md
Created May 6, 2017 19:20
I hereby verify my online identiy.

Sijmen Huizenga

I hereby verify my online identiy. Last updated: 06-may-2017 20:48

Contact Details

Sijmen Huizenga
Born in March 1997
Mail [email protected]

Site's

@SijmenHuizenga
SijmenHuizenga / updateip.sh
Last active July 17, 2020 07:50
Dynamic IP with Cloudflare
# Add to `crontab -e`:
# @hourly /home/pi/updateip.sh > /home/pi/.ip-log.txt
# @reboot sleep 30 && /home/pi/updateip.sh > /home/pi/.ip-log.txt
IP=`curl -s http://api.ipify.org/`
if [ -f $HOME/.ip.txt ]; then
OLD_IP=`cat $HOME/.ip.txt`
else
echo "No file, need IP"
@SijmenHuizenga
SijmenHuizenga / movement-music.ino
Last active September 27, 2017 20:47
Play a tune on device movement!
/**
* Use a LSM303 to detect movement. When the chip moves than a song is played!
*
* To compile requires `piches.h` that is found here: https://www.arduino.cc/en/Tutorial/toneMelody
* And the LSM303 Library is required: https://github.com/pololu/lsm303-arduino
*/
#include <Wire.h>
#include <LSM303.h>
#include "pitches.h"