Skip to content

Instantly share code, notes, and snippets.

View base-jump-org's full-sized avatar

Jean Michel base-jump-org

View GitHub Profile
@base-jump-org
base-jump-org / get-client-ubiquiti-bullet.sh
Last active August 29, 2015 14:17
Get number of AP clients on different access point (SNMP stats / ubiquiti - zyxel)
#! /bin/bash
#
# Get number of connected clients
# on Ubiquiti Bullet AP (SNMP)
# for MRTG graphs
#
# jm@base-jump.org
# 2015
##################
COMMUNITY="public-community-name"
@base-jump-org
base-jump-org / reboot-wifi.sh
Created March 25, 2015 12:25
Manage Zyxel access Point
#! /bin/bash
#
# reboot zyxel wifi AP
# jm@base-jump.org
# 2009
########################
# Settings
REBOOT="web243.cgi"
URL="[IP of Zyxel router]"
@base-jump-org
base-jump-org / wifi-code-rotate.sh
Last active August 29, 2015 14:17
Automatic WiFi code for Cybercafe. OpenWRT Linksys router
#!/bin/bash
#
# Automatic code for WiFi on server
# Random code or from ./dictionnaire.txt
#
# jm@base-jump.org
# 2015
#########################
DIR=`dirname "$0"`
DICT="$DIR/dictionnaire.txt"
@base-jump-org
base-jump-org / balise_ffvl.py
Last active August 29, 2015 14:17
Create JSON from FFVL http://www.balisemeteo.com datas
#! /usr/bin/env python
#
# Parse balisemeteo.com
# create JSONs
#
# jm@base-jump.org
# 2015
####################
import codecs, sys, os
import time
@base-jump-org
base-jump-org / youtube.sh
Last active August 29, 2015 14:17
Get youtube JSON : last videos of a channel. ! be carefull ! use a deprecated youtube API, need to use API V2 with a key on next version
#!/bin/bash
#
# Youtube API
# Get Channel info
# JSON
# jm@base-jump.org 2015
#
###############"
CHANNELID="PLKIuphz6eUGFCBkVmCpv7j4cXAepoMKiu" # change for your channel here
@base-jump-org
base-jump-org / getTwitter.py
Last active August 29, 2015 14:17
Create JSON from twitter last tweets
#! /usr/bin/env python
# -*- coding: us-ascii -*-
#
# jm@base-jump.org
# 2015
#########################
from __future__ import unicode_literals
import tweepy, time, sys, codecs, json
@base-jump-org
base-jump-org / input_xml-file-skiplan.xml
Last active August 29, 2015 14:17
Create Weather forecast JSON and skilifts / slopes state JSON from LUMIPLAN / skiplan.com XML file (http://www.skiplan.com). In use on http://www.lescontamines.net
<?xml version="1.0" encoding="UTF-8"?>
<STATION nom="LES CONTAMINES" lang="fr" version="2.2"><PERIODE datevaldeb="01/10/2000" datevalfin="30/09/2000" lib="hiver"/><DATEINFO>18/03/2015 09:45</DATEINFO><METEO><PARAMETRES datevaldeb="18/03/2015" datevalfin="18/03/2015" datemaj="18/03/2015 08:09"><ZONE nom="SIGNAL" altitude="1880" reference="SIGNAL"><VALRISQUE>1</VALRISQUE><LIBRISQUE>FAIBLE</LIBRISQUE><RSQ_REEL>0</RSQ_REEL><TEMPERATURE>+11</TEMPERATURE><TEMPERATURE_APM>+0</TEMPERATURE_APM><TEMPERATURE_RESSENTIE>+8</TEMPERATURE_RESSENTIE><NEIGE>0</NEIGE><CUMUL>120</CUMUL><VENT>8</VENT><DIRECTION>S</DIRECTION><RAFALES>0</RAFALES><QUALITE>DE PRINTEMPS</QUALITE><QLT_ID>105</QLT_ID><VISIBILITE>100</VISIBILITE><CIEL>SOLEIL</CIEL><CIEL_ID>1</CIEL_ID><CIEL_ID_APM>2</CIEL_ID_APM><DERNIERE_CHUTE>03/03/2015</DERNIERE_CHUTE><LIMITE_ISOTERME_0>0</LIMITE_ISOTERME_0><LIMITE_ISOTERME_10>0</LIMITE_ISOTERME_10><LIMITE_PLUIE_NEIGE>0</LIMITE_PLUIE_NEIGE><INDICE_UV>0</INDICE_UV><RISQUE_ORAGE>0</RISQUE_ORAGE></ZONE><ZONE nom="AIGUILLE