Skip to content

Instantly share code, notes, and snippets.

View KyleJamesWalker's full-sized avatar
😃
Hello!

Kyle James Walker (he/him) KyleJamesWalker

😃
Hello!
View GitHub Profile
@KyleJamesWalker
KyleJamesWalker / README.md
Created January 31, 2019 19:34
Setup.py Install a Fork

Setup.py Hacking

To get this to work without updating your forked version number, you must lie in the dependency_links section, and then unpin the version that you want installed. This makes it think that the branch is version current linux time (int) in the lookup but will acutally install whatever version it finds in the fork.

Note: You also will likely need to clear your pip cache so it won't install the version it finds in pypi, I think doing the current time will keep it from using the pypi version, so just make sure you keep an eye on the logs when you install your library, and that it says "Cloning ..../KyleJamesWalker/example_lib

@KyleJamesWalker
KyleJamesWalker / try_snappy_py3.py
Created January 5, 2017 20:02
AVRO and Snappy within Python 3
"""Checking to see if snappy works with Python 3 recent updates to libraries
Requires:
python-snappy==0.5
fastavro==0.9.9
"""
import random
import string
@KyleJamesWalker
KyleJamesWalker / README.md
Created February 17, 2021 20:14
Filter Long Descriptions from LastPass Export for BitWarden Import

Overview

When trying to import my LastPass passwords, I had many that were over 1000 characters for the notes, so this script simply filters out the values that are likely too long.

Once this has been run you will have 2 files, one that can be imported, and the other can be edited, or broken up to allow the remaining import.

@KyleJamesWalker
KyleJamesWalker / global-tts.lua
Last active May 10, 2020 22:25
The Crew Tabletop Simulator Script
--[[ Lua code. See documentation: https://api.tabletopsimulator.com/ --]]
#include Console/console++
console.hide_globals('guids')
function onLoad()
startingPiecesBox = getObjectFromGUID("51ae69")
collectionZone = getObjectFromGUID("ffb6e4")
reminderZone = getObjectFromGUID("a07fbf")
@KyleJamesWalker
KyleJamesWalker / Ranger.md
Last active February 4, 2020 16:03
Ranger Setup

Ranger mac setup:

  • brew install ranger
  • ranger --copy-config=all
  • vim ~/.config/ranger/rc.conf
    • preview_image false --> true

Other Tools:

  • brew install w3m
  • brew install lynx
@KyleJamesWalker
KyleJamesWalker / VagrantSSHAngentForwardingWithAnsible.md
Last active December 10, 2019 01:37
Vagrant SSH Agent Forwarding Working 1.4.3

This was working on Vagrant 1.4.3 (Mac).

#HOST#

File: ~/.ssh/config

Host vagrant.*
ForwardAgent yes

File: Vagrantfile

@KyleJamesWalker
KyleJamesWalker / README.md
Created October 25, 2019 21:05
Install K8s Dashboard

Install

# Install the dashboard
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta4/aio/deploy/recommended.yaml
# Create a user
kubectl create serviceaccount dashboard-admin-sa
kubectl create clusterrolebinding dashboard-admin-sa \
  --clusterrole=cluster-admin --serviceaccount=default:dashboard-admin-sa
# Get the jwt. Note: use tab complete for the `-xxxxx`
kubectl describe secret dashboard-admin-sa-token-xxxxx
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
.tnr {
font-family: "Times New Roman", Times, serif;
}
.logo {
position: relative;
@KyleJamesWalker
KyleJamesWalker / README.md
Created July 9, 2019 02:50
Huawei Modem DHCP Details
You can get the string manually with the following:
screen /dev/ttyUSB0
ATZ
AT^NDISDUP=1,1,"h2g2"
AT^DHCP?

# This responds with something like:
#  ^DHCP:11111111,22222222,33333333,44444444,55555555,66666666,100000000,50000000
# 
@KyleJamesWalker
KyleJamesWalker / dir_to_srt.py
Last active December 15, 2018 01:51
Converts a folder of srt files into a single srt
# -*- coding: utf-8 -*-
'''
Quick script to embed into Automator to concat a folder of srt files into
a single srt.
Note: This also removes extra blanks lines, to allow pycaption to process
the files. This won't be needed if https://github.com/pbs/pycaption/pull/39
is merged.
'''