Skip to content

Instantly share code, notes, and snippets.

View dossy's full-sized avatar
🍪
derping around

Dossy Shiobara dossy

🍪
derping around
View GitHub Profile
#!/usr/bin/perl -w
# http://www.mail-archive.com/spamdyke-users@spamdyke.org/msg01885.html
my $build = "2008110408";
use diagnostics;
use strict;
use Getopt::Long;
my $tldtop = 0;
my $detailed = 1;
my $syslog = 1;
GetOptions (
#!/bin/sh
# set -x
cmd=`php -r "require('$1');
echo escapeshellcmd(sprintf('mysql %s %s %s %s',
'-h' . DB_HOST, '-u' . DB_USER, '-p' . DB_PASSWORD, DB_NAME));"`
# echo $cmd
exec $cmd
@dossy
dossy / gist:993790
Created May 26, 2011 19:01
Phergie idling off Freenode
14:47:01 irc.freenode.net <- 366 monkeybutter #dossy :End of /NAMES list.
14:47:01 irc.freenode.net <- NOTICE monkeybutter :[#dossy] Tip: Don't ask to ask a question, just ask it. Then, wait around long enough to get an answer.
14:47:01 irc.freenode.net <- 328 monkeybutter #dossy :http://dossy.org/
14:49:07 irc.freenode.net <- PING :anthony.freenode.net
14:49:07 Ping plugin: irc.freenode.net -> PING monkeybutter 1306435747
14:49:07 Pong plugin: irc.freenode.net -> PONG anthony.freenode.net
14:49:07 irc.freenode.net <- NOTICE monkeybutter :PING 1306435747
14:49:07 Pong plugin: irc.freenode.net -> PONG 1306435747
14:51:13 irc.freenode.net <- PING :anthony.freenode.net
14:51:13 Pong plugin: irc.freenode.net -> PONG anthony.freenode.net
@dossy
dossy / ipmitool-1.8.11-99.dell.patch
Created May 30, 2012 20:26
Dell patches to ipmitool-1.8.11 from Redhat SRPM
This file has been truncated, but you can view the full file.
The following patch is a combination of the Dell contributions to ipmitool, taken from the following Dell tarball for the corresponding RPM:
http://opensource.dell.com/releases/BMU/ipmitool-1.8.11-99.dell.tar.bz2
This patch was generated by diff'ing the upstream ipmitool-1.8.11 source against the ipmitool-1.8.11-99.dell source, with the following command:
% diff -urN -x .git -x autom4te.cache -x Makefile -x config.h -x config.log -x config.status -x '*.keep' -x .deps -x '*.spec' ipmitool-1.8.11 ipmitool-1.8.11-99.dell > ipmitool-1.8.11-99.dell.patch
Release Notes.txt | 9
ipmitool-1.8.11-99.dell/CHANGES.txt | 8
@dossy
dossy / jquery-ui-require.js
Created April 7, 2014 15:12
Loading just jquery.ui.resizable with requireJS
<script type="text/javascript">
// http://matznermatzner.de/en/bernd/2013/11/loading-non-amd-modules-requirejs-part-1-jquery-ui/
requirejs.config({
paths: {
'jquery.ui.core': 'lib/jquery-ui/1.10.4/ui/minified/jquery.ui.core.min',
'jquery.ui.mouse': 'lib/jquery-ui/1.10.4/ui/minified/jquery.ui.mouse.min',
'jquery.ui.resizable': 'lib/jquery-ui/1.10.4/ui/minified/jquery.ui.resizable.min',
'jquery.ui.widget': 'lib/jquery-ui/1.10.4/ui/minified/jquery.ui.widget.min',
},
shim: {
@dossy
dossy / redbooth.com-stylish.css
Created October 14, 2014 19:34
print stylesheet for redbooth.com
/*
* use with Stylish Chrome extension, https://chrome.google.com/webstore/detail/stylish/fjnbnpbmkenffdnngjfgmeleoegfcffe?hl=en
* for URLs on the domain redbooth.com
*/
@media print {
.tb-kanban-zone {
display: none;
}
@dossy
dossy / screencapture.sh
Created November 25, 2014 15:22
Capture screen and convert to 16 color grayscale on OSX
# Because I know I'll forget this when I need it again, I'm documenting it here.
screencapture -x -C -T0 cap.png; (pngtopnm cap.png | ppmtopgm | pnmquant 16 | pnmtopng > cap-bw.png) >/dev/null 2>&1
@dossy
dossy / dd-iso.sh
Created November 25, 2014 20:10
Creating and burning ISOs on OSX command line
$ diskutil list
$ sudo umount /dev/disk3
$ dd if=/dev/disk3 of=image.iso bs=2048 conv=sync,notrunc
$ hdiutil burn image.iso
@dossy
dossy / patch_inotify_init1.c
Created November 27, 2015 18:43
Running CrashPlan on older Linux
/*
* $ gcc -Wall -shared -fPIC -o patch_inotify_init1.so patch_inotify_init1.c
*
* LD_PRELOAD=patch_inotify_init1.so java ...
*
* [11.27.15 12:43:37.040 ERROR main .service.backup.BackupController] Exception setting up BackupController! , java.lang.UnsatisfiedLinkError: Error looking up function 'inotify_init1': /usr/local/crashplan/jre/bin/java: undefined symbol: inotify_init1
* STACKTRACE:: java.lang.UnsatisfiedLinkError: Error looking up function 'inotify_init1': /usr/local/crashplan/jre/bin/java: undefined symbol: inotify_init1
* at com.sun.jna.Function.<init>(Function.java:208)
* at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:536)
* at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:513)
@dossy
dossy / # node - 2015-12-14_14-09-08.txt
Created December 14, 2015 19:13
node on OS X 10.7.5 - Homebrew build logs
Homebrew build logs for node on OS X 10.7.5
Build date: 2015-12-14 14:09:08