]> jfr.im git - z_archive/shellstuff.git/commitdiff
Stuff.
authorJohn Runyon <redacted>
Thu, 29 Aug 2013 21:48:33 +0000 (16:48 -0500)
committerJohn Runyon <redacted>
Thu, 29 Aug 2013 21:48:33 +0000 (16:48 -0500)
README.md
authorized_keys [new file with mode: 0644]
bashrc [new file with mode: 0644]
gitconfig [new file with mode: 0644]
gitignore_global [new file with mode: 0644]
paste2 [new file with mode: 0755]
screenrc [new file with mode: 0644]

index 524042e5b48f676a44668be639ea161c2351ab59..48faea2222ac45b2eaf1f59521b44943bbc6e5a3 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,4 +1,8 @@
-shellstuff
+FILE INDEX
 ==========
-
-My shell stuff (config etc)
+* authorized_keys = ~/.ssh/authorized_keys
+* bashrc = ~/.bashrc
+* gitconfig = ~/.gitconfig
+* gitignore_global = ~/.gitignore_global
+* paste2 = /usr/local/bin/paste2 *or* ~/bin/paste2
+* screenrc = ~/.screenrc
diff --git a/authorized_keys b/authorized_keys
new file mode 100644 (file)
index 0000000..c49b8c4
--- /dev/null
@@ -0,0 +1,2 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIBtqiB8Q1k0/0fDVonvZNk3kT9lMqRT0vVWoq7yWfZ1gw8A5z6NQNeDpjBlpcgSCxvt4hAc3whvZAE4aHvKiDQfqfbVKJOLYOi/0Ud/TVxIUoOnKc8554DFIQk7k4Phkb7FaAqd+1S15I8CrdG0AL/WuDw9iHpnb4A8gsUgZZ/8yw== windows@gx270
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC8wWciC2/YJvC1ZRo9miEABmqsNazDc4oz6G4KOv8EIfGVkqFuDTjBGVjwZpjT67Sy943jzSzEKaTpJDMZ62BP2iIXwL9oj0MPH+/RXvKPAGKilPTGvcfS+4ZwElGqlw6mbNWb3LhMKfhlXOPR3vs3UCkxQnDoYJxL5CG9JsJDFw== Kyocera
diff --git a/bashrc b/bashrc
new file mode 100644 (file)
index 0000000..645b2bb
--- /dev/null
+++ b/bashrc
@@ -0,0 +1,20 @@
+[ -z "$PS1" ] && return
+shopt -s checkwinsize
+
+#PS1='\[\033]0;\u@\h\007\]\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
+PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
+
+umask 0027
+
+eval "$(dircolors -b)"
+alias ls='ls --color=auto'
+alias grep='grep --color=auto'
+
+alias screen='screen -U'
+
+export PATH="$HOME/bin:$PATH"
+
+# For system-specific config (i.e. readmail alias on mailserver)
+if [ -f $HOME/.bashrc_local ]; then
+       source $HOME/.bashrc_local
+fi
diff --git a/gitconfig b/gitconfig
new file mode 100644 (file)
index 0000000..25ce2ed
--- /dev/null
+++ b/gitconfig
@@ -0,0 +1,7 @@
+[core]
+       excludesfile = /home/jrunyon/.gitignore_global
+[user]
+       name = John Runyon
+       email = jayru@users.noreply.github.com
+[color]
+       ui = true
diff --git a/gitignore_global b/gitignore_global
new file mode 100644 (file)
index 0000000..c798b31
--- /dev/null
@@ -0,0 +1,3 @@
+# Backup files
+*~
+*.bak
diff --git a/paste2 b/paste2
new file mode 100755 (executable)
index 0000000..b195bc0
--- /dev/null
+++ b/paste2
@@ -0,0 +1,51 @@
+#!/usr/bin/perl
+
+# Usage:
+# (sh) paste2 perl Paste2 CLI script <paste2.pl
+# (vim) :w !paste2 perl Paste2 CLI script
+
+use URI::Escape;
+use IO::Socket::INET;
+
+my $lang, $desc;
+
+$lang = (shift or 'text');
+if (@ARGV) {
+       $desc = join ' ', @ARGV;
+} else {
+       $desc = '';
+}
+
+my $code = do {
+       local $/ = undef;
+       <STDIN>;
+};
+
+my @fields = (
+       'lang='.uri_escape($lang),
+       'description='.uri_escape($desc),
+       'code='.uri_escape($code),
+       'parent=0',
+);
+my $cont = join('&', @fields)."\r\n";
+my $len = length($cont);
+
+my $s = IO::Socket::INET->new('paste2.org:80');
+my $out = "";
+$out .= "POST /new-paste HTTP/1.1\r\n";
+$out .= "Host: paste2.org\r\n";
+$out .= "User-Agent: Paster/1.0\r\n";
+$out .= "Content-Type: application/x-www-form-urlencoded\r\n";
+$out .= "Content-Length: $len\r\n";
+$out .= "Connection: Close\r\n";
+$out .= "\r\n";
+$out .= $cont;
+$out .= "\r\n";
+
+print $s $out;
+while (<$s>) {
+       if (s/^Location: //) {
+               print "http://paste2.org".$_;
+               last;
+       }
+}
diff --git a/screenrc b/screenrc
new file mode 100644 (file)
index 0000000..7422ef9
--- /dev/null
+++ b/screenrc
@@ -0,0 +1,3 @@
+bell_msg 'Bell in window %n '
+screen bash
+#screen -t irssi1 irssi