Skip to content

Instantly share code, notes, and snippets.

View mjf's full-sized avatar

Matouš Jan Fialka mjf

View GitHub Profile
@mjf
mjf / linux_sysctl.stl.txt
Last active August 29, 2015 14:25
Linux Syscall Table (semi-handcrafted)
#! /usr/bin/env stl
. Linux Syscall Table (semi-handcrafted)
. Copyright (C) 2015 Matous Jan Fialka, <http://mjf.cz/>
. Released under the terms of The MIT License
.meta linux version: 4.1.x
.meta source 1: arch/x86/syscalls/syscall_64.tbl
.meta source 2: arch/x86/syscalls/syscall_32.tbl

Velocity Conf 2015

Day 1

Bootstrapping an Ops Team - Charity Majors (Parse)

Operations - anything pertaining to maintaining and implementing systems at scale

Do you really need an ops team?

@mjf
mjf / humandate
Created July 12, 2011 23:31
Posix shell script to convert between time in human form and seconds
#! /bin/sh
# Posix shell script to convert between time in human form and date
# Copyright (C) 2011 Matous J. Fialka, <http://mjf.cz/>
# Released under the terms of The MIT License
if humantime=`humantime -f $@`
then
date -d "$humantime seconds" '+%F %T'
fi
@mjf
mjf / bup
Created July 21, 2011 11:50
Posix shell script to connect two shell commands by bi-directional pipe
#! /bin/sh
# Posix shell script to connect two shell commands by bi-directional pipe
# Copyright (C) 2011 Matous J. Fialka, <http://mjf.cz/>
# Released under the terms of The MIT License
if [ $# -ne 2 ]
then
printf -- 'Usage: bip COMMAND COMMAND\n'
exit 0
@mjf
mjf / junos_strip_comments.c
Created September 2, 2011 00:25
Simple FSM to strip Juniper configuration comments
/**
* Strip Juniper Comments
* Copyright (C) 2011 Matous J. Fialka, <http://mjf.cz/>
* Released under the terms of The MIT License
*/
#include <stdio.h>
enum {
ASCII_NUL = '\000',
@hunner
hunner / escctrlcaps.pke
Created March 21, 2012 21:54
caps->ctrl->esc->caps
clear Lock
clear Control
keycode 9 = Caps_Lock NoSymbol Caps_Lock NoSymbol Caps_Lock
keycode 37 = Escape NoSymbol Escape NoSymbol Escape
keycode 66 = Control_L NoSymbol Control_L NoSymbol Control_L
add Lock = Caps_Lock
add Control = Control_L Control_R
@mjf
mjf / pinyin2utf8.sed
Created May 13, 2012 23:41
pinyin2utf8.sed -- Convert US-ASCII Pinyin to UTF-8
#! /bin/sed -f
# pinyin2utf8.sed -- Convert US-ASCII Pinyin to UTF-8
# Copyright (C) 2012 Matous J. Fialka (mjf), <http://mjf.cz/>
# Released under the terms of The MIT License
#
# DESCRIPTION
# Script converts all occurences of US-ASCII encoded Pinyin text
# enclosed by the solidus characters pairs to UTF-8 encoded text.
#
@Luzifer
Luzifer / workflowy.user.css
Last active December 16, 2016 13:14
Custom Workflowy (Based on "Work a Simpler Flowy v2.0")
@-moz-document domain("workflowy.com") {
@import 'https://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans+Mono';
@font-face {
font-family: 'FontAwesome';
font-style: normal;
font-weight: 400;
src: local('FontAwesome'), url(//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/fonts/fontawesome-webfont.woff) format('woff');
}
#controlsLeft {
@sacreman
sacreman / gist:4453493
Created January 4, 2013 15:32
haproxy config
global
log 127.0.0.1 local2 info
pidfile /var/run/haproxy.pid
stats socket /var/run/haproxy.stat mode 600 level admin
#debug
defaults
mode http
log global
@mjf
mjf / record.sh
Last active May 3, 2018 13:03
Record and replay shell sessions using script(1) and scriptreplay(1)
#! /bin/sh
# Record - record shell session using script(1)
# Copyright (C) 2011 Matous J. Fialka, <http://mjf.cz/>
# Released under the terms of The MIT License
RECORD_PATH="$HOME/.typescripts/%Y/%m/%d"
RECORD_FILE='%H%M%S'
RECORD_TIMING_FILE="$RECORD_FILE.timing"