Skip to content

Instantly share code, notes, and snippets.

Grzegorz Wierzowiecki gwpl

Block or report user

Report or block gwpl

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
maximilize /
Created Sep 13, 2018
Script to detect and shutdown not needed qubes VM's
#!/usr/bin/env python
import subprocess
import re
from collections import namedtuple
import binascii
import time
import json
IGNORE = """
santisbon / Search my
Last active Feb 11, 2020
How to search gists
View Search my

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.

Find all gists with a .yml extension.

Find all gists with HTML files.

lexszero / bfx-calc.hs
Last active Aug 8, 2018
Bitfinex margin trading calculator
View bfx-calc.hs
import Control.Monad.State
import Text.Printf
initiallyRequired = 0.3
maintenanceRequired = 0.15
takerFee = 0.002
type Amount = Double
type Price = Double
dannguyen /
Last active May 7, 2018
Using bash, csvkit, and SQLite to analyze San Francisco restaurant health inspection data

How to download, import, and analyze San Francisco restaurant inspection data using SQLite3 and csvkit from the command-line.

A quick example of doing data wrangling from the command-line, as well as getting to know one of San Francisco's data sets: the San Francisco restaurant inspections, courtesy of the SF Department of Public Health. I don't normally do database work from the command-line, but importing bulk data into SQLite is pretty frustrating using the available GUIs or just the shell.

So thank goodness for Christopher Groskopf's csvkit, a suite of Unix-like tools that use Python to robustly handle CSV files. There's a lot of great tools in csvkit, but for this gist, I just use csvsql, which can parse a CSV and turn it into properly-flavored SQL to pass directly into your database app of choice.

notro / fbtft.conf
Created Feb 11, 2015
xorg configuration for use with FBTFT on Raspian: /etc/X11/xorg.conf.d/fbtft.conf
View fbtft.conf
# FBTFT xorg config file
# startx -- -layout TFT
# startx -- -layout HDMI
# startx
# When -layout is not set, the first is used: TFT
Section "ServerLayout"
View Makefile
# Hello, and welcome to makefile basics.
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
# Once you're done here, go to
# to learn SOOOO much more.
mazgi / NEW QGROUP!.md
Last active Dec 23, 2017
Btrfs subvolume quota
[root@btrfs-testdrive] # btrfs qgroup create 1/100 /mnt/btrfs
[root@btrfs-testdrive] # btrfs qgroup assign 0/276 1/100 /mnt/btrfs
[root@btrfs-testdrive] # btrfs qgroup show /mnt/btrfs
qgroupid rfer       excl       
-------- ----       ----       
0/5      16384      16384      
0/256    2864136192 2864136192 
0/258    833703936  833703936  
0/259    52510720   52510720   
robschmuecker /
Last active Feb 11, 2020
Multiple Parent Nodes D3.js

Multi Link Example for

Added an additional link between nodes at the bottom of the dndTree.js file.

This example pulls together various examples of work with trees in D3.js.

The panning functionality can certainly be improved in my opinion and I would be thrilled to see better solutions contributed.

One can do all manner of housekeeping or server related calls on the drop event to manage a remote tree dataset for example.

mapio / Setup an USB raw device
Created Jan 17, 2014
To boot Virtualbox from a USB pendrive you must first create a virtual disk to access to it and then add it as storage.
View Setup an USB raw device
if [ -r USB.vmdk ]; then
VBoxManage storageattach "BootFromUSB" --storagectl "SATA" --port 0 --device 0 --medium none
VBoxManage closemedium disk USB.vmdk --delete
sudo chown $USER /dev/disk1*
VBoxManage internalcommands createrawvmdk -filename USB.vmdk -rawdisk /dev/disk1 -partitions 1,2
function clean_up {
# Perform program exit housekeeping
You can’t perform that action at this time.