Skip to content

Instantly share code, notes, and snippets.

💭
Working on https://github.com/dlangille/thin_to_thick

Dan Langille dlangille

💭
Working on https://github.com/dlangille/thin_to_thick
Block or report user

Report or block dlangille

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
View wrong dir...
[dan@slocum:/usr] $ ls src
COPYRIGHT Makefile README cddl etc include libexec sbin sys usr.bin
LOCKS Makefile.inc1 UPDATING contrib games kerberos5 release secure tests usr.sbin
MAINTAINERS ObsoleteFiles.inc bin crypto gnu lib rescue share tools
[dan@slocum:/usr] $ suod rm -rf bin games homes include jail lib lib32 libdata libexec local ports sbin share
bash: suod: command not found
[dan@slocum:/usr] $ sudo rm -rf bin games homes include jail lib lib32 libdata libexec local ports sbin share
rm: lib32/libthr.so.3: Operation not permitted
rm: lib32/libc.so.7: Operation not permitted
rm: lib32/libcrypt.so.5: Operation not permitted
View keybase.md

Keybase proof

I hereby claim:

  • I am dlangille on github.
  • I am dvl (https://keybase.io/dvl) on keybase.
  • I have a public key whose fingerprint is 07DF AB2F ED74 A9BA 453F 9BB7 0A0B 1714 CFFB 9D3C

To claim this, I am signing this object:

View gist:c78f3ff99f7d70100ade
WITH table_scans as (
SELECT relid,
tables.idx_scan + tables.seq_scan as all_scans,
( tables.n_tup_ins + tables.n_tup_upd + tables.n_tup_del ) as writes,
pg_relation_size(relid) as table_size
FROM pg_stat_user_tables as tables
),
all_writes as (
SELECT sum(writes) as total_writes
FROM table_scans
View Bacula 5 indexes
Based on http://www.databasesoup.com/2014/05/new-finding-unused-indexes-query.html
reason | schemaname | tablename | indexname | index_scan_pct | scans_per_write | index_size | table_size
------------------------+------------+---------------+-----------------------+----------------+-----------------+------------+------------
Never Used Indexes | public | jobhisto | jobhisto_idx | 0.00 | 0.00 | 2024 kB | 13 MB
Never Used Indexes | public | fileset | fileset_name_idx | 0.00 | 0.00 | 16 kB | 16 kB
Never Used Indexes | public | pathhierarchy | pathhierarchy_ppathid | 0.00 | 0.00 | 8192 bytes | 0 bytes
Low Scans, High Writes | public | file | file_jpfid_idx | 0.71 | 0.00 | 9166 MB | 32 GB
Low Scans, High Writes | public | file | file_pathid_idx | 2.55 | 0.00 | 7230 MB | 3
@dlangille
dlangille / 2015-09-10.1
Last active Aug 29, 2015
FreeBSD 9.3 IPv6 tunnel via TunnelBroker.net
View 2015-09-10.1
# egrep -i 'ipv6|gif' /etc/rc.conf
cloned_interfaces="tun0 gif0"
ifconfig_gif0="tunnel 96.245.100.201 209.51.161.14 mtu 1480"
ifconfig_gif0_ipv6="inet6 2001:470:1f06:9ea::2 2001:470:1f06:9ea::1 prefixlen 128"
ifconfig_em0_ipv6="inet6 2001:470:1f07:09ea:1::1"
ipv6_defaultrouter="2001:470:1f06:9ea::1"
ipv6_gateway_enable="YES"
rtadvd_enable="YES"
View knew zfs-stats
[dan@knew:~] $ zfs-stats -a
------------------------------------------------------------------------
ZFS Subsystem Report Thu Sep 18 15:05:39 2014
------------------------------------------------------------------------
System Information:
Kernel Version: 903000 (osreldate)
Hardware Platform: amd64
@dlangille
dlangille / gist:81028167b33d4835cfba
Last active Aug 29, 2015
zfs-stats (http://www.freshports.org/sysutils/zfs-stats) of slocum, my main developement server
View gist:81028167b33d4835cfba
[dan@slocum:/usr/local/etc/poudriere.d] $ zfs-stats -a
------------------------------------------------------------------------
ZFS Subsystem Report Thu Sep 18 15:07:05 2014
------------------------------------------------------------------------
System Information:
Kernel Version: 903000 (osreldate)
Hardware Platform: amd64
View gist:e7261dd65b6e8af1f2b3
[dan@zuul:~] $ zfs-stats -a
------------------------------------------------------------------------
ZFS Subsystem Report Thu Sep 18 15:25:15 2014
------------------------------------------------------------------------
System Information:
Kernel Version: 903000 (osreldate)
Hardware Platform: amd64
@dlangille
dlangille / copy-for-rotation
Last active Aug 29, 2015
nagios plugins to: verify a list of files aren't too old, that no failed rsync files are lingering, and there are no zero-sized files.
View copy-for-rotation
#!/bin/sh
#
# copy each .dump and .sql file in $1 to $2
#
BACKUPDIR=$1
COPYDIR=$2
GLOBALS="globals"
cd ${BACKUPDIR}
View bacula7-nightly-run-trunk.sh
$ cat ~/bin/bacula7-nightly-run-trunk.sh
#!/bin/sh
# This script can be used to launch either MySQL or PostgreSQL scripts. It runs PostgreSQL by default.
# usage: bacula-nightly-run-trunk.sh postgresql
echo $PATH
GIT="/usr/local/bin/git"
SRCDIR="${HOME}/src/Bacula7RegressionTesting-TRUNK"
You can’t perform that action at this time.