Skip to content

Instantly share code, notes, and snippets.

View sroze's full-sized avatar

Samuel ROZE sroze

View GitHub Profile
@sroze
sroze / poc_test.c
Created January 11, 2018 17:33
Spectre's PoC
#define _GNU_SOURCE
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
#include <sys/mman.h>
#include <err.h>
#include <stdbool.h>
#include <ctype.h>
<?php
// Expected output:
// Got exception do nothing
// Got message test2
// Got message test3
// Actual output:
// Got exception do nothing
// Got message test3
@sroze
sroze / terraform-outputs-as-variables.js
Created January 2, 2019 09:35
Terraform & Serverless: our perfect "functions-as-a-service" CI.
const execSync = require('child_process').execSync;
module.exports = () => {
const configuration = {};
const terraformFolder = process.env.SERVERLESS_ENVIRONMENT == 'production' ? 'production' : 'staging';
const cwd = __dirname + '/' + terraformFolder;
const output = execSync('terraform output -json', {
cwd,
encoding: 'utf-8',
#define _GNU_SOURCE
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
#include <sys/mman.h>
#include <err.h>
#include <stdbool.h>
#include <ctype.h>
@sroze
sroze / etc-default-kubelet (master)
Last active September 17, 2019 02:53
Kuberlet upstart
IP=127.0.0.1 # Or your public/private IP
KUBELET_OPTIONS="--api_servers=http://$IP:8080 --v=2 --address=0.0.0.0 --enable_server --hostname_override=$IP --config=/etc/kubernetes/manifests"
#!/bin/bash
# git-branch-status
# * originally by http://github.com/jehiah
# * "s'all good!" message by http://github.com/kd35a
# * ANSI colors by http://github.com/knovoselic
# * column formatting, filters, and usage by http://github.com/bill-auger
# this script prints out pretty git branch sync status reports
@sroze
sroze / MyCommand.php
Last active June 6, 2021 13:58
Symfony Command that read file from file name or STDIN
<?php
namespace AmceBundle\Command;
class MyCommand
{
// ...
protected function execute(InputInterface $input, OutputInterface $output)
{