Skip to content

Instantly share code, notes, and snippets.

View parasquid's full-sized avatar

Tristan parasquid

View GitHub Profile
@parasquid
parasquid / order_lines_from_united_states_query.rb
Last active August 29, 2015 14:24
A good query object template
class OrderLinesFromUnitedStatesQuery
class << self
delegate :call, to: :new
end
def initialize(relation = OrderLine.all)
@relation = relation
end
def call
@parasquid
parasquid / gist:b0652d24f993fa06c865
Last active June 12, 2020 02:57
Gnome 3: How to Alt Tab windows on current workspace only + High DPI setup + keyboard repeat rate
# settings from https://superuser.com/questions/394376/how-to-prevent-gnome-shells-alttab-from-grouping-windows-from-similar-apps/860001
gsettings set org.gnome.desktop.wm.keybindings switch-applications "['<Super>Tab']"
gsettings set org.gnome.desktop.wm.keybindings switch-windows "['<Alt>Tab']"
gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward "['<Shift><Super>Tab']"
gsettings set org.gnome.desktop.wm.keybindings switch-windows-backward "['<Shift><Alt>Tab']"
gsettings set org.gnome.shell.app-switcher current-workspace-only true
gsettings set org.gnome.desktop.peripherals.keyboard delay 320
gsettings set org.gnome.desktop.peripherals.keyboard repeat-interval 25

To Design or Not To Design? A Third Good Question

Following my earlier discussions of testing and defect fixing, I’ll complete the trilogy by discussing the role of design early in projects. Recall the context: projects that have validated a genuine need by haven’t validated an economic proposition. Because of the uncertainties of such a situation, iteration is inevitable. Piloting a project on the runway you will like have to try many experiments to find value customers will buy. Capital efficiency while iterating extends the lifespan of the project and increases its chances of success. The more experiments you can perform per dollar, the higher your expected return.

Review

In the sibling essays to this one I argued that the Extreme Programming principles of Test Until Bored and Defects Zero were perfectly appropriate to the cruise phase of a product, where the business driver is increasing profit by lowering cost. These principles also serve to prepare the software to act as a platform from which to

@parasquid
parasquid / .rtorrent.rc
Created September 1, 2016 10:22 — forked from bryanjswift/.rtorrent.rc
rtorrent configuration file with description
# This is an example resource file for rTorrent. Copy to
# ~/.rtorrent.rc and enable/modify the options as needed. Remember to
# uncomment the options you wish to enable.
# Maximum and minimum number of peers to connect to per torrent.
min_peers = 1
max_peers = 100
# Same as above but for seeding completed torrents (-1 = same as downloading)
@parasquid
parasquid / ubuntu-x11
Created December 24, 2016 05:02 — forked from cpliakas/ubuntu-x11
Headless X server on Ubuntu for X11 forwarding
#!/bin/bash
sudo apt-get install xserver-xorg xserver-xorg-core x11-apps x11-xserver-utils
@parasquid
parasquid / gist:769758276891e00c4798e76c0e118a27
Created January 8, 2017 03:03
Find out which records are taking up space
SELECT
relname as "Table",
pg_size_pretty(pg_total_relation_size(relid)) As "Size",
pg_size_pretty(pg_total_relation_size(relid) - pg_relation_size(relid)) as "External Size"
FROM pg_catalog.pg_statio_user_tables ORDER BY pg_total_relation_size(relid) DESC;
SELECT schemaname,relname,n_live_tup
FROM pg_stat_user_tables
ORDER BY n_live_tup DESC;
@parasquid
parasquid / gist:481a382a9dd1130d8e6deb91c6f9946b
Last active January 16, 2017 07:25
allow virtualbox to support osx guests
cd "C:\Program Files\Oracle\VirtualBox\"
VBoxManage.exe modifyvm "osx-vbox" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff
VBoxManage setextradata "osx-vbox" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3"
VBoxManage setextradata "osx-vbox" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
VBoxManage setextradata "osx-vbox" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple"
VBoxManage setextradata "osx-vbox" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VBoxManage setextradata "osx-vbox" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
VBoxManage setextradata "osx-vbox" VBoxInternal2/EfiGopMode 3
sudo sed -i 's$<listen>.*</listen>$<listen>tcp:host=localhost,port=0</listen>$' /etc/dbus-1/session.conf
# from http://askubuntu.com/a/827956
@parasquid
parasquid / Global.sublime-settings
Created June 9, 2017 06:17 — forked from benatkin/Global.sublime-settings
excluding node_modules from Sublime Text 2
// Place user-specific overrides in this file, to ensure they're preserved
// when upgrading
{
"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS", "node_modules"]
}
@parasquid
parasquid / cloudSettings
Last active November 3, 2020 11:32
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-11-03T11:32:48.885Z","extensionVersion":"v3.4.3"}