This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$list = get-wmiobject win32_product | select identifyingnumber | |
foreach ($obj in $list) { | |
Write-Host ($obj | Format-List | Out-String) | |
msiexec /fs $obj.identifyingnumber /q | |
Start-Sleep 10 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
GDB_VERSION="7.10" | |
GDB_BUILD_FOLDER="~/Work/gdb" | |
mkdir -p "${GDB_BUILD_FOLDER}" | |
cd "${GDB_BUILD_FOLDER}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
def parse_file(file_name): | |
keys = list() | |
rows = list() | |
row = dict() | |
with open(file_name, 'r') as log: | |
items = [line.split(':', 1) for line in log] | |
for item in items: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <time.h> | |
#include <stdio.h> | |
#include <errno.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <sys/random.h> | |
#define UUID_T_LENGTH (16) | |
#define UNIX_TS_LENGTH (6) |
In JavaScript projects, I used to use dotenv so that I could put local environment variables in a .env
file for local development. But dotenv requires you to add code to your project.
With direnv, you can put local env vars in a .envrc file and those env vars are loaded automatically in the shell.
For these steps, it is assummed that you have installed Git Bash on Windows. I also use VSCode as my editor.
- Create a folder such as
c:\tools
to put thedirenv.exe
file and add it to the Windows PATH
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export HADOOP_HOME=/Users/username/Tools/hadoop-3.1.0 | |
export PATH=$PATH:$HADOOP_HOME/bin | |
export PATH=$PATH:$HADOOP_HOME/sbin | |
alias hstart=$HADOOP_HOME/sbin/start-all.sh | |
alias hstop=$HADOOP_HOME/sbin/stop-all.sh | |
export HIVE_HOME=/Users/username/Tools/apache-hive-2.3.3-bin | |
export PATH=$PATH:$HIVE_HOME/bin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
for i in {1..220}; do | |
echo | ./vulnFileCopy2 "'%$i\$x..'" | |
printf "\nLast offset was: ${i}\n" | |
done |