Skip to content

Instantly share code, notes, and snippets.

@maop
maop / gist:130864
Created June 16, 2009 20:12 — forked from gnuget/gist:130856
get your public ip
#!/usr/bin/env python
import urllib
def show_ip():
print urllib.urlopen("http://tuip.info/ip").read()
if __name__ == "__main__":
show_ip()
#!/usr/bin/python
#
# quick and dirty script to mauropm <3
# with love
# maop... xD
#
# Todo, parse types (mp3, youtube, etc..) and add code or perhaps
# feed youtube-dl with sources from here and later mencoder powa!
#
#!/usr/bin/python
# RandomFollowFriday.py
# me@marcoalfonso.net @maop
# You have to use this patch: http://python-twitter.googlecode.com/issues/attachment?aid=6509573335595538436&name=friends-followers-cursor.patch
# Since current twitter.py does not paging right (http://code.google.com/p/python-twitter/issues/detail?id=113)
import twitter
import random
USERNAME = "XXXXXX"
@maop
maop / ws.sh
Created September 23, 2010 05:10
#!/bin/bash
# ws.sh Web Server in Shell Scripting
# @author: maop www.maop.mx
# INSTALL: Just add to your /etc/inetd.conf:
# http-alt stream tcp nowait nobody /home/maop/Proyectos/ws-sh/ws.sh
# restart inetd and launch your browser to 127.0.0.1:8080
# --[ Config ]--
htdocs="/home/maop/Proyectos/ws-sh"
@maop
maop / corneta.sh
Last active December 17, 2015 20:59
Script para "grabar" los programas de "La Corneta" www.los40.com.mx/lacorneta/ y generar RSS para suscribirse como podcast
#!/bin/bash
# by maop <me@maop.mx>
# RSS: maop.gulegro.org/corneta/corneta.xml
# v0.1 29/05/2013
#
# Install:
# Modify Paths, and create a crontab with:
#
# 0 13 * * 1-5 /home/maop/scripts/corneta.sh
#

Keybase proof

I hereby claim:

  • I am maop on github.
  • I am maop (https://keybase.io/maop) on keybase.
  • I have a public key whose fingerprint is 8DCF D0F6 98E0 4A33 CEFC 6172 ECAD 5DB3 ED5A 692B

To claim this, I am signing this object:

### Keybase proof
I hereby claim:
* I am maop on github.
* I am maop (https://keybase.io/maop) on keybase.
* I have a public key whose fingerprint is 862F CA88 9456 DEE3 2E2D 5579 43BC CC7C 776B 1324
To claim this, I am signing this object:
<?php
require_once('Crypto.php');
function setKey(){
try {
$key = Crypto::CreateNewRandomKey();
// WARNING: Do NOT encode $key with bin2hex() or base64_encode(),
// they may leak the key to the attacker through side channels.
} catch (CryptoTestFailedException $ex) {
die('Cannot safely create a key');
} catch (CannotPerformOperationException $ex) {
@maop
maop / dlAttachments.py
Last active August 29, 2015 14:26 — forked from baali/dlAttachments.py
Python script to download all gmail attachments.
# Something in lines of http://stackoverflow.com/questions/348630/how-can-i-download-all-emails-with-attachments-from-gmail
# Make sure you have IMAP enabled in your gmail settings.
# Right now it won't download same file name twice even if their contents are different.
import email
import getpass, imaplib
import os
import sys
detach_dir = '.'
@maop
maop / soyoustart.py
Created December 10, 2015 02:11
Python Script for watching SoYouStart.com server availability, it can watch many servers at many datacenters and notify by email
#!/usr/bin/env python
# I was in a hurry for a SYS server so i make this quick script,
# notice that you have to use codes from the "us" version, since server's id
# are different in the Europe versions of ovh sites
# You'll receive notification mails like this:
#
# 141cabk1 | BK-8T: Intel i3 2130 2c/4t 3.4 GHz+ 8 GB 2x4 TB SATA
# AVAILABLE (1H-low) in gra
# AVAILABLE (1H-low) in sbg