Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Working full time in Azure technologies

Geert Van Laethem GeertVL

💭
Working full time in Azure technologies
View GitHub Profile
@GeertVL
GeertVL / random.cs
Last active Apr 15, 2020
Create random file
View random.cs
private static void CreateRandomTempFile(string fileName, long lengthInMb)
{
// https://stackoverflow.com/questions/4432178/creating-a-random-file-in-c-sharp
byte[] data = new byte[lengthInMb * 1024 * 1024];
Random rng = new Random();
rng.NextBytes(data);
File.WriteAllBytes(fileName, data);
}
View gist:d2a604b268c724042e9b6d00c4a8dff9
# Hoe een leerling toevoegen
1. Ga naar www.vrijzinniggrootlier.be
2. Ga op de homepage helemaal naar vanonder.
3. Klik op de link Leraars.
4. Geef je eigen code in (zie Excel bestand met de codes).
5. Nu kan je ofwel een nieuwe leerling toevoegen, aanpassen of verwijderen.
6. Kijk goed na dat de leerling in de juiste school en feest zit.
View gist:654aebb228299ae5d09bcd7bdf78f55d
# Hoe een leerling toevoegen
1. Ga naar www.vrijzinniggrootlier.be
2. Ga op de homepage helemaal naar vanonder.
3. Klik op de link Leraars.
4. Geef je eigen code in (zie Excel bestand met de codes).
5. Nu kan je ofwel een nieuwe leerling toevoegen, aanpassen of verwijderen.
6. Kijk goed na dat de leerling in de juiste school en feest zit.
View school.json
{
name: 'Het molentje',
city: 'Lier',
teachers: [
{
_id: 1111111,
name: 'Jan Piet'
},
{
_id: 2222222,
@GeertVL
GeertVL / debug-in-vscode.md
Created May 26, 2018
How to prepare a Rust project
View debug-in-vscode.md
{
    "version": "0.2.0",
    "configurations": [

        {
            "name": "(Windows) Launch",
            "type": "cppvsdbg",
            "request": "launch",
            "program": "${workspaceRoot}/target/debug/${workspaceRootFolderName}",
@GeertVL
GeertVL / postgres-docker-local.md
Last active Feb 9, 2020
How to install postgres and pgadmin in a docker environment on your local macos machine
View postgres-docker-local.md

I experienced that installing your Postgres database server on your local machine as a Docker container is not that evident. So this explains how you need to do it and what you need to take into account.

To setup your Postgres Docker container you need to run:

docker run -d -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=mysecretpassword --name postgres-server -p 5432:5432 -v pgdata:/var/lib/postgresql/data --restart=always postgres

And to run your pgadmin instance as a Docker container:

@GeertVL
GeertVL / Vagrantfile
Created Nov 11, 2016
Vagrantfile for RabbitMQ server
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "debian/jessie64"
config.vm.network :forwarded_port, guest: 3000, host: 3000
config.vm.network :forwarded_port, guest: 15672, host: 15672
config.vm.network :forwarded_port, guest: 5672, host: 5672
config.vm.network :forwarded_port, guest: 5671, host: 5671
View first.rb
require 'sinatra'
get '/hi' do
"Hello world!"
end
View onlyrepository.cs
public class TipCalculatorViewModel : INotifyPropertyChanged
{
private readonly TipCalculation _model;
private readonly ITipCalculatorRepository _repository;
public event PropertyChangedEventHandler PropertyChanged;
public TipCalculatorViewModel(ITipCalculatorRepository repository)
{
_model = new TipCalculation();
View gist:749f8c5de49bd2fb207b
public class Guest : UntypedActor
{
private IActorRef _receptionist;
public Guest()
{
var receptionist = Context.ActorSelection("/user/Klara");
receptionist.Tell(new Identify("111"), Self);
}
You can’t perform that action at this time.