Skip to content

Instantly share code, notes, and snippets.

View AfroThundr3007730's full-sized avatar
🔧
Hacking all the things...

Eddie Carswell AfroThundr3007730

🔧
Hacking all the things...
View GitHub Profile
@jessfraz
jessfraz / boxstarter.ps1
Last active April 11, 2024 16:02
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@ageis
ageis / YubiKey-GPG-SSH-guide.md
Last active May 20, 2024 09:52
Technical guide for using YubiKey series 4 for GPG and SSH

YubiKey 4 series GPG and SSH setup guide

Written for fairly adept technical users, preferably of Debian GNU/Linux, not for absolute beginners.

You'll probably be working with a single smartcard, so you'll want only one primary key (1. Sign & Certify) and two associated subkeys (2. Encrypt, 3. Authenticate). I've published a Bash function which automates this slightly special key generation process.

@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active June 14, 2024 18:56 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@rumpelsepp
rumpelsepp / log.c
Last active October 26, 2022 06:51
A printf wrapper, with loglevel support and timestamps
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <time.h>
#include <libiberty/libiberty.h>
#include "log.h"
#include "config.h"
#define BUFSIZE 1024
#!/bin/sh
showHelp() {
cat <<EOF
This script requires 2 or 3 arguments exactly.
"${0}" <redhat username> <redhat password> [<redhat release>]
examples:
"${0}" user1 passw0rd! 7Server
"${0}" user2 pAssw@rd
By default the omission of the release version will default to 7Server being set.
@flungo
flungo / lsiommu
Created March 10, 2017 23:59
List the devices and their IOMMU groups.
#!/bin/bash
for d in $(find /sys/kernel/iommu_groups/ -type l | sort -n -k5 -t/); do
n=${d#*/iommu_groups/*}; n=${n%%/*}
printf 'IOMMU Group %s ' "$n"
lspci -nns "${d##*/}"
done;
add-pssnapin microsoft.sharepoint.powershell
$MySiteUrl = "https://mysiteurl.domain.com"
$DomainNamePrefix = "MYDOMAIN"
$strImageFolder = "\\UNC\PATH\TO\IMAGES"
$imageDepth = 1 #Images are in subfolders off of the specified folder, but we dont want sub-sub folders
$logFile = "C:\Scripts\UploadProfilePhotos.log"
$tempImageFolder = "C:\Scripts\Temp"
@chrisveness
chrisveness / crypto-sha.js
Last active July 20, 2023 04:45
Uses the SubtleCrypto interface of the Web Cryptography API to hash a message using SHA-256.
/**
* Returns SHA-256 hash from supplied message.
*
* @param {String} message.
* @returns {String} hash as hex string.
*
* @example
* sha256('abc').then(hash => console.log(hash));
* const hash = await sha256('abc');
*/
@joshisa
joshisa / URL Parsing
Created February 3, 2017 02:27
Parsing of URLs using bash sh scripting
#!/bin/bash
# Referenced and tweaked from http://stackoverflow.com/questions/6174220/parse-url-in-shell-script#6174447
proto="$(echo $1 | grep :// | sed -e's,^\(.*://\).*,\1,g')"
# remove the protocol
url="$(echo ${1/$proto/})"
# extract the user (if any)
userpass="$(echo $url | grep @ | cut -d@ -f1)"
pass="$(echo $userpass | grep : | cut -d: -f2)"
if [ -n "$pass" ]; then
@colatkinson
colatkinson / elf_sigs.sh
Created December 30, 2016 22:03
A Bash script to sign and verify ELF executables with embedded GPG signatures
#!/bin/sh
function verify_file {
unsig_exe_tmp=`mktemp`;
# Remove the signature from the file and save to disk
objcopy --remove-section=sigdata $1 $unsig_exe_tmp;
# Extract the signature and verify it against the unsigned executable
objcopy --dump-section sigdata=/dev/stdout $1 | gpg --verify - $unsig_exe_tmp;