Skip to content

Instantly share code, notes, and snippets.

View oxr463's full-sized avatar
💻
./configure --enable-hacker-mode

oxr463

💻
./configure --enable-hacker-mode
View GitHub Profile
@oxr463
oxr463 / lowercase_filenames.sh
Last active May 3, 2021 16:53
Lowercase all file names in git repository
#!/bin/sh
# Lowercase all file names in git repository
# SPDX-License-Identifier: 0BSD
# FIXME: recurse subdirectories
for file in *; do
lowercase_name=$(echo $file | awk '{ print tolower($0) }')
# https://stackoverflow.com/a/30654833/8507637
git mv "${file}" "_${lowercase_name}"
@oxr463
oxr463 / base64tobin.js
Last active April 26, 2021 16:16
Encode/Decode binary as base64
#!/usr/bin/env node
// SPDX-License-Identifier: MIT
// Decode binary from base64
const fs = require("fs");
const process = require("process");
const util = require("util");
process.argv.forEach(function (val, index, array) {
const txt = fs.readFileSync(val);
const bin = Buffer.from(txt,'base64').toString();
@oxr463
oxr463 / Dockerfile
Last active April 16, 2021 15:00
NGINX gzip compression testing image
# SPDX-License-Identifier: MIT
FROM alpine:latest
# Install nginx and enable gzip compression
RUN apk update && \
apk upgrade && \
apk add nginx && \
mkdir -p /run/nginx && \
touch /run/nginx/nginx.pid && \
sed -i 's/#gzip on;/gzip on;/g' /etc/nginx/nginx.conf
@oxr463
oxr463 / README.md
Last active March 30, 2021 16:54
Installing Spriter r10 on Ubuntu 20.04 LTS

Installing Spriter r10 on Ubuntu 20.04 LTS

Instructions

# Ensure the script is executable.
chmod +x install.sh
# Run installer script
./install.sh
@oxr463
oxr463 / README.md
Created January 21, 2021 21:40
Iterating through cluster nodes via the Rancher API v3

Rancher Cluster Nodes in Python

Iterating through cluster nodes via the Rancher API v3

Dependencies

Examples

@oxr463
oxr463 / README.md
Last active November 30, 2020 15:01
Installing Rancher in RKE on Alpine Linux

WIP: Installing Rancher in RKE on Alpine Linux

This is a work in progress.

Dependencies

Note: this requires software in the edge repository.

apk upgrade
@oxr463
oxr463 / Vagrantfile
Last active September 21, 2020 19:48
Create generic three-node cluster
# Copyright (c) 2020 Lucas Ramage <ramage.lucas@protonmail.com>
# SPDX-License-Identifier: UPL-1.0
# Create generic three-node cluster
# Based on: https://github.com/oracle/vagrant-projects/blob/master/Kubernetes/Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
@oxr463
oxr463 / csv2json.js
Last active June 15, 2020 23:42
Convert CSV to JSON
#!/usr/bin/env node
// SPDX-License-Identifier: MIT
// Convert CSV to JSON
const csv2json = require("csvjson-csv2json");
const fs = require("fs");
const process = require("process");
const util = require("util");
process.argv.forEach(function (val, index, array) {
if(val.includes(".csv")) {
@oxr463
oxr463 / README.md
Last active April 29, 2020 17:53
Application Security Testing Playlist