Skip to content

Instantly share code, notes, and snippets.

🦀
learning everyday!!

T shrmrf

🦀
learning everyday!!
  • Germany
Block or report user

Report or block shrmrf

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@shrmrf
shrmrf / mqtt-to-influx-bridge.py
Created Jun 27, 2019
A simple bridge I was testing
View mqtt-to-influx-bridge.py
"""A MQTT to InfluxDB Bridge
This script receives MQTT data and saves those to InfluxDB.
"""
#import re
import json
import paho.mqtt.client as mqtt
@shrmrf
shrmrf / i3-config
Created Jun 13, 2019
i3 config that I'm using
View i3-config
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
@shrmrf
shrmrf / .bashrc
Created Apr 26, 2019
Default Ubuntu .bashrc
View .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@shrmrf
shrmrf / nmap-helper.md
Created Aug 21, 2018
Get MAC addr using nmap
View nmap-helper.md
sudo nmap -n -sn 10.62.226.159/24 | awk '/Nmap scan report/{printf $5;printf " ";getline;getline;print $3;}' 
View keybase.md

Keybase proof

I hereby claim:

  • I am shrmrf on github.
  • I am sysarcher (https://keybase.io/sysarcher) on keybase.
  • I have a public key ASDcp221WORRQuswheiiG1-_DOKC7MyD2QcofsCpHBf_oQo

To claim this, I am signing this object:

View vmx.S
#include "macros.h"
#include "vmx.h"
#include "../memorymap.h"
#define VMWRITE(A,B) mov B,%rbx; mov A,%rax; vmwrite %rbx,%rax
#define VMREAD(A) mov A,%rbx; vmread %rbx,%rax
.global init_hypervisor
.global create_vm
@shrmrf
shrmrf / README.md
Created Aug 21, 2017 — forked from kergoth/README.md
Quick prototype of a variable filtered bitbake -e
View README.md

bitbake-env: improved version of bitbake -e

To install

The script may be run from anywhere, as long as 'bitbake' can be found in your PATH.

Suggestion: alias bbe=bitbake-env

@shrmrf
shrmrf / mergesort.fs
Created Dec 29, 2016
Scala and F# implementation of mergesort
View mergesort.fs
let rec mergesort (xs: list<int>) =
let rec merge (xs: list<int>, ys: list<int>) =
match (xs, ys) with
| ([], ys) -> ys
| (xs, []) -> xs
| (x::xs1, y::ys1) ->
if(x < y) then x::merge(xs1, ys)
else y::merge(xs, ys1)
let n = xs.Length / 2
if (n = 0) then xs
@shrmrf
shrmrf / local.conf.sh
Last active Mar 8, 2017
local.conf for standard ostro-os build (tested on Intel Galileo)
View local.conf.sh
#
# This file is your local configuration file and is where all local user settings
# are placed. The comments in this file give some guide to the options a new user
# to the system might want to change but pretty much any configuration option can
# be set in this file.
#
# Lines starting with the '#' character are commented out and in some cases the
# default values are provided as comments to show people example syntax. Enabling
# the option is a question of removing the # character and making any change to the
# variable as required.
@shrmrf
shrmrf / update-apt.sh
Created Jul 26, 2016
Skip `apt-get update` if you've recently updated cache
View update-apt.sh
function getLastAptGetUpdate()
{
local -r aptDate="$(stat -c %Y '/var/cache/apt')"
local -r nowDate="$(date +'%s')"
echo $((nowDate - aptDate))
}
# Default To 24 hours
updateInterval="$((24 * 60 * 60))"
lastAptGetUpdate="$(getLastAptGetUpdate)"
You can’t perform that action at this time.