This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; http://github.com/briancarper/dotfiles/raw/master/.emacs | |
;; {} are not handled correctly by paredit in the repl, | |
;; but these lines fixes it | |
(defvar slime-override-map (make-keymap)) | |
(define-minor-mode slime-override-mode | |
"Fix SLIME REPL keybindings" | |
nil " SLIME-override" slime-override-map) | |
(define-key slime-override-map (kbd "<C-return>") 'paredit-newline) | |
(define-key slime-override-map (kbd "{") 'paredit-open-curly) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function test() { | |
global $data; | |
var_dump($data); | |
} | |
test(); | |
$data = array(1,2,3); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<header> | |
<script type="text/javascript"> | |
function btnClick(aBtn) { | |
with (aBtn.form) { | |
event.value = aBtn.name; | |
submit(); | |
} | |
} | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export DROPBOX=~/Dropbox/repos | |
export newRepo=project-name | |
export NAME=$(git config --global --get user.name) | |
cd ~/projects/$newRepo | |
git init | |
git add . | |
git commit -m 'initial' | |
HERE=$(pwd) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We have the situation, where a cvs server is not available from a development host, but the development host | |
is available from the cvs server: | |
.-----. | |
| PC | | |
.-----. | |
/ \ | |
v v | |
.-----. .-----. | |
| cvs |------>| dev | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns monitor | |
(:gen-class) | |
(:import (java.io RandomAccessFile))) | |
(def sleep-interval 2000) | |
(defn extract-ip-address [message] | |
(if (not (nil? message)) | |
(let [pattern "(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}) ([0-9a-f]+\\.[0-9a-f]+\\.[0-9a-f]+) via (\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})" | |
message-seq (first (re-seq (re-pattern pattern) message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
@users = ( 'klang' ); | |
my $procs = qx/ps -ef/; | |
#my $login = qx/last/; | |
foreach my $user (@users) { | |
while ($procs =~ m/^ *(\w*).+ .:.. (.+)$/gm) { | |
my $usr = $1; | |
my $proc = $2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[klang@ergates bin]$ split_destination-test.sh | |
destination user@host.with.full.domain:/full/path/to/install/package.ext | |
server host.with.full.domain | |
servershort host | |
user user | |
fullpath /full/path/to/install/package.ext | |
path /full/path/to/install/ | |
package package.ext |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defcustom nrepl-use-local-resources t | |
"use local resources under HOME if possible." | |
:type 'string | |
:group 'nrepl) | |
(defun nrepl-tramp-prefix () | |
"use buffer-file-name on jump-origin to determine if the buffer is opened on a remote server. | |
M-. will have put the jump-origin on the tag-marker-ring, so we get the info there." | |
(save-match-data | |
(let ((jump-origin (buffer-file-name (marker-buffer (ring-ref find-tag-marker-ring 0))))) |