Skip to content

Instantly share code, notes, and snippets.

View Miesvanderlippe's full-sized avatar

Mies van der Lippe Miesvanderlippe

  • Den Haag, Nederland
View GitHub Profile
@Miesvanderlippe
Miesvanderlippe / user-data
Created May 1, 2020 12:19
Hack to enable true auto-install for Ubuntu 20.04 with cloud-init nocloud
#cloud-config
runcmd:
- [eval, 'echo $(cat /proc/cmdline) "autoinstall" > /root/cmdline']
- [eval, 'mount -n --bind -o ro /root/cmdline /proc/cmdline']
- [eval, 'snap restart subiquity.subiquity-service']
autoinstall:
version: 1
identity:
hostname: hack-nation
@Miesvanderlippe
Miesvanderlippe / batch_download_hash.sh
Created July 24, 2019 13:01
Script to automatically clone a webpage using HTTrack, zip it, hash it and log all of the above.
#!/bin/bash
# Check to see if a pipe exists on stdin.
if [ -p /dev/stdin ]; then
while IFS= read line; do
echo "Downloading site: ${line}"
# Strip anything unsafe from url
SAFE_FILE_NAME=$(echo ${line} | sed -E 's/[^A-Za-z0-9._\-]/-/g')
# assumes https://github.com/epitron/mitm-adblock running for sakes of cookiebanner blocking etc.
@Miesvanderlippe
Miesvanderlippe / autopsy.desktop
Created January 27, 2019 14:38
Generic Autopsy desktop file for Debian. Make sure the icon and exec path match where you unpacked Autopsy.
[Desktop Entry]
Categories=System;
Comment[en_US]=Autopsy Forensic Browser
Comment=Autopsy Forensic Browser
Exec=/home/ifto/Autopsy/bin/autopsy
GenericName[en_US]=Autopsy Forensic Browser
GenericName=Autopsy Forensic Browser
Icon=/home/ifto/Autopsy/icon.ico
MimeType=
Name[en_US]=Autopsy
using System;
namespace LoginFunction
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("How many users will you register? ");
using System;
using System.Collections.Generic;
using System.Linq;
namespace LoginFunction
{
class Program
{
static void Main(string[] args)
{
@Miesvanderlippe
Miesvanderlippe / installation.md
Last active February 23, 2018 10:59
Basic Shairpoirt installation on RasPi3

Required packages sudo apt-get install build-essential git xmltoman autoconf automake libtool libdaemon-dev libpopt-dev libconfig-dev libasound2-dev avahi-daemon libavahi-client-dev libssl-dev

Get and install ALAC for better audio.

git clone https://github.com/mikebrady/alac.git
cd alac
autoreconf -fi
./configure
make
@Miesvanderlippe
Miesvanderlippe / ClosestSolution.cs
Created December 9, 2017 13:58
And exercise for a user in a C# Telegram group.
using System;
using System.Collections.Generic;
using System.Linq;
namespace ConsoleApp1
{
internal interface Solution
{
/// <summary>
/// Simple interface for solutions to math problems with 2 factors
@Miesvanderlippe
Miesvanderlippe / test.bat
Created January 27, 2016 10:24
Just a test
@echo Hello world.
@pause
@Miesvanderlippe
Miesvanderlippe / gist:e57119a151bd26e6d250
Created February 20, 2015 08:28
Draw a prize with predifined chances.
$aChances = [
0 => [
'perc' => 25,
'chance' => 650
],
1 => [
'perc' => 50,
'chance' => 220
],
2 => [