Skip to content

Instantly share code, notes, and snippets.

Tom Van Looy tvlooy

Block or report user

Report or block tvlooy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
akpoff /
Created Jan 2, 2018
curl commands to query imap servers

curl commands to query imap servers

Based on

curl options

  • -k -- don't verify certificate (optional)
  • -n -- use .netrc for username and password (optional)
  • -X -- request to send to server
DragonBe / FinalClass.php
Created Jul 20, 2017
Testing final classes is tricky, but possible even though you cannot directly mock a "final" class
View FinalClass.php
namespace FinalClass;
require_once __DIR__ . '/vendor/autoload.php';
use PHPUnit\Framework\TestCase;
final class Foo
protected $bar;
Neo23x0 / nmap-cmdline
Last active Apr 23, 2019
Nmap Scan Params for CVE-2017-0143 MS17-010 Scanning
View nmap-cmdline
# Scan for CVE-2017-0143 MS17-010
# The vulnerability used by WannaCry Ransomware
# 1. Use @calderpwn's script
# 2. Save it to Nmap NSE script directory
# Linux - /usr/share/nmap/scripts/ or /usr/local/share/nmap/scripts/
# OSX - /opt/local/share/nmap/scripts/
marcan /
Last active May 22, 2019
Linux kernel initialization, translated to bash
# Linux kernel userspace initialization code, translated to bash
# (Minus floppy disk handling, because seriously, it's 2017.)
# Not 100% accurate, but gives you a good idea of how kernel init works
# GPLv2, Copyright 2017 Hector Martin <>
# Based on Linux 4.10-rc2.
# Note: pretend chroot is a builtin and affects the current process
# Note: kernel actually uses major/minor device numbers instead of device name
# Stop all containers
docker stop `docker ps -qa`
# Remove all containers
docker rm `docker ps -qa`
# Remove all images
docker rmi -f `docker images -qa `
# Remove all volumes
View answer.txt
I think the best way to answer this definitively without just handwaving
and talking about the C preprocessor is to actually write two small
example programs and compare the generated code from both. When I was
first learning C I did this constantly trying to understand how the
compiler worked. You don't need to understand assembly in great detail
to be able to spot differences in the output:
$ cat a.c
int main() {
char *line = "HTTP/1.0 500 Internal Server Error";
View openbsd-thinkpad-x1-carbon-2016
OpenBSD 6.0-beta (GENERIC.MP-vmm) #5: Fri Jun 3 16:44:43 CEST 2016
real mem = 17024200704 (16235MB)
avail mem = 16503730176 (15739MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xd7bfb000 (65 entries)
bios0: vendor LENOVO version "N1FET38W (1.12 )" date 03/30/2016
ligurio /
Last active Aug 4, 2019
Support of OpenBSD pledge(2) and unveil(2) in programming languages
View JMeter Server-Client setup with

##1. Setup docker



##2. Setup docker-machine

ImJasonH / markdown.css
Last active Oct 19, 2019
Render Markdown as unrendered Markdown (see
View markdown.css
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
You can’t perform that action at this time.