Skip to content

Instantly share code, notes, and snippets.

View tinybike's full-sized avatar

Jack Peterson tinybike

  • Merica
View GitHub Profile
@tinybike
tinybike / mssql_to_csv.py
Last active October 22, 2023 18:12
simple mssql -> csv file example using pymssql
#!/usr/bin/env python
"""
simple mssql -> csv file example using pymssql
@author jack@tinybike.net
"""
import csv
import datetime
import pymssql
from decimal import Decimal
@tinybike
tinybike / hex_to_utf16le.js
Created August 9, 2015 13:37
Convert hex to UTF-16LE
function hex_to_utf16le(hex) {
var output = '';
for (var i = 0, l = hex.length; i < l; i += 4) {
output += '\\u' + hex.slice(i+2, i+4) + hex.slice(i, i+2);
}
return JSON.parse('"' + output + '"');
}
@tinybike
tinybike / weighted_median.py
Last active July 4, 2023 15:03
calculate a weighted median
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
calculate a weighted median
@author Jack Peterson (jack@tinybike.net)
"""
from __future__ import division
import numpy as np
def weighted_median(data, weights):
@tinybike
tinybike / terminator.config
Last active August 2, 2021 14:07
~/.config/terminator/config
[global_config]
suppress_multiple_term_dialog = True
title_transmit_bg_color = "#c00909"
[keybindings]
[layouts]
[[default]]
[[[child0]]]
fullscreen = False
last_active_term = f6492e56-7053-4ce3-8780-d71bd7ae0843
last_active_window = True
#!/usr/bin/env python
noShowBondsThatActuallyDidntShowInPreviousWindow = 3
totalNoShowBondsInPreviousWindow = 4
repPrice = 21
targetDesignatedReportNoShowsDivisor = 20
initalReportMinValue = 0.7
noShowBond = 0.7
Feb 14 05:39:09 rinkeby-signer systemd[1]: Started geth.
Feb 14 05:39:09 rinkeby-signer sudo[2694]: pam_unix(sudo:session): session closed for user root
Feb 14 05:39:09 rinkeby-signer geth[2697]: WARN [02-14|05:39:09.656] Sanitizing cache to Go's GC limits provided=2048 updated=1314
Feb 14 05:39:09 rinkeby-signer geth[2697]: DEBUG[02-14|05:39:09.659] Sanitizing Go's GC trigger percent=77
Feb 14 05:39:09 rinkeby-signer geth[2697]: INFO [02-14|05:39:09.660] Maximum peer count ETH=128 LES=0 total=128
Feb 14 05:39:09 rinkeby-signer geth[2697]: INFO [02-14|05:39:09.660] Smartcard socket not found, disabling err="stat /run/pcscd/pcscd.comm: no such file or directory"
Feb 14 05:39:09 rinkeby-signer geth[2697]: DEBUG[02-14|05:39:09.661] FS scan times list=769.009µs set=5.376µs diff=2.434µs
Feb 14 05:39:09 rinkeby-signer geth[2697]: INFO [02-14|05:39:09.663] Starting peer-to-peer node instance=Geth/v1.9.10-stable-58cf5686/linux-amd64
This file has been truncated, but you can view the full file.
=== npm audit security report ===
# Run npm install ethereumjs-ledger@2.1.5 to resolve 18 vulnerabilities
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate │ ReDoS │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ brace-expansion │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ ethereumjs-ledger │
├───────────────┼──────────────────────────────────────────────────────────────┤
jack@substrate:~/src/augur-core$ npm audit
=== npm audit security report ===
# Run npm update webpack-cli --depth 3 to resolve 396 vulnerabilities
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Low │ Prototype Pollution │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ lodash │
├───────────────┼──────────────────────────────────────────────────────────────┤
2018-08-07 13:11:50 startup archives unpack
2018-08-07 13:11:51 upgrade libpam-systemd:amd64 229-4ubuntu21.2 229-4ubuntu21.4
2018-08-07 13:11:51 status half-configured libpam-systemd:amd64 229-4ubuntu21.2
2018-08-07 13:11:51 status unpacked libpam-systemd:amd64 229-4ubuntu21.2
2018-08-07 13:11:51 status half-installed libpam-systemd:amd64 229-4ubuntu21.2
2018-08-07 13:11:51 status triggers-pending man-db:amd64 2.7.5-1
2018-08-07 13:11:51 status half-installed libpam-systemd:amd64 229-4ubuntu21.2
2018-08-07 13:11:51 status unpacked libpam-systemd:amd64 229-4ubuntu21.4
2018-08-07 13:11:51 status unpacked libpam-systemd:amd64 229-4ubuntu21.4
2018-08-07 13:11:51 upgrade libudev1:i386 229-4ubuntu21.2 229-4ubuntu21.4