Skip to content

Instantly share code, notes, and snippets.

View luzfcb's full-sized avatar

Fábio C. Barrionuevo da Luz luzfcb

View GitHub Profile
.table-container th.asc:after {
content: '\0000a0\0025b2';
}
.table-container th.desc:after {
content: '\0000a0\0025bc';
}
.pagination {
text-align: center;
}
.table-container th.asc:after {
content: '\0000a0\0025b2';
}
.table-container th.desc:after {
content: '\0000a0\0025bc';
}
.pagination {
text-align: center;
}
@luzfcb
luzfcb / adminview.py
Last active August 29, 2015 14:07 — forked from fstnando/adminview.py
"""
Administrador con permisos para consulta(view)
Es una clase que extiende de admin.ModelAdmin y se utilizar para integrar
el admin con permiso de consulta.
Hay que integrarlo con el script que agrega a todos los modelos el permiso
de consulta(view):
https://gist.github.com/nicpottier/880901
# ((ak)) config
export HISTCONTROL=ignoredups:ignorespace
export HISTSIZE=5000
export HISTFILESIZE=1000
export HISTIGNORE="ls:cd:[bf]g:exit:..:...:l:l.:ll:la:h:history:edit-profile:reload-profile"
# ((ak)) helpers
alias l='ls -l';
alias l.='ls -d .*'
alias ll='ls -Al';
@luzfcb
luzfcb / tox.ini
Last active August 29, 2015 14:06 — forked from danverbraganza/tox.ini
[tox]
envlist=py27,lint
[testenv]
downloadcache={homedir}/.pipcache
distribute=True
sitepackages=False
[testenv:py27]
deps=nose

Running the Django tests with Tox

tox.ini goes into Django's root folder. test_*.py to the tests/ directory.

Install `tox`_ and run tox -e $python-$db. For instance, to run the tests on python 2.7 and sqlite:

tox -e py27-sqlite

You can also pass the app labels to test. To run the wsgi tests:

- name: Java install
hosts: do
user: root
tasks:
- name: Create java repo list
action: shell echo 'deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main' >/etc/apt/sources.list.d/java.list
- name: Add repo key
action: command apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886
- name: Accept java license
action: shell echo 'oracle-java7-installer shared/accepted-oracle-license-v1-1 select true' | debconf-set-selections
@luzfcb
luzfcb / ansible_hosts
Last active August 29, 2015 14:06 — forked from fclairamb/hosts
ansible tinc vpn setup
# sample config file
[do]
198.199.74.236 tinc_ip=10.1.1.1 hostname=ca_1_1 tinc_connectto=ca_2_2
192.34.60.13 tinc_ip=10.1.1.2 hostname=ca_1_2 tinc_connectto=ca_1_1
198.199.70.163 tinc_ip=10.1.1.3 hostname=ca_1_3 tinc_connectto=ca_1_2
198.199.71.204 tinc_ip=10.1.2.1 hostname=ca_2_1 tinc_connectto=ca_1_3
198.199.70.208 tinc_ip=10.1.2.2 hostname=ca_2_2 tinc_connectto=ca_2_1
// This function gets cookie with a given name
function getCookie(name) {
var cookieValue = null;
if (document.cookie && document.cookie != '') {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = jQuery.trim(cookies[i]);
// Does this cookie string begin with the name we want?
if (cookie.substring(0, name.length + 1) == (name + '=')) {
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));