Skip to content

Instantly share code, notes, and snippets.

View airstrike's full-sized avatar
🎯
bringing presentations and spreadsheets to the 21st century

Andy airstrike

🎯
bringing presentations and spreadsheets to the 21st century
View GitHub Profile
@airstrike
airstrike / converters.py
Created September 20, 2011 21:38
An incomplete account of how I used DSE to be happy
class MyConverter(Converter):
"""
Convert .txt files extracted from SAP.
"""
COLUMNS = ('date', 'account', 'value', 'user', 'text')
DELIMITER = '|'
name =_('TIM SAP - Layout /FCORREA')
@airstrike
airstrike / ape-project.org.stylish.css
Created October 13, 2011 19:07
ape-project.org irc demo stylish theme
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url("http://www.ape-project.org/demos/6/tcpsocket-demo-irc.html") {
html { background-color:#333333; }
body { background-image:none !important; height:600px !important; }
div#content { background-color:#333333; }
#header, #breadcrump, .white_box_body .gdemo, .embed_this, .small_txt, #footer { display: none; }
pre.msg_text { width:600px !important; }
#history .msg_line { font-size:11px !important; }
#history .msg_line
@airstrike
airstrike / some.ajax.call.js
Created October 13, 2011 20:26
ajax call breaks back button, shows json instead of .html page
$.ajax({
type: 'GET',
url: document.location,
data: {},
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(fetched) {
$.each($('body#grid ul.messagelist li'), function(i, e) {
$(e).hide().fadeOut();
});
@airstrike
airstrike / access-import
Created January 4, 2012 19:08
Basic MS Access file picker & Import
Option Compare Database
Public Sub DoImport(fileName As String)
DoCmd.TransferText acImportDelim, "ImportaTrafegoPre", "Import", fileName, True
End Sub
Function getFileName(Optional save As Boolean = False) As String
Dim fDialog As Object
Dim title As String
function number_format (number, decimals, dec_point, thousands_sep) {
// http://kevin.vanzonneveld.net
// + original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
// + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
// + bugfix by: Michael White (http://getsprink.com)
// + bugfix by: Benjamin Lupton
// + bugfix by: Allan Jensen (http://www.winternet.no)
// + revised by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
// + bugfix by: Howard Yeend
// + revised by: Luke Smith (http://lucassmith.name)
@airstrike
airstrike / socket.py
Created January 9, 2012 20:33
Horrible workaround for socket.connect() bug in httplib2 under epio client.
# Wrapper module for _socket, providing some additional facilities
# implemented in Python.
"""\
This module provides socket operations and some related functions.
On Unix, it supports IP (Internet Protocol) and Unix domain sockets.
On other systems, it only supports IP. Functions specific for a
socket are available as methods of the socket object.
Functions:
@airstrike
airstrike / traceback.txt
Created January 9, 2012 20:38
epio create: error calling connect() on a socket object (second item in tuple must be an integer!)
(sandbox) C:\projects\sandbox>epio create -e [email protected]
Traceback (most recent call last):
File "C:\virtual\grapher\Scripts\epio-script.py", line 8, in <module>
load_entry_point('epio==0.3.1', 'console_scripts', 'epio')()
File "C:\virtual\grapher\lib\site-packages\epio\__init__.py", line 161, in main
CommandLineClient(sys.argv).execute()
File "C:\virtual\grapher\lib\site-packages\epio\__init__.py", line 157, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\virtual\grapher\lib\site-packages\epio\commands\__init__.py", line 86, in run_from_argv
self.handle(*args, **options.__dict__)
@airstrike
airstrike / slater.vim
Created January 12, 2012 12:29
vim colorscheme: slater
"%% SiSU Vim color file
" Slate Maintainer: Ralph Amissah <[email protected]>
" (originally looked at desert Hans Fugal <[email protected]> http://hans.fugal.net/vim/colors/desert.vim (2003/05/06)
:set background=dark
:highlight clear
if version > 580
hi clear
if exists("syntax_on")
syntax reset
endif
@airstrike
airstrike / railscasts.vim
Created January 12, 2012 12:30
vim colorscheme: railscasts
" Vim color scheme
"
" Name: railscasts.vim
" Maintainer: Nick Moffitt <[email protected]>
" Last Change: 01 Mar 2008
" License: WTFPL <http://sam.zoy.org/wtfpl/>
" Version: 2.1
"
" This theme is based on Josh O'Rourke's Vim clone of the railscast
" textmate theme. The key thing I have done here is supply 256-color
@airstrike
airstrike / vimrc
Created January 12, 2012 12:32
my vimrc file
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" a lot of this was stolen from: http://amix.dk/vim/vimrc.html "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => VIM user interface
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Set 7 lines to the curors - when moving vertical..
set so=2
set wildmenu "Turn on WiLd menu