Skip to content

Instantly share code, notes, and snippets.

View jsoriano's full-sized avatar

Jaime Soriano Pastor jsoriano

View GitHub Profile
@estesp
estesp / overlay-copy-up-and-delete-with-userns.md
Last active March 29, 2016 08:50
Overlay bug with user namespaces + copy_up + dir removal (whiteout)

overlayfs copy-up without userns

Setup: create proper directories, with a pre-existing dir (called dir) in lower, and then mount as overlay fs:

$ mkdir upper lower work merged upper lower/dir
$ sudo mount -t overlay overlay -olowerdir=lower,upperdir=upper,workdir=work merged

You can now create files in the merged/dir to force a copy up of lower/dir to upper/dir:

@abeaumont
abeaumont / hitcon-polyglot
Created August 18, 2014 12:50
Hitcon CTF 2014 polyglot (C, Python 2, Python 3, Ruby, Haskell)
a={-1//1,""""/=>3}
#if 0
BEGIN { puts `cat flag`; exit; }
__END__
"""} # "
import os; os.system('cat flag')
""" # "
#endif
};
main () { system("cat flag"); } /* -} 0
@mpasternacki
mpasternacki / README.md
Last active January 18, 2018 10:56
A Continuous Packaging Pipeline: The Materials

A Continuous Packaging Pipeline

A list of tools mentioned in my Ignite talk from Devopsdays Rome 2012 on a continuous packaging pipeline, with links and short description for each tool.

The talk slides are at https://speakerdeck.com/mpasternacki/a-continuous-packaging-pipeline; a longer blog post will be written soon.

Vendorificator

Available at https://github.com/3ofcoins/vendorificator/ or with gem install vendorificator

Include third party modules in your git repo, using pristine branches to sanely maintain local changes, upgrades, and merges.

@wofeiwo
wofeiwo / gist:3634357
Created September 5, 2012 10:00
Golang daemonize
/* ivan(a.t)mysqlab.net */
package main
import (
"syscall"
"os"
"log"
)
func daemon(nochdir, noclose int) int {
@esperlu
esperlu / mysql2sqlite.sh
Created April 27, 2011 05:46
MySQL to Sqlite converter
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite