Skip to content

Instantly share code, notes, and snippets.

View zodman's full-sized avatar
🤗
Code wins arguments!

Andres Vargas zodman

🤗
Code wins arguments!
View GitHub Profile
$ cat docker_delete_all.bash
docker ps -a | awk '{print $1}' | xargs docker rm
docker images | awk '{print $1}' | xargs docker rmi
@zodman
zodman / app.js
Created August 28, 2017 22:54 — forked from taiansu/app.js
Phoenix brunch config which just make sense
import "phoenix_html"
import "bootstrap"
import "jquery"
import "toastr"
// ...
@zodman
zodman / 0_reuse_code.js
Created August 17, 2017 22:58
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@zodman
zodman / mattermost.py
Created January 21, 2016 17:53
pyiab plugin for authenticate with mattermost
# pyaib plugin for auth with matterircd
from pyaib.plugins import *
import time
@plugin_class('mattermost')
class Mattermost(object):
""" track channels and stuff """
def __init__(self, irc_c, config):
self.config = config
@zodman
zodman / daisuki.py
Created December 4, 2015 03:36 — forked from intact/daisuki.py
Daisuki plugin for livestreamer
import base64
import json
import random
import re
import time
try:
from Crypto import Random
from Crypto.Cipher import AES, PKCS1_v1_5
from Crypto.PublicKey import RSA
@zodman
zodman / nyaa_cli.py
Last active November 30, 2015 04:47
Buscar en nyaa
#!/usr/bin/env python
# encoding=utf8
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
from nyaa import nyaa
import click
@click.command()
@click.argument("search")
@click.option("--user", default="")
@click.option("--onlylink", default="")
@zodman
zodman / nyaa_fansub.py
Created November 21, 2015 06:10
Get all torrents for a fansub with titles
#!/bin/env python
from nyaa import nyaa
import guessit
import click
@click.command()
@click.argument("nyaa_user")
@click.option("--num_page", default=10, help="Numero de paginas rss a obtener")
def fetch_nyaa_user(nyaa_user, num_page):
""" obtiene de nyaa (rss) todos las series y hace batchs de torrents """
@zodman
zodman / answer_from_irc.py
Created July 2, 2015 23:49
chatango snippets
#!/usr/bin/python
import ch
import sys
msg = ""
import cgi
class TestBot(ch.RoomManager):
def onConnect(self, room):
global msg
@zodman
zodman / smtptest.py
Created February 27, 2015 19:38
command-line smtp test mail sender
#!/usr/bin/python
"""smtptest.py: command-line smtp test mail sender
https://github.com/turbodog/python-smtp-mail-sending-tester
Usage: python smtptest.py [options] fromaddress toaddress serveraddress
Examples:
python smtptest.py bob@example.com mary@example.com mail.example.com
python smtptest.py --debuglevel 1 --usetls -u bob -p xyzzy "Bob <bob@example.com>" mary@example.com mail.example.com
@zodman
zodman / log
Created June 25, 2014 16:28
django-logging
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'verbose': {
'format' : "[%(asctime)s] %(levelname)s [%(name)s:%(lineno)s] %(message)s",
'datefmt' : "%d/%b/%Y %H:%M:%S"
},
'simple': {
'format': '%(levelname)s %(message)s'