Skip to content

Instantly share code, notes, and snippets.

Avatar

Samuel ROZE sroze

View GitHub Profile
@sroze
sroze / terraform-outputs-as-variables.js
Created Jan 2, 2019
Terraform & Serverless: our perfect "functions-as-a-service" CI.
View terraform-outputs-as-variables.js
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',
View bug-example.php
<?php
// Expected output:
// Got exception do nothing
// Got message test2
// Got message test3
// Actual output:
// Got exception do nothing
// Got message test3
View poc_test.c
#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 / poc_test.c
Created Jan 11, 2018
Spectre's PoC
View poc_test.c
#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 / download-file.sh
Last active Dec 15, 2017
Share files with transfer.sh (encrypted)
View download-file.sh
curl https://transfer.sh/<unique-string>/database.sql | gpg -o- > database.sql
View keybase.md

Keybase proof

I hereby claim:

  • I am sroze on github.
  • I am sroze (https://keybase.io/sroze) on keybase.
  • I have a public key whose fingerprint is D12F 83A6 F476 C26A 0563 3F12 8354 26F5 5A19 FB84

To claim this, I am signing this object:

@sroze
sroze / "configuration" on CP ui
Last active Jun 14, 2016
Docker & CP example 1
View "configuration" on CP ui
environment_variables:
- name: GITHUB_TOKEN
value: thevalue
- name: SOME_SECRET
value: blahblha
View git-branch-status
#!/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 Nov 17, 2019
Symfony Command that read file from file name or STDIN
View MyCommand.php
<?php
namespace AmceBundle\Command;
class MyCommand
{
// ...
protected function execute(InputInterface $input, OutputInterface $output)
{
@sroze
sroze / etc-init-docker-bootstrap
Created May 25, 2015
Docker bootstrap upstart
View etc-init-docker-bootstrap
description "Docker bootstrap"
script
# modify these in /etc/default/$UPSTART_JOB (/etc/default/docker-bootstrap)
DOCKER=/usr/bin/docker
DOCKER_OPTIONS="-d -H unix:///var/run/docker-bootstrap.sock -p /var/run/docker-bootstrap.pid --iptables=false --ip-masq=false --bridge=none --graph=/var/lib/docker-bootstrap"
if [ -f /etc/default/$UPSTART_JOB ]; then
. /etc/default/$UPSTART_JOB
fi
exec "$DOCKER" $DOCKER_OPTIONS
You can’t perform that action at this time.