Skip to content

Instantly share code, notes, and snippets.

View vaelen's full-sized avatar

Andrew Young vaelen

View GitHub Profile
@vaelen
vaelen / guess.py
Last active July 29, 2020 14:27
A python script for guessing zip file passwords.
#!/usr/bin/env python3
# Guess a zip file password using a word list.
#
# Copyright 2020, Andrew C. Young <andrew@vaelen.org>
# License: MIT
#
# Usage: guess.py <zip_file> <words_file>
# NOTE: The words file should be a gzip file that contains a list of words separated by spaces or newlines
@vaelen
vaelen / install-gr-stellarstation.sh
Created October 19, 2018 04:36
Install gr-stellarstation on Ubuntu 16.04, such as GNURadio LiveCD. (Update all system packages first!)
#!/bin/bash
set -e -x
echo "########## INSTALL CONAN ##########"
sudo apt update
sudo apt install pip3
pip3 install conan

Keybase proof

I hereby claim:

  • I am vaelen on github.
  • I am andrewyoung (https://keybase.io/andrewyoung) on keybase.
  • I have a public key whose fingerprint is 38E3 1220 25B2 8BEC 3D31 895D E3B3 6CA4 8AAC B115

To claim this, I am signing this object:

@vaelen
vaelen / connect.sh
Created August 12, 2016 16:45
A bash script for routing connections through a gateway machine. You can create symlinks to this script named the same thing as the remote hostnames.
#!/bin/bash
GW="vagrant@localhost"
GW_PORT=2222
GW_NAME="gw"
HOST=${0##*/}
if [ "${HOST}" == "connect.sh" ]
then
HOST=$1
@vaelen
vaelen / show-time.sh
Last active June 30, 2016 08:01
This script chooses a random wallpaper, resizes it, places the time on it, and displays it on a 320x240 AdaFruit PiTFT for Raspberry Pi using the framebuffer.
#!/bin/bash
export indir=${HOME}/wallpapers
export infile=`find ${indir} -type f | sort -R | tail -n 1`
export workdir=${HOME}/.wallpaper
export resizedfile=${workdir}/resized.png
export timefile=${workdir}/time.png
export outfile=${workdir}/time-final.png
export time=`date`
@vaelen
vaelen / clean-kernels.pl
Created February 1, 2016 18:53
This script cleans out old kernels on Ubuntu.
#!/usr/bin/perl -w
use strict;
my $kernel_version = `uname -r`;
my @kernel = (0,0,0,0);
if($kernel_version =~ /((\d+).(\d+).(\d+)-(\d+))/) {
$kernel_version = $1;
$kernel[0] = $2;
@vaelen
vaelen / UseAdvertisingIdentifier.java
Last active August 29, 2015 14:03
This class shows an example of how to use AdvertisingIdentifier.java. It is not intended as a full working example.
public class UseAdvertisingIdentifier {
public String getBiParams(Activity activity) {
String mac = getMacAddress();
String macMd5 = "";
if (mac.length() > 0) {
macMd5 = Utility.md5(mac);
}
String openUdid = getOpenUdid();
String udid = getUdid();
@vaelen
vaelen / AdvertisingIdentifier.java
Created July 8, 2014 01:36
This class determines whether or not the current Android device has support for Google Play's advertising identifier. If so, it returns the advertising identifier. If not, it returns the Android device identifier.
package com.kabam.sdk;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import android.app.Activity;
import android.provider.Settings.Secure;
import android.util.Log;
import com.google.android.gms.ads.identifier.AdvertisingIdClient;