Skip to content

Instantly share code, notes, and snippets.

Avatar

Nicolas elecnix

View GitHub Profile
@elecnix
elecnix / Vagrantfile
Created Oct 31, 2017
Beersmith Vagrant
View Vagrantfile
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial64"
config.ssh.forward_x11 = true
config.vm.provision "shell", path: "https://gist.githubusercontent.com/elecnix/dd31ee274c5e721ce42acd27412ad3f0/raw/dbf9c3fff720c2e8aa768bf8cb264ede37cedfe2/gistfile1.txt"
end
View gist:dd31ee274c5e721ce42acd27412ad3f0
wget -q https://s3.amazonaws.com/beersmith2-3/BeerSmith-2.3.12_amd64.deb
apt-get update
apt-get download libwebkitgtk-1.0-0 libwebkitgtk-1.0-common libjavascriptcoregtk-1.0-0
dpkg -i *.deb
View docker-compose.yml
# Ce fichier sert à exécuter un collecteur, un dashboard, et une base de données InfluxDB.
#
# 1. git clone https://gist.github.com/51637af8e7bea6d4faf8471397e4b0e5.git erabliere
# 2. cd erabliere
# 3. git clone https://github.com/elecnix/ErabliCollecteur.git
# 4. git clone https://github.com/elecnix/ErabliDash.git
# 5. docker-compose up -d
# 6. Ouvrir http://localhost:3000/ pour ErabliDash
# 7. Ouvrir http://localhost:3001/ pour Grafana
#
View lspatch
#!/bin/bash
repos=$(ls ~/repos)
for repo in $repos ; do
if [ -d ~/repos/$repo/.hg ] ; then
echo -e "\e[93m$repo\e[0m"
hg --cwd ~/repos/$repo qseries -v -s
if [ -d ~/repos/$repo/intelebase/.hg ] ; then
hg --cwd ~/repos/$repo/intelebase qseries -v -s
fi
View metrics-matrix.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<head>
<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="jquery.sparkline.js"></script>
<script type="text/javascript">
$(function() {
for (row = 0; row < 80; row++) {
var myvalues = [];
for (i = 0; i < 500; i++) {
View krida-SparkIntervalTimer.ino
#include "SparkIntervalTimer/SparkIntervalTimer.h"
//SYSTEM_MODE (MANUAL);
volatile int i = 0; // Variable to use as a counter volatile as it is in an interrupt
volatile boolean zero_cross = 0; // Boolean to store a "switch" to tell us if we have crossed zero
int AC_pin = D7; // Output to Opto Triac
int dim = 0; // Dimming level (0-128) 0 = on, 128 = 0ff
int inc = 1; // counting up or down, 1=up, -1=down
View gist:9e85959bf1b920bf519b
cat top-1m.csv | sed -e 's_.*,\(.*\)_echo | openssl s\_client -connect \1:443 > certs/\1.pem\&_' > certs.sh
bash certs.sh
ls certs | xargs -L1 -I DOMAIN echo 'openssl x509 -in certs/DOMAIN -text -noout > checks/DOMAIN.check' > checks.sh
bash checks.sh
cat top-1m.csv | sed -e 's#.*,\(.*\)#\1#'| xargs -n1 -P20 -I DOM grep -H 'Not After' checks/DOM.pem.check 2>/dev/null | cut -d ':' -f 1,3-|sed -e 's_checks/\(.*\).pem.check: \(.*\)_\1,\2_' > top-1m-expiry.csv
@elecnix
elecnix / setup-openwrt-usb.sh
Last active Aug 29, 2015
Setup USB storage for vfat USB key on OpenWrt (without OpenWrt internet acccess)
View setup-openwrt-usb.sh
BASE_URL=https://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/base/
TARGET_IP=192.168.1.1
TARGET_USER=root
KERNEL_VERSION=3.10.49-1
HARDWARE=ar71xx
MODULES="kmod-fs-vfat kmod-nls-base kmod-nls-cp437 kmod-nls-iso8859 kmod-scsi-core kmod-usb2 kmod-usb-storage"
for MOD in MODULES do
wget $MOD_$KERNEL_$VERSION_$HARDWARE.ipk
done
wget $BASE_URL/block-mount_2014-06-22-e0430f5c62f367e5a8e02755412977b02c3fc45e_ar71xx.ipk
View adresses-ponctuelles.sh
# http://donnees.ville.montreal.qc.ca/dataset/adresses-ponctuelles
#
# Description du fichier:
#
# Nom du champ Description
# ============= ===========
# ADDR_DE adresse minimale sur le bâtiment
# ADDR_A adresse maximale sur le bâtiment
# ORIENTATIO orientation de la voie (toponymie)
# SPECIFIQUE nom de la voie (toponymie)
@elecnix
elecnix / openwrt-bococom.sh
Created Oct 18, 2014
OpenWrt build from source from github.com/elecnix/openwrt/bococom Problèmes: Nécessite "Global Build Settings → Select all packages by default"
View openwrt-bococom.sh
# TODO apply: Global Build Settings → Select all packages by default
#rm -f .config
#
#cp ../config-all .config
make IGNORE_ERRORS=1 V=99
You can’t perform that action at this time.