Skip to content

Instantly share code, notes, and snippets.

View elecnix's full-sized avatar

Nicolas Marchildon elecnix

View GitHub Profile
@elecnix
elecnix / setup-openwrt-usb.sh
Last active August 29, 2015 14:13
Setup USB storage for vfat USB key on OpenWrt (without OpenWrt internet acccess)
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
# 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 October 18, 2014 17:40
OpenWrt build from source from github.com/elecnix/openwrt/bococom Problèmes: Nécessite "Global Build Settings → Select all packages by default"
# TODO apply: Global Build Settings → Select all packages by default
#rm -f .config
#
#cp ../config-all .config
make IGNORE_ERRORS=1 V=99
@elecnix
elecnix / rlbuild-ramips-bb.sh
Created October 18, 2014 17:39
OpenWrt Trunk (Barrier Breaker) / ramips / rt305x ImageBuilder PROFILE=XDXRN502J with reseaulibre-feed/reseaulibre-mesh/files output to /var/www/rlbuild/
# Get the R-L custom scripts
#git clone https://git.gitorious.org/reseau-libre-openwrt/reseaulibre-feed.git
cd reseaulibre-feed
git pull
cd ..
# Update the list of ethers from the wiki
wget -O - http://wiki.reseaulibre.ca/documentation/ethers/ | grep -E [0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2} > reseaulibre-feed/reseaulibre-mesh/files/etc/ethers
# wget http://downloads.openwrt.org/snapshots/trunk/ramips/OpenWrt-ImageBuilder-ramips_rt305x-for-linux-x86_64.tar.bz2
@elecnix
elecnix / rlbuild-ramips.sh
Created October 18, 2014 17:39
OpenWrt 12.09 / ramips / rt305x ImageBuilder with reseaulibre-feed/reseaulibre-mesh/files output to /var/www/rlbuild/
# Get the R-L custom scripts
#git clone https://git.gitorious.org/reseau-libre-openwrt/reseaulibre-feed.git
cd reseaulibre-feed
git pull
cd ..
# Update the list of ethers from the wiki
wget -O - http://wiki.reseaulibre.ca/documentation/ethers/ | grep -E [0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2} > reseaulibre-feed/reseaulibre-mesh/files/etc/ethers
# wget http://downloads.openwrt.org/attitude_adjustment/12.09/ramips/rt305x/OpenWrt-ImageBuilder-ramips_rt305x-for-linux-i486.tar.bz2
@elecnix
elecnix / rlbuild-ar71xx-trunk.sh
Created October 18, 2014 17:38
OpenWrt 12.09 Attitude Adjustment ImageBuilder-ar71xx + Réseau Libre
#WIKI=http://wiki.reseaulibre.ca/
WIKI=http://reseaulibre.deuxpi.ca/
# Get the R-L custom scripts
#git clone https://git.gitorious.org/reseau-libre-openwrt/reseaulibre-feed.git
cd reseaulibre-feed
#git pull
cd ..
# Update the list of ethers from the wiki
@elecnix
elecnix / rlbuild-ar71xx.sh
Created October 18, 2014 17:37
OpenWrt 12.09 Attitude Adjustment ImageBuilder-ar71xx + Réseau Libre
#WIKI=http://wiki.reseaulibre.ca/
WIKI=http://reseaulibre.deuxpi.ca/
# Get the R-L custom scripts
#git clone https://git.gitorious.org/reseau-libre-openwrt/reseaulibre-feed.git
cd reseaulibre-feed
#git pull
cd ..
# Update the list of ethers from the wiki
@elecnix
elecnix / reseaulibre-jevoismtl.markdown
Last active August 29, 2015 14:07
Réseau Libre @ JEVOISMTL.COM

Réseau Libre

FICHE-ACTION, À COMPLÉTER SUR LE SITE INTERNET JEVOISMTL.COM

1. Dans quel chantier se trouve votre action?

IDENTITÉ ET ASPIRATION: Révéler Montréal comme un laboratoire

2. Nom de l'action

#!/bin/sh
cd /usr/share/meld/meld/
echo "Patching files in $(pwd)"
sed '
s/\(color_delete_bg"[^"]*\)"[^"]*"/\1"#003300"/
s/\(color_replace_bg"[^"]*\)"[^"]*"/\1"#112233"/
s/\(color_replace_fg"[^"]*\)"[^"]*"/\1"gray80"/
s/\(color_conflict_fg"[^"]*\)"[^"]*"/\1"White"/
@elecnix
elecnix / scan.awk
Created September 24, 2014 03:15
Parse iw scan output
# iw wlan0 scan | sed -e 's#(on wlan# (on wlan#g' | awk -f scan.awk
$1 == "BSS" {
MAC = $2
print $2
e = wifi[MAC]
e["enc"] = "Open"
}
$1 == "SSID:" {
e = wifi[MAC]
e["SSID"] = $2