Skip to content

Instantly share code, notes, and snippets.

View slok's full-sized avatar
⚙️
Building reliable solutions

Xabier Larrakoetxea Gallego slok

⚙️
Building reliable solutions
View GitHub Profile
@slok
slok / android.csh
Created June 23, 2011 07:04
My env variable scripts for slackware (stored in /etc/profile.d )
#!/bin/csh
setenv ANDROID_HOME /usr/lib/android
setenv PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
@slok
slok / 20_custom-ehci_hcd.sh
Created June 26, 2011 17:52
The configuration/script files to a proper hibernation/suspend for laptops like Asus U30Jc
#!/bin/sh
#
# File: "/etc/pm/sleep.d/20_custom-ehci_hcd".
#
#This script is for some laptops like Asus U30Jc, and make the laptop
#hibernate and suspend without errors (hang or freeze the system)
#Fist we have to pick the devices to bind and unbind. To select them we have
#to do a command:
# ls -la /sys/bus/pci/drivers/ehci_hcd/
#And pick the devices that have this style: "XXXX:XX:XX.X" For example in this case
@slok
slok / awards.html
Created July 11, 2011 08:17
Dipina GRDDL example in awards page with Dublin core ontology
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<head profile="http://www.w3.org/2003/g/data-view">
@slok
slok / mysql-redland.py
Created July 14, 2011 13:11
Mysql and Redland test in python
#Copyright (C) 2011 Iraide (Sharem) Diaz <iraide.diaz [at] gmail [dot] com>
#Copyright (C) 2011 Xabier (sLoK) Larrakoetxea <slok69 [at] gmail [dot] com>
#
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation, either version 3 of the License, or
#(at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
@slok
slok / oilrush-qt-replace.sh
Created July 22, 2011 00:53
Replaces the original prebuild libs of QT from the oilrush bin folder with soft links
#!/bin/bash
SYSLIB_PATH=/usr/lib64
OR_PATH=/home/slok/Games/OilRush-0.71/bin
ARCH=x64 #x64/x86
rm $OR_PATH/libQtCoreUnigine_$ARCH.so.4
rm $OR_PATH/libQtGuiUnigine_$ARCH.so.4
rm $OR_PATH/libQtNetworkUnigine_$ARCH.so.4
@slok
slok / git-cheat.md
Created July 30, 2011 17:07
Git cheat commands

Resumen de comandos de Git

Configurar git:

$ git config --global user.name "Xabier Larrakoetxea"  
$ git config --global user.email slok69@gmail.com  
$ git config --global merge.tool [el programa que queramos, yo usaria: diffuse]  

$ git config --global color.ui true

@slok
slok / metaproxy_instalacion.md
Created August 14, 2011 11:56
Instalación de metaproxy
@slok
slok / admin.py
Created November 10, 2011 14:53
Django admin restriction by group
from django.contrib.admin.sites import AdminSite
#redefining (extend) the admin class for AdminSite2 to let groups enter in the admins or not
class MyAdminSite2(AdminSite):
def __init__(self, name=None, app_name='admin', valid_groups=None ):
"""
Call the default contructor and add valid_groups for the group checking for the admin site
"""
@slok
slok / create_github_bitbucket_mirror.md
Created December 8, 2011 11:30
Create github and bitbucket mirror in gitolite

Create Github/Bitbucket Mirror

Create SSH key and configure

Create Key (no passphrase and name mirror the key)

ssh-keygen -t rsa -N "" -f ~/.ssh/mirror
@slok
slok / ftpFileserveUploader.py
Created December 8, 2011 16:47
Python script to upload various files to fileserve with FTP.
# Copyright (c) 2011, Xabier (slok) Larrakoetxea
# Copyright (c) 2011, Iraide (Sharem) Diaz
#
# 3 clause/New BSD license:
# opensource: http://www.opensource.org/licenses/BSD-3-Clause
# wikipedia: http://en.wikipedia.org/wiki/BSD_licenses
#
#-----------------------------------------------------------------------
# This script allows to upload to Fileserve with FTP various files at the same time
#