Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Felipe Martin Garcia fmartingr

🏠
Working from home
Block or report user

Report or block fmartingr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am fmartingr on github.
  • I am fmarting (https://keybase.io/fmarting) on keybase.
  • I have a public key ASD16cP6OjNtkvzWMFIDr3VpJRY8WDlXPZntn64dJC6Rjwo

To claim this, I am signing this object:

View keybase.md

Keybase proof

I hereby claim:

  • I am fmartingr on github.
  • I am fmarting (https://keybase.io/fmarting) on keybase.
  • I have a public key ASD16cP6OjNtkvzWMFIDr3VpJRY8WDlXPZntn64dJC6Rjwo

To claim this, I am signing this object:

@fmartingr
fmartingr / github_remove_forked.py
Created Oct 7, 2019
Remove all forked repositories on the user account that is nor archived
View github_remove_forked.py
# pip install github3
import github3
USERNAME = ""
TOKEN = ""
gh = github3.login(username=USERNAME, token=TOKEN)
View blacklist
# Youtube ads
ad.youtube.com
ads.youtube.com
r4---sn-vgqs7nez.googlevideo.com
r4.sn-vgqs7nez.googlevideo.com
www.youtube-nocookie.com
i1.ytimg.com
r17---sn-vgqsenes.googlevideo.com
r2---sn-vgqs7n7k.googlevideo.com
clients6.google.com
View bashdict.py
import re
class BashDict(dict):
variable_regex = r'(\$\{([\w\d\_]+)\})'
default_return = ''
def _parse_variables(self, value):
if '${' in value:
def replace(match):
@fmartingr
fmartingr / dotask.sh
Created Dec 25, 2016
Taskwarrior helper for rofi
View dotask.sh
#!/bin/bash
TMPFILE='/tmp/rofi-dmenu-taskwarrior'
task rofi rc.verbose=nothing > $TMPFILE
TASK=`rofi -dmenu -p "Task: " -i -input $TMPFILE`
TASK_ID=`echo $TASK | cut -f1 -d' '`
View aes.py
import base64
from Crypto.Cipher import AES
class AESCipher:
def __init__(self, key, iv, block_size=16):
self.block_size = block_size
self._cipher = AES.new(key, AES.MODE_CBC, iv)
def _get_padding(self, s):
@fmartingr
fmartingr / codebase_clone.py
Created Aug 20, 2014
python script to clone all codebase repositories using codebase-api and fabric into a codebase exported data folder
View codebase_clone.py
# pip install codebase-api fabric
from codebase import CodebaseClient
from fabric.operations import local
CLIENT_ID = 'foo/bar'
CLIENT_KEY = 'key'
client = CodebaseClient(CLIENT_ID, CLIENT_KEY)
View email_gmail.py
#!/usr/bin/python
import smtplib
gmail_user = "your_email@gmail.com"
gmail_pwd = "your_password"
msg['From'] = gmail_user
msg['To'] = to
@fmartingr
fmartingr / uni122.py
Last active Jan 24, 2017
Check for free planet slots on positions 7-9 on ogame uni122
View uni122.py
#!/usr/bin/env python
import requests
from xml.etree import ElementTree
url = 'http://s122-es.ogame.gameforge.com/api/universe.xml'
response = requests.get(url)
universe = ElementTree.fromstring(response.content)
You can’t perform that action at this time.