Skip to content

Instantly share code, notes, and snippets.

View boyter's full-sized avatar
💭
Doing the things

Ben Boyter boyter

💭
Doing the things
View GitHub Profile
# This is the default gitleaks configuration file.
# Rules and allowlists are defined within this file.
# Rules instruct gitleaks on what should be considered a secret.
# Allowlists instruct gitleaks on what is allowed, i.e. not a secret.
title = "gitleaks config"
[allowlist]
description = "global allow lists"
regexes = [
'''219-09-9999''',
@boyter
boyter / guid.py
Created November 8, 2022 05:18
Simply Python3 script to create guids that contain only 1337 speak
import random
def _replace(word):
replacements = {
'l': '1',
'i': '1',
's': '5',
't': '7',
'g': '9',
'q': '9',
// Primitive hash function that for a string returns a positive 32 bit int
// Do not use in production, use murmur3 or fnv1
// You can improve this by changing 5 to 31
Object.defineProperty(String.prototype, 'hashCode', {
value: function() {
var hash = 0, i, chr;
for (i = 0; i < this.length; i++) {
chr = this.charCodeAt(i);
hash = ((hash << 5) - hash) + chr;
hash |= 0; // Convert to 32bit integer
@boyter
boyter / main.go
Created August 19, 2018 09:56
Walk directory in Go
package main
import (
"fmt"
"github.com/karrick/godirwalk"
"io/ioutil"
)
func main() {
godirwalk.Walk("./", &godirwalk.Options{
@boyter
boyter / main.rs
Created August 19, 2018 09:54
Walk directory in Rust
extern crate walkdir;
use walkdir::WalkDir;
use std::fs::File;
use std::io::Read;
fn main() {
let nul = 0;
let mut bytes_count: i32;
@boyter
boyter / README.md
Created February 14, 2018 07:12 — forked from miguelmota/README.md
Multiple accounts with Mutt E-Mail Client (gmail example)

How to set up multiple accounts with Mutt E-mail Client

Thanks to this article by Christoph Berg

Instructions

Directories and files

~/
@boyter
boyter / Main.java
Created December 19, 2017 22:46
Identify Path Walking Issues in Java without Link Follow
import java.io.IOException;
import java.nio.file.*;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.EnumSet;
public class Main {
public static void main(String argv[]) {
Main main = new Main();
@boyter
boyter / GCC_License.txt
Created May 1, 2017 08:39
Output of license checker against GCC project
This file has been truncated, but you can view the full file.
>>>>>>> gcc/COPYING GPL-2.0
>>>>>>> gcc/COPYING GPL-2.0
>>>>>>> gcc/COPYING GPL-1.0
>>>>>>> gcc/COPYING GPL-1.0
>>>>>>> gcc/COPYING.LIB LGPL-2.1
>>>>>>> gcc/COPYING3 GPL-3.0
>>>>>>> gcc/COPYING3 GPL-3.0
>>>>>>> gcc/COPYING3 GPL-2.0
>>>>>>> gcc/COPYING3 GPL-2.0
>>>>>>> gcc/COPYING3.LIB LGPL-3.0
@boyter
boyter / Main.java
Last active December 19, 2017 23:43
Identify Path Walking Issues in Java
import java.io.IOException;
import java.nio.file.*;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.EnumSet;
public class Main {
public static void main(String argv[]) {
Main main = new Main();