Skip to content

Instantly share code, notes, and snippets.

;;; ssh.el --- remote login interface
;; Copyright (C) 1996, 97, 98, 2001 Noah S. Friedman
;; Author: Noah Friedman <friedman@splode.com>
;; Maintainer: friedman@splode.com
;; Keywords: unix, comm
;; Created: 1996-07-03
;; $Id: ssh.el,v 1.1 2005/10/18 08:31:33 davidswelt Exp $
; I use customize for this:
'(ssh-directory-tracking-mode t)
(eval-after-load 'ssh
'(progn
(add-hook 'ssh-mode-hook
(lambda ()
(shell-dirtrack-mode t)
(setq dirtrackp nil)
(setq show-trailing-whitespace nil)))
(defvar ssh-connection-alist
'((shortname . "hostname.fqdn.com")
)
"Alist of SSH connections.
Format is ((NAME . HOSTSPEC) …)")
(defun ssh-convenience ()
"Make SSH convenience functions."
(interactive)
diff -u DefaultBuildChooser.java RetryBuildChooser.java
--- DefaultBuildChooser.java 2010-07-02 13:34:57.000000000 -0700
+++ RetryBuildChooser.java 2010-07-02 14:46:22.000000000 -0700
@@ -5,10 +5,9 @@
import hudson.plugins.git.Branch;
import hudson.plugins.git.BranchSpec;
import hudson.plugins.git.GitException;
-import hudson.plugins.git.IGitAPI;
import hudson.plugins.git.Revision;
+import hudson.plugins.git.util.DefaultBuildChooser;
package hudson.plugins.git;
import hudson.*;
import hudson.FilePath.FileCallable;
import hudson.matrix.MatrixBuild;
import hudson.matrix.MatrixRun;
import hudson.model.*;
import hudson.plugins.git.browser.GitWeb;
@ieure
ieure / gist:603512
Created September 29, 2010 20:36 — forked from anonymous/gist:603500
def maybe_raise(an_exception):
if some_condition:
raise an_exception
try:
raise Exception("test 123")
except Exception, ex:
maybe_raise(ex)
@ieure
ieure / C10shell
Created November 9, 2010 19:47
Drop this in /var/cache/pbuilder/hook.d and chmod it to 0755
#!/bin/bash
# example file to be used with --hookdir
#
# invoke shell if build fails.
apt-get install -y --force-yes vim less
cd /tmp/buildd/*/debian/..
/bin/bash < /dev/tty > /dev/tty 2> /dev/tty
(defun newline-above-current-line ()
"Create a new line above the current line"
(interactive)
(beginning-of-line)
(newline-and-indent)
(previous-line)
(indent-according-to-mode))
structure = (
(('one', 'two'), 'three'),
(('four', 'five'), 'six'),
)
((one, three) for ((one, two), three) in structure)
# -> (('one', 'three'), ('four', 'six'))
(defun locate-tags-file (&optional dir)
"Locate a TAGS or TAGS.gz file in DIR or a parent directory."
(let ((dir (or dir default-directory))
(tag-files '("TAGS" "TAGS.gz"))
(tag-dir)
(tag-file))
(while (and (not tag-file) tag-files)
(let ((potential-file (car tag-files)))
(setq tag-files (cdr tag-files))