Skip to content

Instantly share code, notes, and snippets.

View Jerakin's full-sized avatar
🔥
Makin'

Jerakin

🔥
Makin'
View GitHub Profile
@Jerakin
Jerakin / Emulate_Scrolling_Middle_Button.ahk
Created October 9, 2019 14:53
Enables you to use any key with cursor movement to emulate a scrolling middle button. Written for Trackball mice.
;;
;; Emulate_Scrolling_Middle_Button.ahk
;; Author: Erik Elmore <erik@ironsavior.net>
;; Version: 1.1 (Aug 16, 2005)
;;
;; Enables you to use any key with cursor movement
;; to emulate a scrolling middle button. While
;; the TriggerKey is held down, you may move the
;; mouse cursor up and down to send scroll wheel
;; events. If the cursor does not move by the
@Jerakin
Jerakin / Makefile
Created September 23, 2019 15:04
Example python Makefile
clean:
rm -rf *.egg-info
rm -rf dist
build:
python setup.py bdist_wheel
install:
pip install ./dist/getbob-$(shell cat "./getbob/__init__.py" | grep -Eo -m 1 "[0-9\.ab]{5,}")-py3-none-any.whl
#!/usr/bin/python
from __future__ import print_function
import os.path
import csv
import json
import sys
import gzip
import ntpath
_json_loads = None
import json
import time
import requests
import shutil
import re
p = r".\pokemon_order.json"
dirty_reg = re.compile("filehistory-selected[^\"]*.*?(cdn\.bulbagarden\.net/upload[^\"]*)")
# builtin imports
import argparse
from pathlib import Path
from math import ceil
# 3d Party imports
import deftree
from PIL import Image
@Jerakin
Jerakin / url.lua
Created January 10, 2019 10:25
Allows you to store urls centrally
-- Setting
-- url.set("MAIN", msg.url("."))
--
-- Shorthand set
-- url.MAIN = msg.url(".")
--
--
-- Getting
-- url.get("MAIN")
--
{
"versions": [
{
"sha1": "e07f3bb9e8c970eceda8dce8efd5905fd67fa720",
"version": "1.2.162"
},
{
"sha1": "45635ad26f85009c52905724e242cc92dd252146",
"version": "1.2.161"
},
@Jerakin
Jerakin / lfsextend.lua
Last active February 9, 2019 09:57
Extending the lfs scope with some handy functions
-- Copied and adapted from
-- https://github.com/ToxicFrog/luautil/blob/master/lfs.lua
local windows = package.config:sub(1,1) == "\\"
local other_sep
local sep
local dirsep
@Jerakin
Jerakin / delete_obsolete_resources.py
Last active March 6, 2018 16:57
Remove obsolete assets from a gui file
import deftree
import os
import sys
def run_on_file(project_path, gui_file):
tree = deftree.parse(gui_file)
output = []
output.extend(clean_textures(tree))
@Jerakin
Jerakin / swedbank_to_ynab
Created December 31, 2017 02:22
Converting Swedbanks exported excel document to a format readable by you need a budget.
"""
Converting Swedbanks exported excel document to a format readable by you need a budget.
"""
import csv
import os
import pandas as pd
bank_file = r"C:\Users\Jerakin\Desktop\Kontohistorik.xls"