Skip to content

Instantly share code, notes, and snippets.

View wfleurant's full-sized avatar
🍉
BLACK LiVES MATTER

William Fleurant wfleurant

🍉
BLACK LiVES MATTER
View GitHub Profile
@wfleurant
wfleurant / start-a-riot.bash
Created July 11, 2020 18:21
run riot-desktop from source
#!/usr/bin/env bash
cd /dev/shm
git clone https://github.com/matrix-org/matrix-js-sdk.git
pushd matrix-js-sdk
git checkout develop
yarn link
yarn install
popd
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import json
import os
from org.netxms.client.objects import NetworkMap
from org.netxms.client.objects import Container
@wfleurant
wfleurant / multicore-cjdns.sh
Created August 1, 2016 18:09
run multiple cjdns daemons on multiple cores with multiple iproute rules
#!/usr/bin/env bash
# for a quadcore + hyperthread system,
# run for each core: cjdroute --genconf | cjdroute
for x in $(seq 0 7); do
t="11234"
connect='"123.456.789.10:16661":{ "hostname": "remote-server-name", "password":"SiLWJBTTsVYBipax7sjX", "publicKey":"abcdeeeee.k", },'
./cjdroute --genconf \
| sed "s/^.*ipv4\ address.*$/$connect/g" \
| sed "s/$t/1900$x/" \
@wfleurant
wfleurant / ubus_sink_faucet.lua
Created June 23, 2014 20:07
ubus on openwrt-cjdns
--
-- sink.lua on root@term1
--
require "uloop"
require "ubus"
uloop.init()
dkjson = require("dkjson")
cjdns = require("cjdns")
require("cjdns/uci")
#!/usr/bin/env bash
set -x
# Purpose: Deployed by buildbot
# and executed in in ./openwrt/ by buildbots
# Notes: key & legend to builder master.cfg is server side.
# see: generate_builder.sh
# (returns values for this script (see below))
#
# Syntax below:
#!/bin/sh /etc/rc.common
#
# You may redistribute this program and/or modify it under the terms of
# the GNU General Public License as published by the Free Software Foundation,
# either version 3 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
@wfleurant
wfleurant / sshfsArgs.sh
Created April 7, 2014 13:45
sshfs snippet w/ args + opts
#!/bin/bash
function rExit()
{
echo "---------------------------------------------------------------------------------------------------"
echo "Missing Parameters: \$1 = Username | \$2 = IP | \$3 = sFTP/SSH Port | \$4 = Remote Dir | \$5 = Local Dir"
echo "./$(basename $0) root 172.168.1.1 2222 www/ obey/"
echo "---------------------------------------------------------------------------------------------------"
exit 0
}
# Purpose: use ccze to color CLI programs output.
# Example: netstat -a
# Install: Install ccze, then put this file in ~your/.bashrc
export cProgs="gpg ifconfig ssh-keyscan ssh-keygen tcpdump netstat ip"
for P in ${cProgs}
do
F=$( echo $P | sed "s/\-/_/g" )
eval "funct_$F () { \
$P \$@ 2>&1 | ccze -A \
@wfleurant
wfleurant / keybase.md
Created April 4, 2014 03:54
[gist/wfleurant] keybase declare

Keybase proof

I hereby claim:

  • I am wfleurant on github.
  • I am igel (https://keybase.io/igel) on keybase.
  • I have a public key whose fingerprint is 75F5 C490 0501 D400 5475 DBC7 A84D FFE6 2B45 1511

To claim this, I am signing this object: