Skip to content

Instantly share code, notes, and snippets.

View squioc's full-sized avatar

Sébastien Quioc squioc

View GitHub Profile
@squioc
squioc / commands.sh
Created December 2, 2017 14:44 — forked from jseguillon/commands.sh
Devops rennes 2017 hands on Terraform Openstack
##
docker pull jseguillon/openbox || docker pull jseguillon/openbox:alpine
git clone https://gist.github.com/2c2b2220a4b9e294733e6ff09966f591.git dops-ren && cd dops-ren
##
ssh-keygen -f ./openstack -b 4096
#ovh 4096 key
docker run -d -it --name dops-ren --mount type=bind,source="$(pwd)",target=/usr/share/source jseguillon/openbox:alpine
#Or non alpine
@squioc
squioc / encoder.py
Created September 14, 2016 15:55
Create an encoding function according to an alphabet
"""
The MIT License (MIT)
Copyright (c) 2016 Sebastien Quioc
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
@squioc
squioc / gist:6406987
Created September 1, 2013 20:06
Format remaining or elapsed time according to thresholds
"""
The MIT License (MIT)
Copyright (c) 2013 Sebastien Quioc
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
@squioc
squioc / README.markdown
Last active December 16, 2015 15:59
A python script to generate a base64 data-uri
@squioc
squioc / LICENSE
Last active December 12, 2015 02:28
conversion between iso8601 date format and unix epoch datetime (with timezone awareness)
Copyright © Sébastien Quioc
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
The Software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or othe
@squioc
squioc / gist:3267248
Created August 5, 2012 21:48
[BASH] check the number of function parameters
#!/bin/bash
# -*- coding: UTF8 -*-
function usage() {
echo "$(basename ${0}) <first_arg> <second_arg>";
echo "";
echo "<first_arg> the first argument";
echo "<second_arg> the second argument";
}
@squioc
squioc / build.s
Created August 5, 2012 21:41
a Lightened Build tool with bash script
action "say"
desc "say hello" #action description
#bash script here
echo "Hello world"
echo "Blank line doesn't stop block"
#Comment are unheeded
@squioc
squioc / gist:3078803
Created July 9, 2012 20:49
conversion between iso8601 date format and unix epoch datetime
from datetime import datetime
import calendar
def epoch_to_iso8601(timestamp):
"""
epoch_to_iso8601 - convert the unix epoch time into a iso8601 formatted date
>>> epoch_to_iso8601(1341866722)
'2012-07-09T22:45:22'
"""