Skip to content

Instantly share code, notes, and snippets.

View voyeg3r's full-sized avatar

Sérgio Luiz Araújo Silva voyeg3r

View GitHub Profile
@voyeg3r
voyeg3r / apt-pac.sh
Created January 9, 2018 13:04 — forked from cookiengineer/apt-pac.sh
APT-PAC - pacman with APT syntax
#!/bin/bash
# Save this file as /usr/bin/apt-pac and chmod +x it.
case "$1" in
autoremove)
pacman -Rns $(pacman -Qdtq);
;;
arq = open('alice.txt')
texto = arq.read()
texto = texto.lower()
import string
for c in string.punctuation:
texto = texto.replace(c, ' ')
texto = texto.split()
dic = {}
for p in texto:
@voyeg3r
voyeg3r / pydelicious.py
Created January 19, 2017 18:21 — forked from takashi/pydelicious.py
pydelicious for python3
"""Library to access del.icio.us data via Python.
:examples:
Using the API class directly:
>>> a = pydelicious.apiNew('user', 'passwd')
>>> # or:
>>> a = DeliciousAPI('user', 'passwd')
>>> a.tags_get() # Same as:
@voyeg3r
voyeg3r / 0_reuse_code.js
Last active August 29, 2015 14:20
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
" http://vimcasts.org/episodes/writing-a-custom-fold-expression/
function! MarkdownFolds()
let thisline = getline(v:lnum)
if match(thisline, '^##') >= 0
return ">2"
elseif match(thisline, '^#') >= 0
return ">1"
else
return "="
endif
@voyeg3r
voyeg3r / finduplicated.py
Last active December 10, 2015 03:18 — forked from anonymous/finduplicated.py
I my research on file duplicated solutions this is cool piece of code :)
import sys
import os
import hashlib
# source: http://stackoverflow.com/questions/748675/finding-duplicate-files-and-removing-them
# This version uses the file size and a hash of the contents to find duplicates. You can pass
# it multiple paths, it will scan all paths recursively and report all duplicates found.
def chunk_reader(fobj, chunk_size=1024):
"""Generator that reads a file in chunks of bytes"""
@voyeg3r
voyeg3r / noun.py
Created November 4, 2011 19:23
Download all icons from http://thenounproject.com
import os
import requests
URL = "http://thenounproject.com/download/zipped/svg_%s.zip"
HUMAN_URL = "http://thenounproject.com/modal/%s/"
def main():
index = 0
errors = []
@voyeg3r
voyeg3r / gist:955569
Created May 4, 2011 16:58 — forked from bavardage/gist:939140
POC Linux Keylogger
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# Arquivo: keylogger para linux
# Criado: Qua 04/Mai/2011 hs 14:01
# Last Change: 2011 Mai 04 14:30:42
# autor: bavardage (Ben Duffield)
# site: http://ardoris.wordpress.com
# changed by: Sérgio Luiz Araújo Silva
# reference: http://blog.liquuid.net/2011/04/23/como-fazer-um-keyloggermouse-no-linux/
@voyeg3r
voyeg3r / gist:322022
Created March 4, 2010 19:00 — forked from anonymous/gist:321909
Limpando o terminal no python
# source: http://stackoverflow.com/questions/517970/how-to-clear-python-interpreter-console
import os
def cls():
os.system(['clear','cls'][os.name == 'nt'])
# now, to clear the screen
cls()