Skip to content

Instantly share code, notes, and snippets.

View mtak's full-sized avatar

Merijntje Tak mtak

View GitHub Profile
@mtak
mtak / run_speedtest.sh
Created February 1, 2024 20:21
Run Ookla speedtest and post to Graphite
#!/bin/bash
exec >run_speedtest.log 2>&1
PATH=/home/mtak/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
graphite_server=dom2.int.mtak.nl
graphite_port=2003
speedtest=$(/home/mtak/bin/speedtest -f json -u bps)
@mtak
mtak / out.log
Created February 9, 2018 22:37
run-docker-compose-dev output
mtak@rubiks:~/dev/vault-ui-bugfix(root-to..)$ ./run-docker-compose-dev
------------- yarn install -------------
yarn install v1.3.2
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.51s.
------------- docker-compose up -d -------------
Creating network "vaultuibugfix_default" with the default driver
Creating vaultuibugfix_vault_1
Creating vaultuibugfix_webpack_1

Keybase proof

I hereby claim:

  • I am mtak on github.
  • I am mtak (https://keybase.io/mtak) on keybase.
  • I have a public key whose fingerprint is 6059 9686 E351 C6AB 93BC FB20 B3A6 4441 6954 90BB

To claim this, I am signing this object:

@mtak
mtak / esp2_woonkamer.ino
Last active May 7, 2017 11:36
esp8266 power meterk arduino sketch
/*
* This sketch polls an LDR to watch for pulses
* of a digital power meter.
* Blog post at: http://mtak.nl/it/esp8266-based-power-meter-in-kibana/
*
*/
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
@mtak
mtak / unifi.service
Last active November 20, 2015 22:26
# Simple systemd startup script for the Ubiquiti UniFi controller software
#
# Copy this file to /lib/systemd/system/unifi.service
# Edit the path to the ace.jar
# Reload systemd with:
# $ systemctl daemon-reload
# Start the service at system boot:
# $ systemctl enable unifi
# Start the service with
# $ systemctl start unifi
@mtak
mtak / firstboot.sh.erb
Created July 8, 2014 17:31
Generator for Debian preseed files
#!/bin/sh
# set hostname
echo <%= hostname %> > /etc/hostname
/etc/init.d/hostname.sh
# Set up networking
cat > /etc/network/interfaces << EOF
# The loopback network interface
auto lo
@mtak
mtak / vyatta_grahite_stats.pl
Last active August 29, 2015 14:03
Send Vyatta interface statistics to Graphite/Carbon
#!/usr/bin/perl -w
use strict;
use Data::Dumper;
use IO::Socket::INET;
use POSIX;
my $carbon_host = "10.100.0.61";
my $carbon_port = "2003";
@mtak
mtak / shmCreateAndWrite.c
Last active January 27, 2023 05:48
Shared memory in Linux using C
#include <stdio.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/stat.h>
int main ()
{
int segment_id;
char bogus;
@mtak
mtak / .bashrc
Created March 13, 2012 15:05
Bash configuration file
# Terminal options
shopt -s histappend
shopt -s cdspell
#PROMPT_COMMAND='history -a'
HISTFILESIZE=5000
HISTCONTROL=ignoredups
TERM=xterm
export PROMPT_COMMAND HISTFILESIZE HISTCONTROL TERM
# Aliases