Skip to content

Instantly share code, notes, and snippets.

@imcatwhocode
imcatwhocode / generate.mjs
Created October 19, 2023 00:24
Generates sample ciphertexts for available encryption algos in Node
import { createCipheriv, createDecipheriv, randomBytes, getCiphers } from 'crypto';
const dataset = {};
const ciphers = getCiphers();
// Bun supported ciphers
// const ciphers = [
// 'des-ecb', 'des', 'des-cbc',
// 'des3', 'des-ede3-cbc', 'des-ede3',
@imcatwhocode
imcatwhocode / protonvpn-full-traffic.ros
Created November 5, 2022 03:51
Mikrotik ROS ProtonVPN
# Proven on defconf
# Lack of many security features (like Kill Switch) and perhaps may be unoptimal
# ProtonVPN endpoint address: x.x.x.x
# Local gateway address: y.y.y.y
/ip firewall address-list add address=192.168.88.0/24 list=under_protonvpn
/interface/wireguard/add name=protonwg01 private-key="PROTONVPN PRIVATE KEY" comment="ProtonVPN interface"
/interface/wireguard/peers/add endpoint-address=x.x.x.x endpoint-port=51820 public-key="PROTONVPN PUBLIC KEY" allowed-address=0.0.0.0/1,128.0.0.0/1 interface=protonwg01
/ip/address/add address=10.2.0.2/30 interface=protonwg01
@imcatwhocode
imcatwhocode / add-github-orgs-to-user-meta.js
Created October 18, 2020 01:44 — forked from aslafy-z/add-github-orgs-to-user-meta.js
Auth0 rule to check organization of Github users
// Auth0 custom rule
// Add Github Organizations to the user metadata
//
// This rule need the following configurations values
// AUTH0_DOMAIN_NAME: your auth0 domain name
// MANAGEMENT_CLIENT_ID: your auth0 management api client id
// MANAGEMENT_CLIENT_SECRET: your auth0 management api client secret
//
// You have to create an Management API Application with proper
// scope to allow rule to fetch user organizations.
@imcatwhocode
imcatwhocode / CFLAGS
Created November 1, 2016 14:30
Raspberry Pi 2 optimal compilation flags
CFLAGS="-O2 -pipe -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard"
@imcatwhocode
imcatwhocode / keybase.md
Last active August 3, 2017 18:45
Keybase validation

Keybase proof

I hereby claim:

  • I am imcatwhocode on github.
  • I am imcatwhocode (https://keybase.io/imcatwhocode) on keybase.
  • I have a public key ASCoHKLpC18X1yU4_d9kg9f414cZghx_dscGRWlAkVBMMgo

To claim this, I am signing this object:

@imcatwhocode
imcatwhocode / SMCChained.py
Created March 21, 2016 19:18
Fixed Pololu Simple Controller library for Python
#!/usr/bin/env python2
# -*- coding: UTF-8 -*-
import serial
import struct
class SMCChain(object):
# Constructor
def __init__(self, port, baudrate):
super(SMCChain, self).__init__()