Skip to content

Instantly share code, notes, and snippets.

@00xc
00xc / binwalk-extract.py
Last active September 8, 2021 16:02
Extracting every embedded file with binwalk
#!/usr/bin/env python3
import sys
import os
import binwalk
import shlex
import subprocess as sp
def dump_file(file, offset, size, outfile):
cmd = "dd if={} of={} bs=1 skip={}".format(file, outfile, offset, size)
if size is not None:
@Olliebrown
Olliebrown / PortableRPIGitServer.md
Last active October 20, 2024 01:18
Setting up a Portable Git Server on an RPI 3B+

A Portable git Server on an RPI 3B+

For the past three years I participated in the GDC TrainJam, an event where a bunch of crazy game developers get on a train in Chicago and make games in teams with folks they've never met before! There are no winners and losers, only friends and good memories of exotic places during the 52 hour train ride.

Oh, and we also make a few games with very little in the way of outside access. The train has no usable internet and for a large portion of the ride there is also no cellular service. When there is, it is awful and not at all usable for serious things like syncing frequently to an external repo service like GitHub. The first year I played it by ear and got a live repo running on a thumb drive that we handed around between teammates. There were only two programmers on the team and even then we found this to be a real slog! Very tedious and some times merging was a nightmare.

The next year, I endeavored to do better, and have been pretty successful. I decided to s

@Lukas238
Lukas238 / .md
Last active December 13, 2024 08:18
Bulk backup and clone git repositories from a list

Bulk backup and clone git repositories from a list

Get the git repos list

Option A: Generate a list of repos already cloned on a machine

To do this we will use the linux command grep.

Please jump to How to use linux command under Windows? for more information.

@killercup
killercup / pandoc.css
Created July 3, 2013 11:31
Add this to your Pandoc HTML documents using `--css pandoc.css` to make them look more awesome. (Tested with Markdown and LaTeX.)
/*
* I add this to html files generated with pandoc.
*/
html {
font-size: 100%;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
@markusfisch
markusfisch / README.md
Last active May 9, 2023 20:52
Generate a bar chart by reading value/label pairs from stdin

Bar charts from stdin

Put this shell script somewhere in your path and run it by feeding it value/label pairs like this:

$ bars
10 one
20 two
30 three
@pazdera
pazdera / gist:1121315
Created August 2, 2011 21:47
Brute-force string generation in Python (optimized for printable characters only)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Brute-force string generation
# Copyright (C) 2011 Radek Pazdera
# This program is free software: you can redistribute it 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.