Skip to content

Commit

Permalink
Dotfile changes
Browse files Browse the repository at this point in the history
  • Loading branch information
singpolyma committed Jul 14, 2009
1 parent 4fa5c76 commit a2d0992
Show file tree
Hide file tree
Showing 12 changed files with 302 additions and 96 deletions.
2 changes: 1 addition & 1 deletion etc/home/gnupg/gpg.conf
Expand Up @@ -42,7 +42,7 @@ default-recipient-self
# In the example, this option allows you to read your local copy of
# encrypted mail that you've sent to others.

#encrypt-to some-key-id
encrypt-to CE519CDE

# By default GnuPG creates version 3 signatures for data files. This
# is not strictly OpenPGP compliant but PGP 6 and most versions of PGP
Expand Down
11 changes: 7 additions & 4 deletions etc/home/irssi/config
Expand Up @@ -35,15 +35,15 @@ servers = (
port = "5223";
use_ssl = "yes";
chatnet = "GTalk";
password = "PASWORD";
password = "[REDACTED]";
autoconnect = "yes";
},
{
address = "singpolyma.net";
port = "5222";
use_ssl = "no";
port = "5223";
use_ssl = "yes";
chatnet = "DHXMPP";
password = "PASSWORD";
password = "[REDACTED]";
autoconnect = "yes";
}
);
Expand Down Expand Up @@ -96,6 +96,7 @@ channels = (
{ name = "microformats"; chatnet = "freenode"; autojoin = "Yes"; },
{ name = "openid"; chatnet = "freenode"; autojoin = "Yes"; },
{ name = "##security"; chatnet = "freenode"; autojoin = "Yes"; },
{ name = "##crypto"; chatnet = "freenode"; autojoin = "Yes"; },
{ name = "ruby-lang"; chatnet = "freenode"; autojoin = "Yes"; },
{ name = "mashlogic"; chatnet = "bushong"; autojoin = "Yes"; }
);
Expand Down Expand Up @@ -147,6 +148,7 @@ aliases = {
EXEMPTLIST = "mode $C +e";
ATAG = "WINDOW SERVER";
aaway = "/foreach server /away -all";
fwhois = "/msg -freenode nickserv info";
};

