Skip to content

Instantly share code, notes, and snippets.

View spikegrobstein's full-sized avatar

spike grobstein spikegrobstein

View GitHub Profile
$ npm info npm
{ name: 'npm',
description: 'a package manager for JavaScript',
'dist-tags':
{ next: '3.10.7',
'v3.x-next': '3.10.7',
'next-2': '2.15.10',
'v3.x-latest': '3.10.6',
'latest-1': '1.4.29',
@spikegrobstein
spikegrobstein / media-histogram.sh
Last active April 3, 2017 16:07
creates a histogram of the years of your media (assumes filename in the format of "Title (YYYY)")
#! /usr/bin/env bash
IFS=$'\n'
media_directory=$1
if [[ -z "$media_directory" ]]; then
echo "Usage: $0 <media-directory>"
exit 1
fi
@spikegrobstein
spikegrobstein / curlcc.sh
Last active June 7, 2016 21:34
Yeah, run it like this: ./curlcc.sh "https://spike.cx/d/me.c" is doing something very risky
#! /bin/bash
# vi:ft=sh
url=$1; shift
headers_file=/tmp/curlcc-tmp.headers
ofile=/tmp/curlcc-tmp.ofile.c
execfile=/tmp/curlcc-tmp.exec
curl -s -o "$ofile" -D "$headers_file" "$url"
@spikegrobstein
spikegrobstein / computernames.md
Last active April 17, 2024 05:21
A [nearly] exhaustive list of every physical computer I've had that had a persistent name. The theme started out as Aphex Twin track names but later expanded to any song title (or derivation of).
Name Type Source Year
CornishAcid Powermac 7600/132 1997
WetTipHenAx PCfx! 133mhz - win98 (in 7600) 1998
Ventolin Blue/White G3 Tower @ 450mhz 1999
Riddles Powerbook 140 1999
Fingerbib Grey/White G4 Tower @ 450mhz 2002
Waxenpith Powerbook G4 @ 1ghz 2002
Mookid Frankenmac G4 @ 800mhz 2003
Cowcud Pentium3 Server @ 800mhz 2004
$ ping -c 25 google.com
PING google.com (74.125.239.99) 56(84) bytes of data.
64 bytes from nuq05s01-in-f3.1e100.net (74.125.239.99): icmp_seq=1 ttl=55 time=2256 ms
64 bytes from nuq05s01-in-f3.1e100.net (74.125.239.99): icmp_seq=2 ttl=55 time=1249 ms
64 bytes from nuq05s01-in-f3.1e100.net (74.125.239.99): icmp_seq=3 ttl=55 time=251 ms
64 bytes from nuq05s01-in-f3.1e100.net (74.125.239.99): icmp_seq=4 ttl=55 time=20548 ms
64 bytes from nuq05s01-in-f3.1e100.net (74.125.239.99): icmp_seq=5 ttl=55 time=19548 ms
64 bytes from nuq05s01-in-f3.1e100.net (74.125.239.99): icmp_seq=6 ttl=55 time=18540 ms
64 bytes from nuq05s01-in-f3.1e100.net (74.125.239.99): icmp_seq=7 ttl=55 time=17571 ms
64 bytes from nuq05s01-in-f3.1e100.net (74.125.239.99): icmp_seq=8 ttl=55 time=16565 ms
@spikegrobstein
spikegrobstein / es_report2.txt
Created January 3, 2015 18:26
EmulationStation gprof data with 60 seconds idle, then navigating the emulators, listing ROMs, then quitting.
This file has been truncated, but you can view the full file.
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls ms/call ms/call name
44.83 0.13 0.13 372 0.35 0.38 nsvgRasterize
13.79 0.17 0.04 10753 0.00 0.00 Font::renderTextCache(TextCache*)
6.90 0.19 0.02 373 0.05 0.05 ImageIO::flipPixelsVert(unsigned char*, unsigned int const&, unsigned int const&)
3.45 0.20 0.01 17825 0.00 0.00 nsvg__getNextPathItem(char const*, char*)
3.45 0.21 0.01 11062 0.00 0.00 nsvg__flattenCubicBez(NSVGrasterizer*, float, float, float, float, float, float, float, float, float, int)
@spikegrobstein
spikegrobstein / es_report.txt
Created January 3, 2015 18:20
EmulationStation gprof data (sitting for a couple minutes)
This file has been truncated, but you can view the full file.
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls ms/call ms/call name
37.50 0.06 0.06 165 0.36 0.36 nsvgRasterize
18.75 0.09 0.03 8511 0.00 0.00 Font::renderTextCache(TextCache*)
18.75 0.12 0.03 166 0.18 0.18 ImageIO::flipPixelsVert(unsigned char*, unsigned int const&, unsigned int const&)
6.25 0.13 0.01 675 0.01 0.01 MetaDataList::appendToXML(pugi::xml_node, bool, boost::filesystem::path const&) const
6.25 0.14 0.01 246 0.04 0.04 nsvg__startElement(void*, char const*, char const**)
@spikegrobstein
spikegrobstein / emulationstation.gprof
Created January 1, 2015 23:37
dump of emulationstation's gprof data
This file has been truncated, but you can view the full file.
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls ms/call ms/call name
75.00 0.09 0.09 205 0.44 0.44 nsvgRasterize
8.33 0.10 0.01 6667 0.00 0.00 resolvePath(boost::filesystem::path const&, boost::filesystem::path const&, bool)
8.33 0.11 0.01 206 0.05 0.05 ImageIO::flipPixelsVert(unsigned char*, unsigned int const&, unsigned int const&)
8.33 0.12 0.01 10 1.00 1.00 ImageIO::loadFromMemoryRGBA32(unsigned char const*, unsigned int, unsigned int&, unsigned int&)
0.00 0.12 0.00 52364 0.00 0.00 __gnu_cxx::__exchange_and_add_dispatch(int*, int) [clone .constprop.34]
@spikegrobstein
spikegrobstein / fullsetup.sh
Last active December 19, 2020 22:01
set up all my shit real quick on a fresh box
if [[ ! -e ~/.ssh/id_rsa.pub ]]; then
ssh-keygen -t rsa -b 4096
fi
cat ~/.ssh/id_rsa.pub
sudo apt-get install -y vim-nox tmux silversearcher-ag
git clone git://github.com/spikegrobstein/vim-config.git ~/.vim
cd ~/.vim
@spikegrobstein
spikegrobstein / bluetooth_try.sh
Last active August 29, 2015 14:10
tool to automatically connect to a bluetooth device (using on emulationstation w/ retropie)
#! /bin/bash -
# The MIT License (MIT)
#
# Copyright (c) 2014 Spike Grobstein
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell