Skip to content

Instantly share code, notes, and snippets.

@zvodd
zvodd / ConvertItermJSON.py
Last active August 5, 2020 04:45
Takes Item2.json convets to windows colortool (ini) format
import sys, json
MAIN_COLORS = ["BLACK","BLUE","GREEN","CYAN","RED","MAGENTA","YELLOW","WHITE"]
class PrintBuf(object):
def __init__(self):
self.pb = ""
def print(self, *args):
msg = ' '.join(args)

Vagrant Setup on Windows 10: Hyper-V instead of VirtualBox

How to setup Vagrant on Windows 10 using Hyper-V instead of VirtualBox, for STAT1400.

Hyper-V is NOT supported on Windows 10 - Home Edition, you will need Pro Edition or similar.

Enabling AMD-V or Intel VT-X

This depends on your proccessor type AMD or Intel

@zvodd
zvodd / howto_PostCSS_SASS_in_gatsby.md
Last active July 4, 2020 03:31
Using Sass and PostCSS together in Gatsby

install packages

    npm add gatsby-plugin-sass node-sass postcss-import postcss-preset-env

gatsby-config.js

module.exports = {
  plugins: [
    {
@zvodd
zvodd / pyImplanter.py
Created March 24, 2020 03:35
What is this, a binary patcher for ants? Don't @ me!
import argparse
from pprint import pprint
def main():
parser = argparse.ArgumentParser()
parser.add_argument('src_offsets_sizes',
type=argparse.FileType('r'))
parser.add_argument('source_file',
type=argparse.FileType('rb'))
@zvodd
zvodd / IconInfo.py
Last active March 23, 2020 21:52
Prints the formats for each bitmap in icon/curs in `.ico` files
import sys
import struct
import argparse
from collections import OrderedDict
class InFileAction(argparse.Action):
"""Handles a filename or buffers STDIN"""
def __call__(self, parser, namespace, values, option_string=None):
@zvodd
zvodd / pyFileTrim.py
Last active March 24, 2020 02:51
Extracts a slice of bytes from file or stdin, outputs binary to file/stdout. "-x" to dump hex to STDERR
import sys
import os
import argparse
from io import BytesIO
from textwrap import wrap
class DummyWriter(object):
def write(self, x):
pass
@zvodd
zvodd / quickStart.md
Last active March 12, 2020 06:13
Docker windows Install Quickstart

Docker on windows Quick Start

Download:

Enable Hyper-V

Open the Run Command Box via Ctrl-R or StartMenu > Run - enter and return:

@zvodd
zvodd / cookiejson2curl.py
Created March 6, 2020 22:37
Convert cookie.json (from the likes of EditThisCookie) to CURL Cookies file
import json
import argparse
import sys
"""
Convert cookie.json (from the likes of EditThisCookie) to CURL Cookies file
"""
if __name__ == '__main__':
parser= argparse.ArgumentParser()
@zvodd
zvodd / BTC_brainwallet.go
Last active January 3, 2023 10:59
Go BTC brainwallet - Generate wallet address and WIF from bitcoin brainwallet password
package main
import (
"crypto/sha256"
"fmt"
"github.com/btcsuite/btcd/btcec"
"github.com/btcsuite/btcutil/base58"
"golang.org/x/crypto/ripemd160"
)