Skip to content

Instantly share code, notes, and snippets.

View mtthlm's full-sized avatar
🐉

Matt Helm mtthlm

🐉
View GitHub Profile
@iximeow
iximeow / asn1.sh
Created April 13, 2021 00:12
asn.1 parsing in pure bash
#! /bin/bash
asn1=$(echo -e "\x30\x13\x02\x01\x05\x16\x0e\x41\x6e\x79\x62\x6f\x64\x79\x20\x74\x68\x65\x72\x65\x3f")
#asn2=$(echo -e "\x00\x01\x02\x03")
asn2=""
offset=0
# while [ $offset -lt ${#asn1} ]; do
# curr=${asn1:offset:1}
# printf "$offset: %02x\n" \'$curr
@xsot
xsot / instructions.md
Last active March 3, 2024 13:42
sed maze solver

Usage

sed -E -f solver.sed input where input is a file containing the maze.

For best results, resize your terminal to match the height of the maze. To disable animations, delete the lines containing p.

Maze format

The solver assumes the following:

  • The maze only contains the characters # \nSE
  • Every line has the same number of characters
  • There is only one start (S) and end (E)
@vasanthk
vasanthk / System Design.md
Last active October 19, 2024 17:32
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@JeffreyWay
JeffreyWay / .vimrc
Last active August 3, 2024 16:51
My .vimrc file
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
@wesrice
wesrice / wp-config.php
Created September 19, 2012 15:35
Multi-environment wp-config
// Get the host
$host = $_SERVER['HTTP_HOST'];
// Define the site base
$site_base = 'example.com';
// WP subdirectory
$wp_subdirectory = '';
if( $host === 'local.' . $site_base || $host === 'localhost:8888' ){