Skip to content

Instantly share code, notes, and snippets.

View pielgrzym's full-sized avatar
☂️

Q pielgrzym

☂️
View GitHub Profile
freeze_hist() {
fc -p # pop current history into stack
HISTFILE=`pwd`/.zsh_custom_history
SAVEHIST=10000
HISTSIZE=10000
}
unfreeze_hist() {
fc -p `pwd`/.zsh_custom_history
HISTFILE=`pwd`/.zsh_custom_history
class MortgageForm(ModelForm):
class Meta:
model = Mortgage
def __init__(self, *args, **kwargs):
"""
Custom init method
"""
import ipdb
@pielgrzym
pielgrzym / jquery.input_formatter.js
Created June 25, 2011 23:07
Simple plugin to format numbers in input fields on the fly (like: 10000 -> 10 000)
(function($){
$.fn.extend({
formatInput: function(settings) {
var $elem = $(this);
settings = $.extend({
errback: null
}, settings);
$elem.bind("keyup.filter_input", $.fn.formatEvent);
},
formatEvent: function(e) {
(function($){
$.fn.extend({
formatInput: function(custom_settings) {
settings = $.extend({
regex:".*",
format_number: true,
max_length: false,
errback: null
}, custom_settings);
return this.each(function() {
@pielgrzym
pielgrzym / jquery.input_formatter.js
Created June 27, 2011 18:54 — forked from sukima/jquery.input_formatter.js
Different scope approach
(function($){
$.fn.extend({
formatInput: function(custom_settings) {
var settings = $.extend({
regex:".*",
format_number: true,
max_length: false,
errback: undefined
}, custom_settings);
return this.each(function() {
pyfile /home/pielgrzym/.vim/bundle/vimotal/vimotal.py
python << EOF
def getPivotalGroup(name, group):
import vim, sys, os
scriptdir = "/home/pielgrzym/.vim/bundle/vimotal"
sys.path.append(scriptdir)
# name = vim.eval("a:projectname")
# group = vim.eval("a:groupname")
pyfile /home/pielgrzym/.vim/bundle/vimotal/vimotal.py
function! GetPivotalGroup(name, group)
python << EOF
import vim, sys, os
scriptdir = "/home/pielgrzym/.vim/bundle/vimotal"
sys.path.append(scriptdir)
name = vim.eval("a:name")
group = vim.eval("a:group")
pivotal = Pivotal()
pyfile /home/pielgrzym/.vim/bundle/vimotal/vimotal.py
function! GetPivotalGroup(name, group)
python << EOF
import vim, sys, os
scriptdir = "/home/pielgrzym/.vim/bundle/vimotal"
sys.path.append(scriptdir)
name = vim.eval("a:name")
group = vim.eval("a:group")
pivotal = Pivotal()
import XMonad hiding ( (|||) )
import XMonad.Layout.LayoutCombinators
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers(doRectFloat, Side (C))
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeysP, removeKeysP)
import System.IO
import qualified XMonad.StackSet as W
import XMonad.Actions.GridSelect
import XMonad hiding ( (|||) )
import XMonad.Layout.LayoutCombinators
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers(doRectFloat, Side (C))
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeysP, removeKeysP)
import System.IO
import qualified XMonad.StackSet as W
import XMonad.Actions.GridSelect