Skip to content

Instantly share code, notes, and snippets.

View vincentbernat's full-sized avatar

Vincent Bernat vincentbernat

View GitHub Profile
# Use backtick as hotkey
unbind C-b
set -g prefix `
bind-key ` send-prefix
## Options
# Use screen-256color for $TERM
set -g default-terminal "screen-256color"
# True color support
diff --git a/src/51d.c b/src/51d.c
index 212d9b899bb5..40c9d37a53a5 100644
--- a/src/51d.c
+++ b/src/51d.c
@@ -493,7 +493,7 @@ void _51d_init_http_headers()
{
int index = 0;
global._51degrees.header_count = fiftyoneDegreesGetHttpHeaderCount();
- global._51degrees.device_offsets.firstOffset = (fiftyoneDegreesDeviceOffset*)malloc(
+ global._51degrees.device_offsets.firstOffset = malloc(
/* Proof of concept of the inability to attach to an existing NS in
* the same user namespace. */
#define _GNU_SOURCE 1
#include <sys/wait.h>
#include <sys/utsname.h>
#include <sched.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
import os
import pytest
import cs
import hashlib
import time
import socket
import io
from paramiko.client import SSHClient, AutoAddPolicy
from paramiko.rsakey import RSAKey
(def compressed-string-encoder
"Encoder turning a string to a compressed byte array"
(reify
Encoder
(toBytes [this ^java.lang.String string]
(concat-byte-arrays
compression-magic-word
(Snappy/compress string "UTF-8")))))
/* global _ */
/*
* Generate a dashboard for a given server or server farm. The global
* idea is that the generated dashboard will show everything that
* needs to be known from a server. It contains generic metrics like
* CPU/memory, it contains one graph for each network interfaces and
* it also contains specific metrics with regards on what is running
* on the server.
*
#!/bin/zsh
set -x
set -e
# Various quirks to enable bluetooth
rfkill block bluetooth
sudo service bluetooth stop
sudo modprobe -r btusb
sudo modprobe btusb
cpu = `dpkg-architecture -qDEB_HOST_ARCH_CPU`.chomp
os = `dpkg-architecture -qDEB_HOST_ARCH_OS`.chomp
depends = Array(@dsc["Build-Depends"]) + Array(@dsc["Build-Depends-Indep"])
conflicts = Array(@dsc["Build-Conflicts"]) + Array(@dsc["Build-Conflicts-Indep"])
# We need to filter out arch-specific dependencies
def filter_arch (dependencies, cpu, os)
dependencies.gsub(/(?:(\s*[|,]\s*))?([^,|\[]+)\s+\[([^\]]+)\]/) { |c|
sep = $1
dep = $2
@version: 3.6
@include "scl.conf"
@define basepath "/home/bernat/Documents/exoscale/S03-2015/bug1"
options {
chain_hostnames(off);
ts-format(iso);
use_dns(no);
use_fqdn(no);
@vincentbernat
vincentbernat / cve-2015-3456.c
Last active August 29, 2015 14:21
CVE-2015-3456 "exploit"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/io.h>
/**
* "Exploit" for CVE-2015-3456. This will only crash the VM. Compile with:
* gcc -Wall -std=c99 cve-2015-3456.c -o cve-2015-3456
*/