Skip to content

Instantly share code, notes, and snippets.

View tamsky's full-sized avatar

Marc Tamsky tamsky

View GitHub Profile
@tamsky
tamsky / audacity_rescue2.sh
Created November 10, 2023 05:26 — forked from javierwilson/audacity_rescue2.sh
recover audacity 2.0 crash data
#!/bin/bash
#Recover from an Audacity 2.0 crash by reassembling the saved data files
#Based on https://gist.github.com/912222
if [ $# != 2 ]; then
echo "ERROR: Not enough arguments"
echo "$0 [SOURCE PATH] [DESTINATION]"
exit 1
fi
@tamsky
tamsky / audacity_rescue.js
Created November 10, 2023 05:26 — forked from mauritslamers/audacity_rescue.js
audacity rescue script nodejs with stereo support
// recover from audacity crash
// usage:
// node audacity_rescue.js [sourcedir] [result_file.wav] [mono|stereo]
// the mono or stereo option is optional, the default is mono.
//
// Description:
// This script will sort all files on modification date.
// If you create a backup, make sure you use `cp -a` to preserve the modification date
// or create a zip.
locals {
# Replace a terraform-aws-provider sts assumed role with the equivalent iam role, i.e:
# arn:aws:sts::<account-id>:assumed-role/<role-name>/<numeric-session-id>
# =>
# arn:aws:iam::<account-id>:role/<role-name>
# This allows a user to simply pass `role_arn = "${data.aws_caller_identity.this.arn}"`
role_arn = replace(
var.role_arn,
"/(.*):sts:(.*):assumed-role/(.*)/[0-9]*$/",
"$1:iam:$2:role/$3",
# SEARCH ENGINES FOR PENTESTERS
1. shodan.io (Server)
2. google.com (Dorks)
3. wigle.net (WiFi Networks)
4. grep.app (Codes Search)
5. app.binaryedge (Threat Intelligence)
6. onyphe.io (Server)
7. viz.greynoise.io (Threat Intelligence)
8. censys.io (Se
@tamsky
tamsky / note.md
Created June 23, 2022 03:01
sad trackpad palm rejection on the sad butterfly keyboard MacBook Pro 15" series
;;; typo-dark-theme.el --- Typographic (not color) Theme
;; Copyright (C) 2017 Bastian Bechtold
;; Author: Bastian Bechtold
;; URL: https://github.com/bastibe/.emacs.d/tree/master/lisp
;; 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
$ cd "path to your SSL"
$ mkdir -p Fingerprints
$ openssl req -x509 -nodes -days 365 -subj /CN=barrier -newkey rsa:4096 -keyout barrier.pem -out barrier.pem
$ openssl x509 -fingerprint -sha1 -noout -in barrier.pem > Fingerprints/Local.txt
$ sed -e "s/.*=//" -i Fingerprints/Local.txt
@tamsky
tamsky / aws-sso-login-speedup.js
Last active August 12, 2021 01:12
don't make me click on the password prompt....c'mon, it's the required field, and the only field.
// ==UserScript==
// @name Speed up AWS login
// @namespace http://tampermonkey.net/
// @version 0.1
// @include https://us-east-1.signin.aws/platform/login?*
// @grant none
// @run-at document-end
// ==/UserScript==
(function() {
# —— by default, chromecast volume is not saved across reboots — dumb.
#
# UNTESTED
#
# A python 3 script to discover all the chromecast devices and save the volume.
# Then each time you run it the script will look for any CC that has a volume of 1.0 (100%) and reset it back to the saved value.
# Safe harbor: No warranty, no guarantees of any kind.
# Licenses of supporting modules are their own licenses.
# This is only an example of what you can do not real code.
#
rsync -vrltD --progress --stats /source/a/ /dest/a