Skip to content

Instantly share code, notes, and snippets.

View kyleterry's full-sized avatar

Kyle Terry kyleterry

View GitHub Profile
Some gist
testing!
This is some code
@classmethod
def needs_list(cls):
Piece = models.get_model("warehouse_pieces", "Piece")
needs = Piece.objects.filter(vendorpiece__is_active=True).order_by("cached_days_until_out_of_stock")
return needs
#!/bin/bash
export PORT=6660
function enc {
password=$1
while [ True ] ; do
read enc_text
echo "$enc_text" | openssl enc -rc4 -k $password | openssl enc -a
done;
" Don't allow snipmate to take over tab
autocmd VimEnter * ino <c-j> <c-r>=TriggerSnippet()<cr>
" Use tab to scroll through autocomplete menus
autocmd VimEnter * imap <expr> <Tab> pumvisible() ? "<C-N>" : "<Tab>"
autocmd VimEnter * imap <expr> <S-Tab> pumvisible() ? "<C-P>" : "<S-Tab>"
snor <c-j> <esc>i<right><c-r>=TriggerSnippet()<cr>
let g:acp_completeoptPreview=1
# #########################################################################
# This bash script adds tab-completion feature to django-admin.py and
# manage.py.
#
# Testing it out without installing
# =================================
#
# To test out the completion without "installing" this, just run this file
# directly, like so:
#
import time
import redis
import feedparser
channels = ('hackpark', 'infoforcefeed',)
def main():
import time
import redis
import twitter
accounts = ('reddit', 'AnonymousIRC',)
channels = ('hackpark', 'infoforcefeed')
import time
import redis
import feedparser
channels = ('hackpark', 'infoforcefeed',)
def main():
#!/bin/sh
if test -n "$DISPLAY"; then
desktop="SERVER$(wmctrl -d | grep '\*' | cut -f 1 -d ' ')"
vim --serverlist | grep $desktop
if [ $? -eq 1 ]
then
vim --servername $desktop $*
else
vim --servername $desktop --remote $*
fi