Skip to content

Instantly share code, notes, and snippets.

View corford's full-sized avatar
👋

Charlie Orford corford

👋
View GitHub Profile
@m-radzikowski
m-radzikowski / script-template.sh
Last active May 4, 2024 04:13
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@Wh1terat
Wh1terat / deob.js
Last active May 30, 2023 04:36
Incapsula JS Deobfuscator (obfuscator.io) - JS
#!/usr/bin/env node
var fs = require('fs');
var esprima = require('esprima');
var escodegen = require('escodegen');
var estraverse = require('estraverse');
var debug = true;
var rename = true;
var stringrotatefunc = `
(function (array, times) {
@ivermac
ivermac / config.md
Created September 8, 2018 16:17 — forked from 0XDE57/config.md
Firefox about:config privacy settings

ABOUT

about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar. Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and rendering normally. Some settings may also make firefox unstable.

I am not liable for any damages/loss of data.

Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".

@StevenACoffman
StevenACoffman / fluent-filebeat-comparison.md
Last active April 2, 2024 22:34
Fluentd Fluent-bit FileBeat memory and cpu resources

Fluent-bit rocks

A short survey of log collection options and why you picked the wrong one. 😜

Who am I? Where am I from?

I'm Steve Coffman and I work at Ithaka. We do JStor (academic journals) and other stuff. How big is it?

Number what it means
101,332,633 unique visitors in 2017
@GuilloOme
GuilloOme / background.js
Last active March 24, 2023 20:05
Puppeteer (v.0.12.0) navigation blocking workaround
(function() {
'use strict';
// keep track of all the opened tab
let tabs = {};
// Get all existing tabs
chrome.tabs.query({}, function(results) {
results.forEach(function(tab) {
tabs[tab.id] = tab;

The below instructions describe the process for MITM'ing a target device over HTTPS using nginx. It tries to go over every aspect of intercepting traffic, including hosting a Wifi access point.

Overview

The goal is to get a target device (such as an iPhone, Wii U, or another computer) to trust our local nginx server instead of the remote trusted server. This is going to be done by importing a custom CA root certificate on the target that corresponds with the nginx server's certificate.

Client (Trusted Device) <--> MITM Server (nginx) <--> Remote (Trusted) Server

Requirements

These instructions are being performed on a PureOS machine, which is Debian based. They should also work in other environments with slight modifications

@edjackson-wf
edjackson-wf / get_vault_secret.py
Created September 29, 2017 16:17
IAM auth to Hashicorp Vault server from an ECS container
#!/usr/bin/env python3
import base64
import json
import requests
from aws_requests_auth.boto_utils import BotoAWSRequestsAuth
"""
This code will connect from an ECS container to a remote Hashicorp Vault server
and authenticate using the 'iam' auth_type for the AWS auth backend.
@hectorcanto
hectorcanto / inventory.tf
Last active April 5, 2024 19:38
Produce an Ansible inventory from a Terraform template
data "template_file" "inventory" {
template = "${file("inventory.tpl")}"
vars {
backend_ip = "${aws_instance.backend.public_ip}"
frontend_ip = "${aws_instance.frontend.public_ip}"
landing_ip = "${aws_instance.landing.public_ip}"
key_path = "${var.instance_key_path}"
}
}
anonymous
anonymous / ABOUT
Created September 11, 2014 02:38
Ultimate-GPG-Settings
The Goals of this Gist are to:
[1] Increase the GnuPG key size limit beyond 4096 bits.
[2] Provide configuration files that maximize security and anonymity.
For now, the ideal configuration files have been provided.
The Debian_Linux_GnuPG_Compiler.bash script works to build GnuPG with the 4096 bit key size limit raised.
Please provide input. Feedback and changes welcome.