statusbar = {
Expand Down Expand Up @@ -308,3 +310,4 @@ notifies = {
tantek = { };
};
logs = { };
ignores = ( { mask = "diepchess"; level = "ALL"; } );
43 changes: 35 additions & 8 deletions etc/home/muttrc
Expand Up @@ -7,8 +7,8 @@ set realname = "Stephen Paul Weber"
set use_from = yes
set envelope_from ="yes"
my_hdr Jabber-ID: singpolyma@gmail.com
my_hdr X-URL: http://singpolyma.net
my_hdr X-PGP-Key: http://singpolyma.net/public.asc
my_hdr OpenPGP: id=CE519CDE\; url=https://singpolyma.net/public.asc
my_hdr X-URL: https://singpolyma.net
set send_charset=us-ascii:utf-8

message-hook '~g' 'set attribution="Somebody signing messages as %n wrote:"'
Expand Down Expand Up @@ -107,23 +107,30 @@ macro pager @I s=Info\n\n

subscribe security@xmpp.org
subscribe discuss@freeculture.org
subscribe activity-streams@googlegroups.com
subscribe diso-project@googlegroups.com
subscribe wsic@csclub.uwaterloo.ca
subscribe wlsg@csclub.uwaterloo.ca
subscribe open-web-discuss@googlegroups.com
subscribe discuss@microformats.org
lists cecs@lists.uwaterloo.ca
lists activity-streams@googlegroups.com

#GPG/PGP stuff
# Crypto stuff

set crypt_autopgp=yes
set crypt_autosign=yes
set crypt_autoencrypt=no
set crypt_replyencrypt=yes
set crypt_replysign=yes
set crypt_replysignencrypted=yes
set crypt_autopgp=yes
source ~/.muttpgp

# GPG/PGP stuff

send-hook ~l 'set pgp_autoinline=yes'
send-hook !~l 'set pgp_autoinline=no'
#set pgp_autoinline=yes
set pgp_auto_decode=yes
set pgp_autoinline=yes
set pgp_replyinline=yes
set pgp_decode_command="gpg %?p?--passphrase-fd 0? --no-verbose --batch --output - %f"
set pgp_verify_command="gpg --no-verbose --batch --output - --verify %s %f"
Expand All @@ -135,6 +142,26 @@ set pgp_encrypt_sign_command="pgpewrap gpg --passphrase-fd 0 --batch --quiet --n
set pgp_import_command="gpg --no-verbose --import -v %f"
set pgp_export_command="gpg --no-verbose --export --armor %r"
set pgp_verify_key_command="gpg --no-verbose --batch --fingerprint --check-sigs %r"
set pgp_list_pubring_command="gpg --no-verbose --batch --with-colons --list-keys %r"
set pgp_list_secring_command="gpg --no-verbose --batch --with-colons --list-secret-keys %r"
set pgp_list_pubring_command="gpg --no-verbose --batch --with-colons --list-keys %r"
set pgp_list_secring_command="gpg --no-verbose --batch --with-colons --list-secret-keys %r"
set pgp_good_sign="^gpg: Good signature from"

# S/MIME stuff

#set smime_timeout=300
set smime_default_key="25c06b89.0"
set smime_certificates="~/.smime/certificates"
set smime_keys="~/.smime/keys"
set smime_pk7out_command="openssl smime -verify -in %f -noverify -pk7out"
set smime_get_cert_command="openssl pkcs7 -print_certs -in %f"
set smime_get_signer_cert_command="openssl smime -verify -in %f -noverify -signer %c -out /dev/null"
set smime_get_cert_email_command="openssl x509 -in %f -noout -email"
set smime_import_cert_command="smime_keys add_cert %f"
set smime_encrypt_with="des3
set smime_encrypt_command="openssl smime -encrypt -%a -outform DER -in %f %c"
set smime_sign_command="openssl smime -sign -signer %c -inkey %k -passin stdin -in %f -certfile %i -outform DER"
set smime_decrypt_command="openssl smime -decrypt -passin stdin -inform DER -in %f -inkey %k -recip %c"
set smime_verify_command="openssl smime -verify -inform DER -in %s %C -content %f"
set smime_verify_opaque_command="\
openssl smime -verify -inform DER -in %s %C || \
openssl smime -verify -inform DER -in %s -noverify 2>/dev/null"
1 change: 0 additions & 1 deletion etc/home/vimrc
@@ -1,5 +1,4 @@
syntax on
colorscheme darkblue
set background=dark
set tabstop=3
set shiftwidth=3
Expand Down
10 changes: 7 additions & 3 deletions uzbl/config
Expand Up @@ -85,7 +85,7 @@ set always_insert_mode = 0
#set proxy_url = http://127.0.0.1:8118
#values 0-3
#set http_debug = 0
set useragent = Uzbl (Webkit WEBKIT_MAJOR.WEBKIT_MINOR.WEBKIT_MICRO) (SYSNAME NODENAME KERNREL KERNVER ARCH_SYSTEM [ARCH_UZBL]) (Commit COMMIT)
set useragent = Uzbl (Webkit WEBKIT_MAJOR.WEBKIT_MINOR.WEBKIT_MICRO) (SYSNAME NODENAME KERNREL KERNVER ARCH_SYSTEM [ARCH_UZBL]) (Commit COMMIT) Mozilla/5.0
#set max_conns = 0
#set max_conns_host = 0

Expand All @@ -95,7 +95,7 @@ set socket_dir = /tmp
# Key bindings
bind j = scroll_vert 20
bind `n = scroll_vert 20 # currently not working
bind `s = scroll_vert 550 # hack in my version, `n is \n, `s is " "
bind `s = scroll_vert 95% # hack in my version, `n is \n, `s is " "
bind k = scroll_vert -20
bind h = scroll_horz -20
bind l = scroll_horz 20
Expand Down Expand Up @@ -123,6 +123,8 @@ bind gh = uri http://www.uzbl.org
bind y _ = uri http://yubnub.org/parser/parse?default=gbbn&command=%s
bind g _ = uri http://google.com/search?q=%s
bind wp _ = uri http://en.wikipedia.org/?search=%s
bind @ _ = uri http://twitter.com/%s
bind @@ _ = uri http://identi.ca/%s

# like this you can enter any command at runtime, interactively. prefixed by ':'
bind :_ = chain '%s'
Expand All @@ -141,6 +143,7 @@ bind d = uri http://del.icio.us/singpolyma
bind o = spawn "$XDG_DATA_HOME/uzbl/scripts/load_url_from_history.sh"
bind s = js (function(){var url=document.location;var links=document.getElementsByTagName('link');var found=0;for(var i=0,l;l=links[i];i++){if(l.getAttribute('rev')=='canonical'||(/alternate short/).exec(l.getAttribute('rel'))){found=l.getAttribute('href');break;}}if(found){prompt('URL:',found);}else{window.onTinyUrlGot=function(r){if(r.errorCode==0){var t;for(var i in r.results){t=r.results[i].shortUrl;}prompt('URL:',t);}else{alert('Could not shorten with bit.ly');}};var s=document.createElement('script');s.type='text/javascript';s.src='http://api.bit.ly/shorten?login=bitlyapidemo&apiKey=R_0da49e0a9118ff35f52f629d2d71bf07&version=2.0.1&callback=onTinyUrlGot&longUrl='+encodeURIComponent(document.location);document.getElementsByTagName('head')[0].appendChild(s);}})();
bind | = js (function(){readStyle='style-ebook';readSize='size-large';readMargin='margin-medium';_readability_script=document.createElement('SCRIPT');_readability_script.type='text/javascript';_readability_script.src='http://lab.arc90.com/experiments/readability/js/readability-0.1.js?x='+(Math.random());document.getElementsByTagName('head')[0].appendChild(_readability_script);_readability_css=document.createElement('LINK');_readability_css.rel='stylesheet';_readability_css.href='http://lab.arc90.com/experiments/readability/css/readability.css';_readability_css.type='text/css';document.getElementsByTagName('head')[0].appendChild(_readability_css);_readability_print_css=document.createElement('LINK');_readability_print_css.rel='stylesheet';_readability_print_css.href='http://lab.arc90.com/experiments/readability/css/readability-print.css';_readability_print_css.media='print';_readability_print_css.type='text/css';document.getElementsByTagName('head')[0].appendChild(_readability_print_css);})();
bind L = js var inputs = document.getElementsByTagName('input'); for(var i = 0; i < inputs.length; i++) {if(inputs[i].name == 'openid_identifier' || inputs[i].name == 'openid_url') {inputs[i].value = 'singpolyma.net'; inputs[i].form.submit();}}
#bind u = spawn "$XDG_DATA_HOME/uzbl/scripts/load_url_from_bookmarks.sh"
# with the sample yank script, you can yank one of the arguments into clipboard/selection
bind yy = spawn "$XDG_DATA_HOME/uzbl/scripts/yank.sh" 6 primary
Expand Down Expand Up @@ -180,9 +183,10 @@ bind !reload = sh 'cat $1 > $4'
# this is similar to how it works in vimperator (and konqueror)
# TODO: did we resolve: "no click() event for hyperlinks so no referrer set" ?
#hit F to toggle the Hints (now in form of link numbering)
bind F = script $XDG_DATA_HOME/uzbl/scripts/hint.js
#bind F = script $XDG_DATA_HOME/uzbl/scripts/hint.js
# the most stable version:
bind f* = script $XDG_DATA_HOME/uzbl/scripts/follow_Numbers.js %s
bind F* = script $XDG_DATA_HOME/uzbl/scripts/inspect_Numbers.js %s
# using strings, not polished yet:
#bind fL* = script $XDG_DATA_HOME/uzbl/scripts/follow_Numbers_Strings.js %s

Expand Down
5 changes: 0 additions & 5 deletions uzbl/data/forms/bbs.archlinux.org

This file was deleted.

94 changes: 23 additions & 71 deletions uzbl/data/scripts/cookies.py
@@ -1,85 +1,37 @@
#!/usr/bin/env python

import cookielib, sys, os, urllib2

class FakeRequest:
def __init__(self, argv):
self.argv = argv
self.cookies = None
if len(self.argv) == 12:
self.cookies = self.argv[11]
def get_full_url(self):
#TODO: this is a hack, fix in uzbl.c!
u = self.get_host()+self.argv[10]
if self.argv[6].startswith('https'):
u = 'https://'+u
else:
u = 'http://'+u
return u
def get_host(self):
return self.argv[9]
def get_type(self):
return self.get_full_url().split(':')[0]
def is_unverifiable(self):
return False
def get_origin_req_host(self):
return self.argv[9]
def has_header(self, header):
if header == 'Cookie':
return self.cookies!=None
def get_header(self, header_name, default=None):
if header_name == 'Cookie' and self.cookies:
return self.cookies
else:
return default
def header_items(self):
if self.cookies:
return [('Cookie',self.cookies)]
else:
return []
def add_unredirected_header(self, key, header):
if key == 'Cookie':
self.cookies = header

class FakeHeaders:
def __init__(self, argv):
self.argv = argv
def getallmatchingheaders(self, header):
if header == 'Set-Cookie' and len(self.argv) == 12:
return ['Set-Cookie: '+self.argv[11]]
else:
return []
def getheaders(self, header):
if header == 'Set-Cookie' and len(self.argv) == 12:
return [self.argv[11]]
else:
return []
class FakeResponse:
def __init__(self, argv):
self.argv = argv
def info(self):
return FakeHeaders(self.argv)
import StringIO, cookielib, os, sys, urllib2

if __name__ == '__main__':
if os.environ['XDG_DATA_HOME']:
jar = cookielib.MozillaCookieJar(os.environ['XDG_DATA_HOME']+'/uzbl/cookies.txt')
action = sys.argv[8]
uri = urllib2.urlparse.ParseResult(
scheme=sys.argv[9],
netloc=sys.argv[10],
path=sys.argv[11],
params='',
query='',
fragment='').geturl()
set_cookie = sys.argv[12] if len(sys.argv)>12 else None

if 'XDG_DATA_HOME' in os.environ.keys() and os.environ['XDG_DATA_HOME']:
f = os.path.join(os.environ['XDG_DATA_HOME'],'uzbl/cookies.txt')
else:
jar = cookielib.MozillaCookieJar(os.environ['HOME']+'.local/share/uzbl/cookies.txt')
f = os.path.join(os.environ['HOME'],'.local/share/uzbl/cookies.txt')
jar = cookielib.MozillaCookieJar(f)

try:
jar.load()
jar.load(ignore_discard=True)
except:
pass

req = FakeRequest(sys.argv)

action = sys.argv[8]
req = urllib2.Request(uri)

if action == 'GET':
jar.add_cookie_header(req)
if req.cookies:
print req.cookies
if req.has_header('Cookie'):
print req.get_header('Cookie')
elif action == 'PUT':
res = FakeResponse(sys.argv)
hdr = urllib2.httplib.HTTPMessage(StringIO.StringIO('Set-Cookie: %s' % set_cookie))
res = urllib2.addinfourl(StringIO.StringIO(), hdr, req.get_full_url())
jar.extract_cookies(res,req)
jar.save(ignore_discard=True) # save session cookies too
#jar.save() # save everything but session cookies
jar.save(ignore_discard=True)
1 change: 1 addition & 0 deletions uzbl/data/scripts/cookies.sh
Expand Up @@ -48,6 +48,7 @@ which zenity &>/dev/null || exit 2
# uri=${uri/http:\/\/} # strip 'http://' part
# host=${uri/\/*/}
action=$8 # GET/PUT
shift
host=$9
shift
path=$9
Expand Down
3 changes: 2 additions & 1 deletion uzbl/data/scripts/history.sh
Expand Up @@ -2,4 +2,5 @@
#TODO: strip 'http://' part
file=${XDG_DATA_HOME:-$HOME/.local/share}/uzbl/history
[ -d `dirname $file` ] || exit 1
echo "$8 $6 $7" >> $file
URL="`echo "$6" | sed -e's/ /%20/g'`"
echo "$8 $URL $7" >> $file

0 comments on commit a2d0992

Please sign in to comment.