Skip to content

Instantly share code, notes, and snippets.

View rusq's full-sized avatar
🇺🇦

Rustam rusq

🇺🇦
View GitHub Profile
@rusq
rusq / all-my-go.sh
Created May 1, 2019 11:12
List all gofiles in current package without vendor subdirectory.
#!/bin/sh
# List all gofiles with full path in the current package without vendor subdirectory.
# Useful for dependency tracking in Makefiles.
# License: WTFPL
go list -f "{{.Dir}}:{{.GoFiles}}" ./... \
| tr -d '[]' \
| awk 'BEGIN{FS=":"}{n=split($2,files," "); for (i=1; i<=n; i++) { printf ("%s/%s ",$1, files[i]); } ; };'
@rusq
rusq / base36.pks
Last active August 24, 2017 21:01
BASE36 encoder/decoder for Oracle Database
create or replace package base36 is
-- Author : RUSQ
-- Created : 07.09.2009 19:07:38
-- Purpose : Encodes/Decodes the base36 encoded number
-- Licence : MIT
-- Public function and procedure declarations
function decode(row_id varchar2) return number;
function encode(num number) return varchar2;
@rusq
rusq / dynTaskDlg.asm
Created February 4, 2017 10:51
Example of a dynamic task dialog
; ================================
; Example of a dynamic task dialog
; ================================
; MIT License
;
; Copyright (c) 2012 rusq
;
; Permission is hereby granted, free of charge, to any person obtaining a copy
; of this software and associated documentation files (the "Software"), to deal
; in the Software without restriction, including without limitation the rights
@rusq
rusq / elec2csv.py
Last active October 14, 2016 21:32
Get electrum bitcoin wallet history as a dict
import subprocess
import sys
def get_history():
"""
Get electrum history without requiring it as a module
Returns:
(dict) - current electrum wallet history