Skip to content

Instantly share code, notes, and snippets.

View pmudry's full-sized avatar

Pierre-André Mudry pmudry

  • Filière ISC, HES-SO Valais-Wallis
  • Switzerland
View GitHub Profile
@pmudry
pmudry / linux_commands.md
Created October 29, 2018 22:04
Cool linux command
  • networkctl
  • sudo netstat -tulpn
@pmudry
pmudry / server.md
Last active June 25, 2019 14:06
Server installation

Work in progress

Installation overview

  • Ubuntu server 18.04 LTS
  • ZFS
  • With OpenSSH, Apache, MySQL

Things done after install

  • Removed

Installing virtual machine stuff for running pfSense

sudo apt-get install qemu-kvm virt-install libvirt-bin

Optionnally : sudo apt-get install virt-viewer virt-manager for a machine using X (which I don't have)

Getting and installing the image

wget https://frafiles.pfsense.org/mirror/downloads/pfSense-CE-2.4.3-RELEASE-amd64.iso.gz
gunzip pfSense-CE-2.4.3-RELEASE-amd64.iso.gz
@pmudry
pmudry / grafana.json
Last active April 4, 2018 20:56
Grafana météo ayent with weewx exported
{
"__inputs": [
{
"name": "DS_WEATHER_STATION",
"label": "Weather station",
"description": "",
"type": "datasource",
"pluginId": "influxdb",
"pluginName": "InfluxDB"
}
@pmudry
pmudry / weather.json
Created April 2, 2018 14:31 — forked from timraymond/weather.json
Grafana Dashboard for displaying weather information supplied by Weewx
{
"id": 1,
"title": "Wild View Weather",
"tags": [],
"style": "dark",
"timezone": "browser",
"editable": true,
"hideControls": false,
"sharedCrosshair": false,
"rows": [
@pmudry
pmudry / HiFive1-PWM-interrupts.c
Created February 20, 2018 12:58 — forked from dgrubb/HiFive1-PWM-interrupts.c
HiFive1 PWM interrupt sample
/* HiFive1/FE310 includes */
#include "platform.h"
#include "encoding.h"
#include "plic/plic_driver.h"
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
@pmudry
pmudry / HiFive1-Timer-interrupt.c
Created February 20, 2018 12:57 — forked from dgrubb/HiFive1-Timer-interrupt.c
HiFive1 Timer interrupt sample
/* Standard includes */
#include <stdio.h>
/* HiFive1/FE310 includes */
#include "sifive/devices/spi.h"
#include "platform.h"
#include "encoding.h"
#include "plic/plic_driver.h"
volatile int invert_LEDs = 0;
@pmudry
pmudry / gist:2831aa9c2c3823886604775229faa7a6
Last active January 30, 2018 05:19
sublime_latexing_snippets
<snippet>
<content><![CDATA[
%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-
\titledquestion{${1:Question title}}
%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-%-
\emph{${2:German text}} \\\
${3:French text}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>ques</tabTrigger>
{
/* Put there parameters that are different for each gateway (eg. pointing one gateway to a test server while the others stay in production) */
/* Settings defined in global_conf will be overwritten by those in local_conf */
"gateway_conf": {
"gateway_ID": "0000fcc23d0fb18f",
"servers": [
{
"server_address": "router.eu.thethings.network",
"serv_port_up": 1700,
@pmudry
pmudry / gist:47fb63c916823567b9a3a415159494d2
Created July 9, 2017 09:37
Encoean serial USB300 linux dump
stty -F /dev/ttyUSB0 57600
hexdump < /dev/ttyUSB0