This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import sqlite3 as lite | |
import os | |
def _open_db(db): | |
try: | |
con = lite.connect(db) | |
cur = con.cursor() | |
return (cur,con) | |
except lite.Error as e: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!flask/bin/python | |
from flask import Flask, jsonify, abort, request, make_response, url_for | |
from flask.ext.httpauth import HTTPBasicAuth | |
app = Flask(__name__, static_url_path = "") | |
auth = HTTPBasicAuth() | |
@auth.get_password | |
def get_password(username): | |
if username == 'miguel': |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# To create updated branch from gh/homebrew | |
# Useful when you update regularly any formula | |
# | |
# Need to have homebrew forked previously | |
# | |
# Alexandre Espinosa Menor - https://github.com/alexandregz | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ps -p PID -o etime= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Applications/MAMP/bin/php/php5.6.2/bin/pear install Auth_SASL Net_SMTP Net_IDNA2 Mail_mime Mail_mimeDecode Net_IDNA2-0.1.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name login into roundcube 2FA | |
// @namespace http://use.i.E.your.homepage/ | |
// @version 0.1 | |
// @description enter something useful | |
// @match http://localhost:8888/roundcube/* | |
// @copyright 2012+, You | |
// ==/UserScript== | |
$('#rcmloginuser').attr('value', '[email protected]'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Small utility which uses the homepage and nokogori to get a description from the formula's homepage. | |
# | |
# As written in the homebrew wiki: | |
# > Homebrew doesn’t have a description field because the homepage is always up to date, | |
# > and Homebrew is not. Thus it’s less maintenance for us. To satisfy the description | |
# > we’re going to invent a new packaging microformat and persuade everyone to publish | |
# > it on their homepage. | |
# | |
# Too bad no packaging microformat has yet been invented, but brew-more just first looks for a | |
# `<meta name="description">` tag, then for an `a#project_summary_link` tag (which is used in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub setZonasDominio{ | |
my $dominio = $_[0]; | |
foreach my $zona (@{$dominio->{cambios}}){ | |
&Debug::log("Modificando zona $zona->{zona} del dominio $dominio->{dominio}"); | |
my $r1 = &enviarPeticion('Domain_Zone_UpdateTypeA', {domain => $dominio->{dominio}, | |
hostname => $zona->{zona}, | |
ip => $zona->{ip}},1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# new ps1 from http://blog.arinium.fi/2012/09/howto-working-directory-in-synology-ds211j-shell-prompt/ | |
PS1="`whoami`@`hostname | sed 's/\..*//'`:\w" | |
case `id -u` in | |
0) PS1="${PS1}# ";; | |
*) PS1="${PS1}$ ";; | |
esac |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /tmp/brew_bash_completion.sh 2015-03-06 11:06:21.000000000 +0100 | |
+++ /usr/local/etc/bash_completion.d/brew_bash_completion.sh 2015-03-06 11:13:34.000000000 +0100 | |
@@ -230,6 +230,19 @@ | |
} | |
+_brew_desc () | |
+{ | |
+ local cur="${COMP_WORDS[COMP_CWORD]}" | |
+ case "$cur" in |