Skip to content

Instantly share code, notes, and snippets.

Avatar

Noah Sussman textarcana

View GitHub Profile
View Freenode Account Setup
== Example
/nick homer
/msg nickserv register changeme beerdude@example.com
/nick homer_
/msg nickserv group
/nick awesome_homer
/msg nickserv group
@textarcana
textarcana / .emacs
Created Feb 14, 2009
.emacs file for Aquamacs Emacs and GNU Emacs on OS X.
View .emacs
;;Noah Sussman's .emacs file for Aquamacs Emacs and GNU Emacs on OS X.
;;Branched February 16 2008 from my config for GNU Emacs for Windows, created Oct 18 2001.
;;Time-stamp: </Users/noah/Documents/n_s/config/emacs/aquamacs/.emacs last changed by Noah Sussman on noah.local/Textarcana Saturday 14 February 2009 at EST 16:51:25>
(load-file "~/.emacs-cfg/secrets.el")
;;;; Spaces are always used for indendation
;;;;;; Haml and Sass modes require this setting
(setq indent-tabs-mode nil)
@textarcana
textarcana / .emacs
Created Feb 15, 2009
.emacs for Windows port of GNU Emacs
View .emacs
;; Noah Sussman's .emacs file
;; Created Oct 18, 2001
;; Time-stamp: <c:/noah/n_s/config/emacs/.emacs last changed by Noah Sussman on PENTAGRAM/Textarcana Friday 27 February 2009 at Eastern Standard Time 12:37:21>
;; Introduction
;; emacs command reference:
;; SHELL MODE
;; Normally you can type M-x shell to open a new shell buffer, but if you already have one open that will just switch to the existing one. The solution is to use M-x rename-buffer to change the name of the first shell buffer before creating another one.
;; Use M-r regexp and M-s regexp to search in reverse and forward, respectively, through the command history. To search using the same regex as last time, leave the regex entery field blank and hit return.
;;
;; EDITING
View ERC Robot configuration (IRC chat bot for Emacs).el
;;;; ERC Robot
; See http://www.emacswiki.org/emacs/ErcRobot
;
; On first installing Aquamacs, do the following 4 steps to install erc-robot,
; then just paste this entire gist at the bottom of your .emacs
; cd ~/Library/Application\ Support/Aquamacs\ Emacs/
; mkdir site-lisp
; cd site-lisp
; wget http://www.emacswiki.org/emacs/erc-robot.el
@textarcana
textarcana / Log into #zepinvest from Mibbit
Created Feb 19, 2009
Unbanning yourself on Freenode
View Log into #zepinvest from Mibbit
1. Go to Mibbit.com/chat
2. Fill in the nickname field with your nickname.
3. Leave #mibbit as the channel, DO NOT JOIN #zepinvest _yet._
4. Click the Go button and connect to Freenode. You should now be in the #mibbit channel.
5. Send the following message:
/msg nickserv identify PASSWORD
6. You should now see the message "You are now identified for <your nick>." If not, revisit step 5.
7. Send the following message:
/join #zepinvest
@textarcana
textarcana / equal_height_columns.js
Created Feb 20, 2009
One way to ensure one column is the same height as another. Extra complex because I am using 'sliding doors' drop shadow on the columns. Appears to work in FF, IE, Opera, Chrome and Webkit but ymmv.
View equal_height_columns.js
/**
* Equal height column hack for Favorites box
*/
var fudgeAmt = (document.all === null ? 47 : 27);
var heightToMatch = $('equalHeightColumnsHack').clientHeight - fudgeAmt;
var shadowHeight = heightToMatch + 24;
var elems = {};
elems.container = $$('#featured .content')[0];
elems.shadow = $$('#featured .content .dropShadowHack')[0];
/* Prettified the getComputedStyle wrapper a bit over what's in the repo, see http://www.quirksmode.org/dom/getstyles.html */
@textarcana
textarcana / ECB_Installation_and_Configuration_for_Macports_1.7.el
Created Feb 23, 2009
Install and configure ECB (the Emacs Code Browser) and its dependencies, on Macports 1.7
View ECB_Installation_and_Configuration_for_Macports_1.7.el
;; Emacs Code Browser
;; On Macports 1.7 it appears ECB can't install because it looks for speedbar as a dependency, but that port isnt available as its been rolled into cedet-devel.
;; So with 1.7, I did the following (which appears to work):
;; sudo port install cedet-devel
;; wget http://downloads.sourceforge.net/ecb/ecb-2.32.tar.gz
;; open ecb-2.32.tar.gz
;; mv ecb-2.32 ecb
;; sudo mv ecb /usr/share/emacs/site-lisp/
(load-file "/opt/local/var/macports/software/cedet-devel/1.0pre4_0/opt/local/share/emacs/site-lisp/common/cedet.el")
@textarcana
textarcana / why I love windows.txt
Created Feb 27, 2009
Why I love Windows: what changed in my config between the 3 times I invoked this command? NOTHING <insert insane laughter>
View why I love windows.txt
c:\noah\n_s\config\emacs>svn ci -m "fixing insane semicolons in both my PC emacs config files. Comments really need to be cleaned up." .
6521 [main] svn 5448 fhandler_console::fixup_after_fork_exec: error opening input console handle for /dev/console after fork/exec, errno 13, Win3
2 error 5
11294 [main] svn 5448 fhandler_console::fixup_after_fork_exec: error opening output console handle for /dev/console after fork/exec, errno 13, Win
32 error 5
18275 [main] svn 5448 fhandler_console::fixup_after_fork_exec: error opening input console handle for /dev/console after fork/exec, errno 13, Win3
2 error 5
23035 [main] svn 5448 fhandler_console::fixup_after_fork_exec: error opening output console handle for /dev/console after fork/exec, errno 13, Win
32 error 5
29676 [main] svn 5448 fhandler_console::fixup_after_fork_exec: error opening input console handle for /dev/console after fork/exec, errno 13, Win3
View rename.pl
#!/usr/bin/perl
# -w switch is off bc HERE docs cause erroneous messages to be displayed under Cygwin
#From the Perl Cookbook, Ch. 9.9
# rename - Larry's filename fixer
$help = <<EOF;
Usage: rename expr [files]
This script's first argument is Perl code that alters the filename (stored in \$_ ) to reflect how you want the file renamed. It can do this because it uses an eval to do the hard work. It also skips rename calls when the filename is untouched. This lets you simply use wildcards like rename EXPR * instead of making long lists of filenames.
Here are five examples of calling the rename program from your shell:
@textarcana
textarcana / gist:80081
Created Mar 16, 2009
JSON format used by the New York Times Article Skimmer
View gist:80081
{
"channel": {
"items": [
{
"title":"Madoff’s Bail Revoked After Guilty Pleas to All Charges",
"link":"http://www.nytimes.com/2009/03/13/business/13madoff.html?partner=rss&emc=rss",
"description":"Bernard L. Madoff was sent to jail to await sentencing on Thursday after expressing remorse for running a vast Ponzi scheme.",