Skip to content

Instantly share code, notes, and snippets.

@austinkeeley
austinkeeley / get_wallpapers.sh
Created July 3, 2021 17:41
Downloads all the Ubuntu wallpapers
#!/bin/bash
distros="karmic lucid maverick natty oneiric precise quantal raring saucy trusty utopic vivid wily xenial yakkety zesty artful bionic cosmic disco eoan focal groovy hirsute"
cmd="apt install "
for d in $distros; do
echo "Downloading $d"
cmd="${cmd} ubuntu-wallpapers-${d}"
done
@austinkeeley
austinkeeley / Makefile
Created June 23, 2019 13:37 — forked from linse/Makefile
Recursive make and make clean
SUBDIRS = src doc whatever
.PHONY: all clean
all clean:
for dir in $(SUBDIRS); do \
$(MAKE) -C $$dir -f Makefile $@; \
done
@austinkeeley
austinkeeley / dump_mem.c
Created June 11, 2019 11:25
Memory dumping code snippet
/*
* Dumps memory to stdout
*/
void dump_mem(void *addr, size_t len) {
int i;
unsigned char *p = addr;
for (i=0; i<len; i++) {
if (i % 16 == 0) {
@austinkeeley
austinkeeley / disassemble.md
Last active June 11, 2019 11:21 — forked from jarun/disassemble.md
Guide to disassemble

prerequisites

  • Compile the program in gcc with debug symbols enabled (-g)
  • Do NOT strip the binary
  • To generate assembly code using gcc use the -S option: gcc -S hello.c

utilities

objdump

import logging
logging.basicConfig(level=logging.INFO, format='[%(asctime)s %(levelname)s] %(message)s', datefmt='%Y %b %d %H:%M:%S')
{
"brand": "kvm",
"vcpus": 1,
"autoboot": false,
"ram": 1024,
"resolvers": ["208.67.222.222", "208.67.220.220"],
"disks": [
{
"boot": true,
"model": "virtio",
@austinkeeley
austinkeeley / Makefile
Last active April 29, 2017 14:43
Setuid wrapper and Makefile
# Makefile for the wrapper
# The wrapper target is going to prompt you for your root password
# so don't run this if you are set to do stuff non-interactively.
THIS_DIR = $(shell pwd)
DEFINES=-DPING_AGENT_PATH="\"$(THIS_DIR)\""
wrapper: wrapper.o
gcc -o wrapper wrapper.c $(DEFINES)
sudo chown root wrapper
@austinkeeley
austinkeeley / public-key.asc
Created March 29, 2017 13:30
Austin Keeley PGP public key
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2
mQENBFjapy4BCADfiGBLezvJoH963Tjf4JWVNtEkV7rtabQkfnvO85cSs0XwSUYk
KpjxwDO7ZVV6r+kppEzy12sKO8j2fe3yY+oJmNUU+d5sKkubyFSdbafIdq6rvCJC
stXxnGxKcDtUQIBioGXPBElk8IC3RncyMJ/QSZrmxV8M0eVRpAgKTamzHpATvO+A
bEYMvDn8fWUIZW1QBjryWksGDdIy997yfFtsw1ruK0ZBQxZ/22KZJx+x2FDWH91s
mehQ4q4vhJ04WXgK4HDfK2H4EOwknkvtWdSP4vvKrZDAgTkYBuSRIqW49OBWxQaw
YSLYha3TaWSTcydMEldJy1XVMh4PZp8ymlI1ABEBAAG0J0F1c3RpbiBLZWVsZXkg
PGF1c3Rpbi5rZWVsZXlAZ21haWwuY29tPokBPQQTAQgAJwIbAwULCQgHAgYVCAkK
@austinkeeley
austinkeeley / elk-it-up.sh
Last active August 29, 2015 14:26
ELK IT UP
#!/bin/sh
# Ugh... I have to download all 3 programs? psssh...
ELASTICSEARCH_VERSION="1.7.1"
LOGSTASH_VERSION="1.5.3"
KIBANA_VERSION="3.1.3"
curl -L "https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-$ELASTICSEARCH_VERSION.tar.gz" -o "elasticsearch-$ELASTICSEARCH_VERSION.tar.gz"
curl -L "https://download.elastic.co/logstash/logstash/logstash-$LOGSTASH_VERSION.tar.gz" -o "logstash-$LOGSTASH_VERSION.tar.gz"
curl -L "https://download.elastic.co/kibana/kibana/kibana-$KIBANA_VERSION.tar.gz" -o "kibana-$KIBANA_VERSION.tar.gz"
/*!
* Grunt
* $ npm install grunt-contrib-uglify grunt-autoprefixer grunt-contrib-cssmin grunt-contrib-imagemin grunt-contrib-sass grunt-contrib-watch grunt-contrib-concat grunt-contrib-clean grunt-contrib-jshint grunt-notify --save-dev
*/
module.exports = function(grunt) {
grunt.initConfig({
// Sass