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/sh | |
natd -interface tun0 | |
ipfw -f flush | |
ipfw add divert natd ip from any to any via tun0 | |
ipfw add pass all from any to any | |
sysctl -w net.inet.ip.forwarding=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
sudo iptables -t nat -F POSTROUTING | |
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE | |
sudo iptables-save | sudo tee /etc/iptables.sav | |
iptables-restore < /etc/iptables.sav | |
sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward" | |
add to /etc/sysctl.conf: | |
net.ipv4.ip_forward=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
VBoxManage clonehd "source.vmdk" "cloned.vdi" --format vdi | |
VBoxManage modifyhd "cloned.vdi" --resize 51200 | |
VBoxManage clonehd "cloned.vdi" "resized.vmdk" --format vmdk |
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
from twython import Twython | |
import tweetstream | |
import sys | |
import os | |
#Credentials needed to access Twitter public Stream | |
stream_user = "PUT_TWITTER_USER_HERE" | |
stream_passwd = "PUT_TWITTER_USER_PASSWORD_HERE" | |
#Keys for Robot to be able to act as a Twitter App |
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
class Aduana(dict): | |
def __init__(self,A,B): | |
self.empleados=10 | |
self.tasa_entrada=A | |
self.tasa_salida=B | |
def __init__(self,A,B,C): | |
self.empleados=C | |
self.tasa_entrada=A |
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
#!/usr/bin/env python | |
# example helloworld.py | |
import pygtk | |
pygtk.require('2.0') | |
import gtk | |
class HelloWorld: |
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
# -*- coding=utf-8 -*- | |
from libturpial.api.models.account import Account | |
from libturpial.api.core import Core | |
c = Core() | |
cuenta = "guerrerocarlos-twitter" | |
mensaje = "Probando desde libturpial" | |
cuentas_registradas = c.list_accounts() | |
print "Cuentas registradas: ",cuentas_registradas,"\n" |
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
# *-* encoding=utf-8 *-* | |
geo = { | |
"Dinamarca" : False, | |
"Tuvalu" : False, | |
"Bosnia y Herzegovina" : False, | |
"Tonga" : False, | |
"Nepal" : False, | |
"Wallis y Futuna" : False, | |
"Somalia" : False, |
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
<!-- CRM Lead Search View --> | |
<record id="view_crm_case_leads_filter" model="ir.ui.view"> | |
<field name="name">CRM - Leads Search</field> | |
<field name="model">crm.lead</field> | |
<field name="arch" type="xml"> | |
<search string="Search Leads"> | |
<field name="name" string="Lead / Customer" filter_domain="['|','|',('partner_name','ilike',self),('email_from','ilike',self),('name','ilike',self)]"/> | |
<field name="categ_ids" string="Category" filter_domain="[('categ_ids','ilike',self)]"/> | |
<field name="section_id" context="{'invisible_section': False}"/> |
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
sudo launchctl load /System/Library/LaunchDaemons/org.isc.named.plist | |
sudo launchctl unload /System/Library/LaunchDaemons/org.isc.named.plist |