Skip to content

Instantly share code, notes, and snippets.

@t-chab
t-chab / simple-mailer-howto.md
Last active October 22, 2020 21:45
Simple smtp setup

How to quickly setup an forwarding SMTP with Postfix

Requirements

Install Postfix

Configuration

Without auth

# Some useful docker shell aliases for bash
# Cleanup stopped container (could print some warnings if containers are running)
alias dkr_clean='docker rm $(docker ps -a -q)'
# Cleanup images
alias dkr_clean_img='docker rmi $(docker images |grep '"'"'<none>'"'"' |awk '"'"'{ print $3}'"'"')'
# Start docker-compose using docker-compose.yml in current directory
# Cleaning obsolete containers
@t-chab
t-chab / init.el
Last active November 22, 2016 06:01
Simplified emacs startup file
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Begin file
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Package management
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(require 'package)
(setq package-enable-at-startup nil)
{
"scenarios": [{
"period": {
"start": 2015,
"unit": "year"
},
"test_case": {
"individus": [{
"id": "Personne 1"
}],
@t-chab
t-chab / chmod.sh
Created June 22, 2016 12:04
Recursive chmod 755-644
chmod -R u+rwX,g+rwX,o-w /path
#!/usr/bin/env sh
ffmpeg -i "$1" -vcodec libx264 -vprofile high -preset slower -b:v 3500k -vf scale=-1:720 -threads 0 -acodec libvo_aacenc -ab 256k /tmp/mobile_devices_converted.mp4
{
"version": "0.9.17.2.2159-2bd156c"
}
@t-chab
t-chab / private.xml
Last active January 31, 2017 10:56
Karabiner french mapping for use with Remote Desktop
<?xml version="1.0"?>
<root>
<appdef>
<appname>Microsoft Remote Desktop</appname>
<equal>com.microsoft.rdc.mac</equal>
</appdef>
<item>
<name>French Mac keyboard A1314 using the Microsoft Remote Desktop App</name>
<appendix>Assure all keys written on the keyboard to be the same on the remote server.</appendix>
<appendix>Done for Version 8.0.12 (Build 25282)</appendix>
ip ro change default via GATEWAY_IP dev eth0 src IFACE_IP
@t-chab
t-chab / Vagrantfile
Created December 17, 2015 14:06
Vagrantfile to propagate http_proxy config to guest
Vagrant.configure("2") do |config|
puts "proxyconf..."
if Vagrant.has_plugin?("vagrant-proxyconf")
puts "find proxyconf plugin !"
if ENV["http_proxy"]
puts "http_proxy: " + ENV["http_proxy"]
config.proxy.http = ENV["http_proxy"]
end
if ENV["https_proxy"]
puts "https_proxy: " + ENV["https_proxy"]