Skip to content

Instantly share code, notes, and snippets.

Avatar

Dan Church h3xx

View GitHub Profile
@h3xx
h3xx / vidalia-0.2.15_fix_control_panel_height.patch
Created Feb 14, 2012
Fix control panel height in Vidalia 0.2.15
View vidalia-0.2.15_fix_control_panel_height.patch
diff -ru vidalia-0.2.15.orig/src/vidalia/MainWindow.ui vidalia-0.2.15/src/vidalia/MainWindow.ui
--- vidalia-0.2.15.orig/src/vidalia/MainWindow.ui 2011-10-07 14:16:56.000000000 -0500
+++ vidalia-0.2.15/src/vidalia/MainWindow.ui 2012-02-14 13:29:55.000000000 -0600
@@ -12,7 +12,7 @@
<property name="maximumSize" >
<size>
<width>16777215</width>
- <height>1</height>
+ <height>0</height>
</size>
@h3xx
h3xx / elinks-git_ruby-1.9.1_compat.patch
Created Mar 4, 2012
Patch to fix elinks to work with Ruby 1.9.1+
View elinks-git_ruby-1.9.1_compat.patch
@h3xx
h3xx / wiki-100k.txt
Created Mar 5, 2012
Wictionary top 100,000 most frequently-used English words [for john the ripper]
View wiki-100k.txt
#!comment: This is a list of the top 100,000 most frequently-used English words
#!comment: according to Wiktionary.
#!comment:
#!comment: It was compiled in August 2005 and coalesced into a handy list for
#!comment: use in John the Ripper.
#!comment:
#!comment:
#!comment: Pull date: Sun Jan 15 22:03:54 2012 GMT
#!comment:
#!comment: Sources:
@h3xx
h3xx / rapidsvn-0.12.0-1_wxWidgets_api_compat.patch
Created Mar 9, 2012
Fix rapidsvn-0.12.0-1 wxWidgets 2.8 compatibility
View rapidsvn-0.12.0-1_wxWidgets_api_compat.patch
This patch fixes the following error in rapidsvn-0.12.0-1 when compiling against wxWidgets without 2.6 compatibility enabled:
preferences_dlg.cpp: In member function 'bool PreferencesDlg::SelectExecutable(const wxString&, wxTextCtrl*)':
preferences_dlg.cpp:129:41: error: 'wxOPEN' was not declared in this scope
listener.cpp: In member function 'void Listener::Data::callbackSslClientCertPrompt()':
listener.cpp:170:44: error: 'wxOPEN' was not declared in this scope
listener.cpp:170:53: error: 'wxFILE_MUST_EXIST' was not declared in this scope
diff -ru rapidsvn-0.12.0-1.orig/src/listener.cpp rapidsvn-0.12.0-1/src/listener.cpp
--- rapidsvn-0.12.0-1.orig/src/listener.cpp 2009-10-20 01:49:10.000000000 -0500
View this server is protected by Chuck Norris.txt
▗▄▄▄▄▄▄▄▟▄▄▄▄▄▄
▐██████████████████▙▄▄
███████████████████████▄
▐████████████████████████▌
██████████████████████████
▐██████████████████████████▌
███████████████████████████▌
▗███████████████████████████▀
▟███████████████████████████████████▄▄▖
▐████████████████████████████████████████▄
@h3xx
h3xx / glitch-jpeg.pl
Created Dec 26, 2013
Add deliberate errors to JPEG files (or any files)
View glitch-jpeg.pl
#!/usr/bin/perl -w
use strict;
use Getopt::Std qw/ getopts /;
sub HELP_MESSAGE {
my $fh = shift || *STDOUT;
print $fh qq%
Usage: $0 IMG_IN IMG_OUT
Cause deliberate errors in an image file (or any file).
@h3xx
h3xx / takescreenshot.sh
Created Mar 10, 2014
Take a screenshot in Linux
View takescreenshot.sh
#!/bin/sh
# uses imagemagick's import(1) utility to take a screenshot of the current
# window
HELP_MESSAGE() {
local EXIT_CODE="${1:-0}"
cat <<EOF
Usage: $(basename -- "$0") [OPTIONS] [FILE]...
View permute.pl
#!/usr/bin/perl -w
use strict;
=head2 permute($arrayref)
Gives all permutations of a given set of elements. Stolen straight out of B. Heap's HeapPermute algorithm.
$ fxpr 'permute [0..1]'
[ 0 1 ]
[ 1 0 ]
View hover_zoom-5.7_0_defang_google_analytics.patch
--- hover_zoom-5.7_0/js/background.js.orig 2015-03-16 00:57:39.641351085 -0500
+++ hover_zoom-5.7_0/js/background.js 2015-03-26 09:17:53.562204063 -0500
@@ -79,11 +79,12 @@
});
});
break;
- case 'trackEvent':
- if (options.enableStats && _gaq) {
- _gaq.push(['_trackEvent', message.event.category, message.event.action, message.event.label]);
- }
@h3xx
h3xx / AuthUtility.php
Last active Aug 29, 2015
Bad Code for generating a "random" password
View AuthUtility.php
/**
* Generate a random alphanumeric password
* precondition: len must be <= 32
* param len: length of the random password
* param enforce_rules: enforce password security rules
* returns: the random password
**/
public static function generateRandomPassword($len=8, $enforce_rules = false)
{
$count = 0;
You can’t perform that action at this time.