Skip to content

Instantly share code, notes, and snippets.

@tghosgor
tghosgor / i3 dropdown terminal
Created July 26, 2022 18:56 — forked from indeedwatson/i3 dropdown terminal
Dropdown terminal for i3 utilizing the scratchpad
exec --no-startup-id termite --name dropdown &
bindsym $mod+i [instance="dropdown"] scratchpad show, move position center
for_window [instance="dropdown"] floating enable, resize set 800 600, \
move scratchpad

Given a table...

CREATE TABLE foo (
  id SERIAL PRIMARY KEY,
  created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
  ...
);
@tghosgor
tghosgor / defragfs.sh
Created May 2, 2014 17:04
filefrag scanner and defragmenter as a bash script
#!/bin/bash
#Usage: ./defragfs.sh / 60 defrag #defragments files with more than 60 extents under the root directory
directory=$1
limit=$(($2))
[[ $3 = defrag ]] && defrag=1 || defrag=0
echo "Minimum extent limit has been chosen as $limit."
if [ $defrag = 1 ]; then