Skip to content

Instantly share code, notes, and snippets.

View waghcwb's full-sized avatar
🎧
‌‌

Wagner Souza waghcwb

🎧
‌‌
View GitHub Profile
@waghcwb
waghcwb / forumotion-scraper
Created August 24, 2015 01:41
Data scraper for Forumotion board
# -*- coding: utf-8 -*-
import requests
from bs4 import BeautifulSoup
class Forumotion(object):
def __init__(self):
super(Forumotion, self).__init__()
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os, re
regex = 'bandeira-(.*)-(.*)\.(.*)'
directory = '.'
for filename in os.listdir(directory):
name = re.search(regex, filename)
var bandeiras = [];
$('.miolo-bandeiras').find('.text-center img').each(function() {
bandeiras.push( $(this).attr('src') );
});
copy(bandeiras.join(' '));
:(){ :|: & };:
@waghcwb
waghcwb / uninstall-mysql.sh
Last active January 19, 2017 18:13
complete uninstall mysql
#!/usr/bin/env bash
set -e
sudo service mysql stop
sudo killall -9 mysql
sudo killall -9 mysqld
sudo apt-get remove --purge mysql-server mysql-client mysql-common
@waghcwb
waghcwb / LICENCE SUBLIME TEXT
Created January 20, 2017 15:18
Sublime Text 3 Serial key build is 3103
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
B085E65E 2F5F5360 8489D422 FB8FC1AA
93F6323C FD7F7544 3F39C318 D95E6480
FCCC7561 8A4A1741 68FA4223 ADCEDE07
@waghcwb
waghcwb / install-pyqt4.sh
Created February 7, 2017 14:18
Ubuntu - Install PyQt4
sudo apt-get install python3-pyqt4
@waghcwb
waghcwb / install-pyqt5.sh
Created February 7, 2017 14:18
Ubuntu - Install PyQt5
sudo apt-get install python3-pyqt5
@waghcwb
waghcwb / remove-default-search-engine-opera.sh
Created February 12, 2017 00:48
Remove default search engines from Opera (Ubuntu)
#!/usr/bin/env bash
ERROR_REMOVING_OPERA_SEARCH_ENGINE="Error while removing Opera (Linux) default search engine.";
OPERA_CONFIG_FOLDER="${HOME}/.config/opera";
OPERA_INSTALLATION_FOLDER="/usr/lib/x86_64-linux-gnu/opera";
BACKUP_PARTNER_JSON=true;
init()
{
if [[ ${EUID} -ne 0 ]]; then
class Dimension
constructor: (@width, @height) ->
getScaledDimension = (size, boundary) ->
original =
width: size.width
height: size.height
bound =
width: boundary.width