Skip to content

Instantly share code, notes, and snippets.

View idlemoor's full-sized avatar

David Spencer idlemoor

View GitHub Profile
### Keybase proof
I hereby claim:
* I am idlemoor on github.
* I am idlemoor (https://keybase.io/idlemoor) on keybase.
* I have a public key whose fingerprint is B0BF 4637 2706 DD10 D882 36D1 2950 AF8E CB51 DF3D
To claim this, I am signing this object:
@idlemoor
idlemoor / gist:45ff29d6a856a89591e0b3d97d42d30a
Last active June 9, 2016 22:30
Find file collisions in SlackBuilds.org packages
cd /store/SBo/master/packages/14.2/i486/
for t in */*/*.t?z; do
p=$(dirname $t)
echo $p >&2
tar tvf $t | sed -r -e '/^d/d' -e 's/^([^ ]+ +){5}//' -e '/^install\//d' -e "s:^:$p###:"
done > /tmp/mega-list
cd /store/slackware/current/i586/slackware
for t in */*.t?z; do
p=$(echo $t | rev | cut -f4- -d- | rev)
@idlemoor
idlemoor / buildsecs_compare_arch.txt
Created April 8, 2016 11:59
Seconds to build each SlackBuilds.org package on x86_64 (first number) and i586 (second number) -- Slackware 14.2RC1 on i5-4690K (four cores 3.5GHz, 16Gb)
chair# echo "select itemid,secs from buildsecs;" | sqlite3 database_master_i486.sqlite3 | while read stuff; do it=$(echo $stuff | cut -f1 '-d|'); ss=$(echo $stuff | cut -f2 '-d|'); xs=$(echo "select secs from buildsecs where itemid='$it';" | sqlite3 database_master.sqlite3); echo $it $xs $ss; done | sort
academic/EMBASSY 96 99
academic/EMBOSS 286 327
academic/Gblocks 1 1
academic/GeoGebra 16 19
academic/ImageJ 3 2
academic/Kst 127 96
academic/Mnemosyne 3 3
academic/PhyML 14 15
academic/PyAMG 14 15
@idlemoor
idlemoor / buildsecs.txt
Last active April 7, 2016 21:47
Seconds to build each SlackBuilds.org package for x86_64 on an i5-4690K (four cores 3.5GHz), 16Gb -- ymmv ;-)
academic/EMBASSY 96
academic/EMBOSS 286
academic/Gblocks 1
academic/GeoGebra 16
academic/ImageJ 3
academic/Kst 127
academic/Mnemosyne 3
academic/PhyML 14
academic/PyAMG 14
academic/QtiPlot 351
@idlemoor
idlemoor / pre-commit
Created November 23, 2015 09:06
Avoid commits to the master branch
#!/bin/sh
#
# .git/hooks/pre-commit
# Avoid commits to the master branch
# dbs 2015-11-23
#
# You need to copy this file to .git/hooks/ in each relevant repository, and
# then you need to make the file executable:
# chmod ugo+x .git/hooks/pre-commit
#
@idlemoor
idlemoor / synculator.sh
Created September 20, 2015 21:07
Synchronise branches in Ponce's repo for SBo-current
#!/bin/bash
csi=$'\x1b['
colour_warning="${csi}1;35m"
colour_normal="${csi}0m"
#===============================================================================
function sync_stable
{
@idlemoor
idlemoor / sbo-depender-count
Created January 30, 2015 17:45
Script to count the number of direct and indirect dependers for each item in the SlackBuilds.org repository. Optional deps are not counted (obviously).
#!/bin/bash
# Count the number of direct and indirect dependers for each item in the SBo repo
#
declare -a pkglist deplist
declare -A req votes
function list_deps_of
{
local pkg=$1