Skip to content

Instantly share code, notes, and snippets.

View binarytrails's full-sized avatar
:octocat:
0x3a0x29

binarytrails

:octocat:
0x3a0x29
View GitHub Profile
@binarytrails
binarytrails / edgerouter.md
Created January 20, 2021 17:26 — forked from jperkin/edgerouter.md
OpenBSD/octeon EdgeRouter Lite

This is a nifty little device for under Β£100 suitable for a home router.

I am using one running OpenBSD 6.8 for my AAISP PPPoE connection (avoiding the supplied VMG1312-B10A which has a number of issues).

Installation

I bought a SanDisk 16GB USB stick as there were reports the supplied USB stick isn't particularly reliable, plus it's nice to keep it separate in case of backup or selling the device in the future.

Download the OpenBSD miniroot68.img file system and dd(1) it, for example on macOS (assuming /dev/disk2):

@binarytrails
binarytrails / fetch_from_cloud_logging.sh
Created December 23, 2020 16:45 — forked from dovy/fetch_from_cloud_logging.sh
It's a REAL pain to figure out how to grab the data from Google cloud logging. This script lets you grab historic data and save locally so you can process since Cloud Logging Sync's won't do anything historic.
gcloud beta logging read "resource.type=\"dataflow_step\" resource.labels.job_id=\"2018-11-13_09_13_59-6912497806535022683\" OR \"timestamp>=\\\"2018-11-12T00:00:00Z\" OR \"timing:\" timestamp<=\"2200-01-01T00:00:00.000000000Z\" timestamp<\"2018-11-20T20:20:01.065Z\"" --format=json --limit 100000 | jq -rnc --stream 'fromstream(1|truncate_stream(inputs)) | .jsonPayload.message' >> gcs.txt
@binarytrails
binarytrails / __main__.py
Created December 4, 2020 17:15 — forked from linuxluigi/__main__.py
Python __main__.py parser example
import argparse
# import data2tabshop
# from data2tabshop import __version__
__version__ = '0.1.0'
__author__ = u'Steffen Exler'
def get_parser():
@binarytrails
binarytrails / housekeeping_images.sh
Created November 23, 2020 15:42 — forked from DaanGeurts/housekeeping_images.sh
Deleting unused images from Google Container Registry, leaving x number left
#!/bin/bash
# Copyright Β© 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@binarytrails
binarytrails / zathurarc
Created March 8, 2020 06:03 — forked from michaelmrose/zathu
zathura config
# Zathura configuration file
# See man `man zathurarc'
# Open document in fit-width mode by default
set adjust-open "best-fit"
# One page per row by default
set pages-per-row 1
#stop at page boundries
@binarytrails
binarytrails / archinstall.md
Created December 8, 2019 23:03 — forked from xtrymind/archinstall.md
Windows 10 and Arch Linux dual boot with UEFI

Arch Linux installation (Windows 10 dual boot)

Before

  1. Disable Windows Fast-Startup
  2. Disable Secure Boot

Partitioning

@binarytrails
binarytrails / inject-tls-secrets.sh
Created October 28, 2019 19:55 — forked from Lekensteyn/inject-tls-secrets.py
Extracts a subset of TLS secrets and injects them in an existing capture file (requires Wireshark 3.0).
#!/bin/bash
# Extracts a subset of TLS secrets and injects them in an existing capture file.
#
# Author: Peter Wu <[email protected]>
set -eu
if [ $# -lt 2 ]; then
echo "Usage: $0 keylog.txt some.pcapng [output.pcapng]"
echo "Output file is based on input file (e.g. some-dsb.pcapng)."
@binarytrails
binarytrails / git_rebase.md
Created May 27, 2019 19:45 — forked from ravibhure/git_rebase.md
Git rebase from remote fork repo

In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:

Add the remote, call it "upstream":

git remote add upstream https://github.com/whoever/whatever.git

Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:

git fetch upstream

@binarytrails
binarytrails / Basic irssi setup walk-through
Created April 23, 2019 12:36 — forked from ffledgling/Basic irssi setup walk-through
Gist to help someone (Usually me) setup irssi after a fresh install. All changes mentioned here can be made directly to your .irssi/config file also.
Typically used irssi config
### Large portions shamelessly copied from https://wiki.archlinux.org/index.php/Irssi (Thank you Arch Wiki )
# Please refer to the aforementioned link for more detail and customization.
# irssi has a pretty good default config that you don't usually want to mess with much
# A couple of basic things that are needed are specified here. Type /set to see a complete list of modifiable parameters.
# BASIC SETUP:
@binarytrails
binarytrails / FlyCamera.cs
Created January 25, 2019 16:22 — forked from gunderson/FlyCamera.cs
Unity Script to give camera WASD + mouse control
using UnityEngine;
using System.Collections;
public class FlyCamera : MonoBehaviour {
/*
Writen by Windexglow 11-13-10. Use it, edit it, steal it I don't care.
Converted to C# 27-02-13 - no credit wanted.
Simple flycam I made, since I couldn't find any others made public.
Made simple to use (drag and drop, done) for regular keyboard layout