Skip to content

Instantly share code, notes, and snippets.

☁️
Cloudy with a chance of AWS

Hervé Nivon hervenivon

☁️
Cloudy with a chance of AWS
Block or report user

Report or block hervenivon

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hervenivon
hervenivon / parallel.py
Created Mar 13, 2019
Scaffolding for parallel python and `tqdm`
View parallel.py
#!/usr/bin/env python3
from multiprocessing import Pool
from tqdm import tqdm
from queue import Queue
from threading import Thread
import random
import time
THREADS = 5
@hervenivon
hervenivon / .bash_profile
Last active Feb 15, 2018
.bash_profile for Amazon Linux DLAMI based (including gdal)
View .bash_profile
# default .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=/usr/local/bin/:$HOME/.local/bin:$HOME/bin:$PATH
@hervenivon
hervenivon / benchmark.js
Created Jan 15, 2018
Quick performance read/write comparison based on linux `dd`
View benchmark.js
#!/bin/bash
BUFFERSIZE=1048576
WHERE="/dev/shm/test /mnt/data/test"
RESULTS="/tmp/benchmark_results.csv"
echo "WHERE;TYPE;SIZE;DURATION;SPEED;SPEEDUNIT" > $RESULTS
for i in `seq 1 10`;
do
@hervenivon
hervenivon / awazon-linux-gdal-installation.sh
Last active Jan 21, 2019
Install GEOS, PROJ4 & GDAL on amazon linux
View awazon-linux-gdal-installation.sh
export PYTHON_VERSION=3.4.3
export PYTHON_SHORT_VERSION=3.4
export GEOS_VERSION=3.6.2
export GDAL_VERSION=2.2.2
export PROJ4_VERSION=4.9.3
sudo yum-config-manager --enable epel
sudo yum install gdal-python
sudo yum -y install make automake gcc gcc-c++ libcurl-devel proj-devel geos-devel
@hervenivon
hervenivon / config.yml
Last active Jan 15, 2019
circleci config file for node8 and dynamodb on localstack
View config.yml
version: 2
references:
base_container_config: &base_container_config
docker:
- image: circleci/node:8
working_directory: ~/repo
test_container_config: &test_container_config
docker:
@hervenivon
hervenivon / ThisOutlookSession.vba
Last active Oct 13, 2015
Outlook VBA for email addresses extraction. To place in 'ThisOutlookSession'
View ThisOutlookSession.vba
'this procedure is largely inspired by a comment from Bujez on Novembre 2010 on this thread:
'http://omaralzabir.com/get_email_address_of_all_users_from_all_mails_in_outlook_folder/
'Rewright needs to be done to make it recursive but it works as is with Outlook 2013
Sub EmailExport()
'Requires reference to Microsoft Scripting Runtime
'Tools –> References –> check “Microsoft Scripting Runtime”
Dim outApp As New Outlook.Application
Dim mpf As Outlook.MAPIFolder
Dim mpfSubFolder As Outlook.MAPIFolder
Dim flds As Outlook.Folders
@hervenivon
hervenivon / config.json
Last active Oct 14, 2015
Quickly generate presigned url for all files in a particular AWS S3 bucket location
View config.json
{
"Region": "TOCHANGE",
"Bucket": "tochange",
"Location": "to/change/"
}
You can’t perform that action at this time.