Skip to content

Instantly share code, notes, and snippets.

View fredleger's full-sized avatar
🏠
Working from home

Frederic Leger fredleger

🏠
Working from home
View GitHub Profile
@fredleger
fredleger / keybase.md
Created June 19, 2016 13:41
keybase.md

Keybase proof

I hereby claim:

  • I am fredleger on github.
  • I am fredleger (https://keybase.io/fredleger) on keybase.
  • I have a public key whose fingerprint is 8638 53DF A30A C330 4042 4146 6DEB 5ADB 0F7F EF14

To claim this, I am signing this object:

@fredleger
fredleger / Vagrantfile
Created August 25, 2016 09:38
Default Vagrantfile (OS wide)
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "debian/contrib-jessie64"
config.vm.network "public_network"
# get arround a vagrant bug : http://stackoverflow.com/questions/34176041/vagrant-with-virtualbox-on-windows10-rsync-could-not-be-found-on-your-path
config.vm.synced_folder ".", "/vagrant", type: "virtualbox"
# settings bellow
@fredleger
fredleger / twilio.xml
Last active September 15, 2017 09:23
XML used to notify on-call budy via twilio
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Say loop=3>Hi dude! Here is the monitoring system. Something need your attention. You might want to have a look. Gday</Say>
</Response>
#!/bin/bash -x
# --------------------------------------------------
# stop a synology nas using ssh and poweroff
# --------------------------------------------------
CURRENTDIR=$(dirname $(realpath $0))
HOST=${1:-192.168.77.2}
USER=${2:-admin}
function github-release-url() {
read -p 'what is GH url of project ?> ' GHU
curl -sS $GHU | perl -ne '/\s+<a href="(.*)" rel="nofollow"/ && print "$1\n"'
}
@fredleger
fredleger / ubuntu-post-install.sh
Last active December 23, 2017 11:09
post-install-scripts
#!/bin/bash
export DEBIAN_FRONTEND=noninteractive
apt-get update -yqq && apt-get upgrade -yqq
echo "enjoy !"
@fredleger
fredleger / setup-my-byobu.sh
Last active September 28, 2018 10:30
my-byobu
#!/bin/sh
[ -d $HOME/.byobu ] || mkdir $HOME/.byobu
cat <<EOF > $HOME/.byobu/status
# Screen has two status lines, with 4 quadrants for status
screen_upper_left="color"
screen_upper_right="color whoami hostname ip_address menu"
screen_lower_left="color logo distro release #arch session"
screen_lower_right="color network #disk_io custom #entropy raid reboot_required updates_available #apport #services #mail users uptime #ec2_cost #rcs_cost #fan_speed #cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap #disk #time_utc date time"
@fredleger
fredleger / entrypoint.sh
Created November 26, 2018 16:11
Detect if mysql container is ready
#!/bin/bash
php "./bin/mysql-is-ready"
php app/console doctrine:schema:create --no-debug
php app/console doctrine:schema:update --no-debug
@fredleger
fredleger / .env
Created April 23, 2020 10:07
Local CI/CD with Gitlab
SSH_PRIVATE_KEY="xxxxxxxxx - redacted base64 content --- xxxxxxxxx"
AWS_DEFAULT_REGION="eu-west-3"
AWS_ACCESS_KEY_ID="redacted"
AWS_SECRET_ACCESS_KEY="redacted"