This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import pandas as pd | |
def fix(url): | |
# remove www subdomain | |
url = url.replace('://www.', '://') | |
# add slash if URL doesn't end with .html | |
if not url.endswith('html'): | |
url = url.rstrip('/') + '/' | |
return url |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
icotool -o favicon.ico -c favicon.png |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install abiword chromium-browser gimp gftp icoutils keepassx python-gpgme ssh xclip | |
# drivers | |
sudo apt-get install brother-lpr-drivers-extra | |
# dev | |
sudo apt-get install curl git gitk htop phantomjs python-pip mysql-server r-base vim | |
# Apache | |
sudo apt-get install apache2 libapache2-mod-fcgid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ls -d * | xargs -i tar czf "{}.tgz" {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xfce4-terminal --geometry=170x22 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var routes = []; | |
var route = {}; | |
$('.datenhellgrau td').each(function(idx, item){ | |
if ('sp1_1' == $(item).attr('headers')) { | |
route = {}; | |
route['name'] = $(item).text(); | |
} | |
else if ('sp1_2' == $(item).attr('headers')) { | |
route['gpx'] = $($(item).find('.download a')[0]).attr('href') | |
.replace('../../download/gps_tracks/', '/gpx/'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var names = []; | |
$('.company h3').each(function(idx, item){names.push(item.innerHTML.replace(' & family', ''))}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# JS snippet for email notification settings, e. g. Twitter | |
cb=document.querySelectorAll('input[type="checkbox"]');for(i in cb){cb[i].checked=false} | |
# for Drupal 4.x comment approval form | |
cbx=document.getElementsByClassName('form-checkbox');for(i in cbx){cbx[i].checked=true} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT actor, payload_commit_msg, repository_language FROM [publicdata:samples.github_timeline] | |
WHERE actor == 'GITHUB_LOGIN' AND payload_commit_msg != '' | |
AND REGEXP_MATCH(payload_commit_msg, r'(?i)SEARCH') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep -shoP 'https?.*?\.jpg' rss.xml | xargs wget |