Skip to content

Instantly share code, notes, and snippets.

Avatar

Igal Koshevoy igal

  • Pragmaticraft
  • Portland, Oregon, USA
View GitHub Profile
@igal
igal / vimiumrc.txt
Created Mar 11, 2010
My Vimium key mappings
View vimiumrc.txt
"Vimium" adds vi-like key mappings to Google Chrome browser: http://bit.ly/9K14IQ
You can change your mappings in Extensions > Vimium > Advanced Options > Key mappings.
Here are key mappings that I find useful:
map b scrollFullPageUp
map m previousTab
map , nextTab
@igal
igal / menu_items_and_activation_patterns.js
Created Feb 14, 2010
JavaScript URL-based menu activation code
View menu_items_and_activation_patterns.js
// USAGE: This code parses the browser's URL and displays either the matching menu section or an error if one couldn't be found.
// Associative array of menu items to activate and the regular expression
// fragments that activate them:
var menu_items_and_activation_patterns = {
"about": "about",
"attend": "(attend|register)",
"blog": "(blog|archive)",
"schedule": "events/.+?/schedule",
"sessions": "events/.+?/sessions",
@igal
igal / Thunderbird 3 -- userChrome.css
Created Feb 7, 2010
Thunderbird 3 user interface tweaks for use on small screens
View Thunderbird 3 -- userChrome.css
/* Thunderbird 3 user interface tweaks
* ===================================
*
* These changes improve Thunderbird's behavior on smaller screens. You should
* add these to your Thunderbird profile's "chrome/userChrome.css" file. You
* will probably need to create a directory and file.
*/
/* Show a dot for unstarred messages in the message listing so that it's easy
* to tell which messages have are starred.
@igal
igal / stop_spam_broadcasts_on_google_groups.txt
Created Aug 25, 2009
Stop spammers from broadcasting to your Google Groups
View stop_spam_broadcasts_on_google_groups.txt
Stop spammers from broadcasting to your Google Groups
=====================================================
Is your Google Groups mailing list broadcasting messages from spammers?
If so, it makes your group look bad, annoys subscribers, pollutes the
archives, and hurts your community.
Thankfully, you can easily stop these spam broadcasts. By changing your
group settings, administrators will be able to see the first posts made
by new members and decide whether to allow them before they're broadcast
View gist:135351
Is the ExtUtils::Installed in Perl 5.10 broken?
I need to be able to query an installed CPAN package and find out what files it
contains. I had code that worked fine with Perl 5.8, but it doesn't work with
5.10. Any ideas? Is there another way that I should be doing this?
# From shell, install a silly package:
cpan Acme::please
# From Perl, get the lists of file in this package:
@igal
igal / pdxruby_location_survey.csv
Created Jun 23, 2009
pdxruby location survey data
View pdxruby_location_survey.csv
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 8.
Timestamp,I will regularly attend meetings within 2 miles (3.2 kilometers) of these locations:,I have attended this many Portland Ruby Brigade meetings or events during the last 12 months:
6/10/2009 18:16:21,"Downtown Portland and nearby (e.g., PSU, AboutUs, NedSpace, Souk, etc), SE Portland near Mt. Tabor, Beaverton near MAX station",8/12/2009
6/10/2009 18:26:27,"Downtown Portland and nearby (e.g., PSU, AboutUs, NedSpace, Souk, etc), SE Portland near Mt. Tabor, Belgium",8/12/2009
6/10/2009 18:26:52,"Downtown Portland and nearby (e.g., PSU, AboutUs, NedSpace, Souk, etc)",4/7/2009
6/10/2009 18:31:18,"Downtown Portland and nearby (e.g., PSU, AboutUs, NedSpace, Souk, etc), SE Portland near Mt. Tabor",1/3/2009
6/10/2009 18:31:31,"Downtown Portland and nearby (e.g., PSU, AboutUs, NedSpace, Souk, etc)",4/7/2009
6/10/2009 18:37:32,"Downtown Portland and nearby (e.g., PSU, AboutUs, NedSpace, Souk, etc), SE Portland near Mt. Tabor",4/7/2009
6/10/2009 18:38:42,"Downtown Portland and nearby (e.g., PSU, AboutUs, NedSpace
@igal
igal / gist:131922
Created Jun 18, 2009
MediaWiki uploads configuration
View gist:131922
# Allow uploads
## http://www.mediawiki.org/wiki/Manual:Configuring_file_uploads
$wgFileExtensions = array_merge($wgFileExtensions, array('doc', 'xls', 'mpp', 'ppt', 'pdf', 'zip'));
$wgEnableUploads = true; # Enable uploads
## http://www.mediawiki.org/wiki/Manual:Mime_type_detection
$wgMimeDetectorCommand = "file -bi";
## Prevent users from replacing files: http://www.mediawiki.org/wiki/Manual:Configuring_file_uploads
$wgGroupPermissions['user']['reupload'] = false;
$wgGroupPermissions['autoconfirmed']['reupload'] = false;
## Allow users to reupload own files: http://www.mediawiki.org/wiki/Manual:User_rights
@igal
igal / gist:126387
Created Jun 9, 2009
List to text transformation with Clojure and Ruby
View gist:126387
; Goal: Turn Array `["foo", "bar", "baz"]` into String `"ordered: 1=foo 2=bar 3=baz"`.
; Clojure
;; Read arguments from command line
;; (def argv *command-line-args*)
;; Fake command-line arguments for use in REPL
(def argv (seque ["foo" "bar" "baz"]))
@igal
igal / install_fsharp_on_ubuntu.sh
Created Jun 6, 2009
Install F# on Ubuntu 9.04 -- sorta
View install_fsharp_on_ubuntu.sh
# You can run F# on Linux, FreeBSD, OS X, Solaris and even Windows using Mono.
# Here's how I got F# running on Ubuntu 9.04:
# Install dependencies:
sudo apt-get install mono-gac libmono-system-runtime2.0-cil libmono-winforms2.0-cil
# Download from http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/release.aspx
wget -c http://download.microsoft.com/download/F/7/4/F74A3170-261C-4E8F-B1A8-2E352C61A89B/fsharp.zip
# Extract files:
@igal
igal / gist:117822
Created May 26, 2009
WARNING SIGNS OF A DANGEROUS CULT ... as applied to Audrey's open source community side projects
View gist:117822
Earlier this weekend, I realized that I may have become part of a dangerous
cult after having the following conversation at the foodcarts:
> Me: "We don't know those people. Should we indoctrinate them?"
> Audrey: "Yes! I have more fliers."
> http://www.vistech.net/users/rsturge/cults.html
> THE WARNING SIGNS OF A DANGEROUS CULT
...as applied to Audrey's open source community side projects
> 1. The spiritual group claims to have received special instructions from one