Skip to content

Instantly share code, notes, and snippets.

View zodman's full-sized avatar
🤗
Code wins arguments!

Andres Vargas zodman

🤗
Code wins arguments!
View GitHub Profile
@zodman
zodman / .screenrc
Created December 20, 2009 17:32
screenrc
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #
### Created by Brad Sims <[email protected]> 25/06/2004
### I got tired of .screenrc's on the internet being so
### poorly commented... So being a good GNUbie I took matters
### into my own hands; and wrote this dotfile.
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #
(working version) Mon Feb 22 08:14:31 2010 (no log message)
PackageMetadata.py: changed
Index: PackageMetadata.py
====================================================================
contents(size sha1)
inode(mtime owner group)
--- PackageMetadata.py /foresight.rpath.org@fl:2-devel/2.0.0-2
+++ PackageMetadata.py @NEW@
@@ -31,3 +31,150 @@
#!/usr/bin/python
############################################
# touchspeed_createtable.py v0.2 2009/10/9 #
############################################
# Lookup table generator for Thomson SpeedTouch router WEP/WPA keys, for use with TouchSpeedCalc.
#
# For every router serial number, it stores only the last 3 bytes of the hexified-sha1-hash (the SSID-part).
# You can search the resulting dat file for these 3 bytes, make sure that ( position % 3 = 0 ).
#
# (position / 3) can be calculated back to the serial number using TouchSpeedCalc,
from django.contrib.auth.backends import RemoteUserBackend, ModelBackend
from django.contrib.auth.models import User
from mosketeros.settings import LDAP_SERVER,LDAP_BIND,LDAP_SEARCH
import ldap
class DjangoAuth(ModelBackend):
create_unknown_user = False
supports_anonymous_user = False
from django.contrib.auth.admin import UserAdmin, GroupAdmin
from django.contrib.auth.models import Permission, Group
from django.utils.translation import ugettext, ugettext_lazy as _
from django.forms import ModelForm
from django.db.models import Q
# editando el users admin.
@zodman
zodman / fliddler.py
Created November 23, 2010 21:20
fliddler.py
from twisted.internet import reactor
from twisted.web import http
from twisted.web.proxy import Proxy, ProxyRequest, ProxyClientFactory, ProxyClient
class InterceptingProxyClient(ProxyClient):
def handleResponsePart(self, buffer):
if 'x-requested-with' in self.headers.keys():
print(buffer)
ProxyClient.handleResponsePart(self, buffer)
@zodman
zodman / vimrc
Created November 24, 2010 17:23
.vimrc
set nu
set ts=4
set sw=4
set sts=4
nnoremap <silent> ,q :bp<CR>
nnoremap <silent> ,w :bn<CR>
nnoremap <silent> ,d :bd<CR>
@zodman
zodman / gist:732164
Created December 7, 2010 18:11
un filter fuera de lo comun
# coding: utf-8
from django.template import Library
from django.db import models
from django.utils.translation import ugettext as _
register = Library()
def estado_filter(cl):
if not getattr(cl.model_admin, 'estado_filter', False):
return
@zodman
zodman / gist:769923
Created January 7, 2011 18:57
bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
jQuery(function($) {
$('div.inline-group').sortable({
items: 'tr.has_original',
handle: 'td',
update: function() {
$(this).find('tr.has_original').each(function(i) {
$(this).find('input[name$=sequence]').val(i+1);
$(this).removeClass('row1').removeClass('row2');
$(this).addClass('row'+((i%2)+1));
});