Skip to content

Instantly share code, notes, and snippets.

Avatar
🎧
‌‌

Wagner Souza waghcwb

🎧
‌‌
View GitHub Profile
@waghcwb
waghcwb / forumotion-scraper
Created Aug 24, 2015
Data scraper for Forumotion board
View forumotion-scraper
# -*- coding: utf-8 -*-
import requests
from bs4 import BeautifulSoup
class Forumotion(object):
def __init__(self):
super(Forumotion, self).__init__()
View rename-bandeiras.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os, re
regex = 'bandeira-(.*)-(.*)\.(.*)'
directory = '.'
for filename in os.listdir(directory):
name = re.search(regex, filename)
View bandeiras.js
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 Jan 19, 2017
complete uninstall mysql
View uninstall-mysql.sh
#!/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 Jan 20, 2017
Sublime Text 3 Serial key build is 3103
View LICENCE SUBLIME TEXT
—– 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 Feb 7, 2017
Ubuntu - Install PyQt4
View install-pyqt4.sh
sudo apt-get install python3-pyqt4
@waghcwb
waghcwb / install-pyqt5.sh
Created Feb 7, 2017
Ubuntu - Install PyQt5
View install-pyqt5.sh
sudo apt-get install python3-pyqt5
@waghcwb
waghcwb / remove-default-search-engine-opera.sh
Created Feb 12, 2017
Remove default search engines from Opera (Ubuntu)
View remove-default-search-engine-opera.sh
#!/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
View getScaledDimension.coffee
class Dimension
constructor: (@width, @height) ->
getScaledDimension = (size, boundary) ->
original =
width: size.width
height: size.height
bound =
width: boundary.width