Skip to content

Instantly share code, notes, and snippets.

View sroze's full-sized avatar

Samuel ROZE sroze

View GitHub Profile
@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)
{
#!/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 / 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"
#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 / 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',
<?php
// Expected output:
// Got exception do nothing
// Got message test2
// Got message test3
// Actual output:
// Got exception do nothing
// Got message test3
@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>
@sroze
sroze / download-file.sh
Last active December 15, 2017 17:16
Share files with transfer.sh (encrypted)
curl https://transfer.sh/<unique-string>/database.sql | gpg -o- > database.sql

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 June 14, 2016 14:04
Docker & CP example 1
environment_variables:
- name: GITHUB_TOKEN
value: thevalue
- name: SOME_SECRET
value: blahblha