Skip to content

Instantly share code, notes, and snippets.

View karelhala's full-sized avatar
🌍
Saving the world one PR at a time

Karel Hala karelhala

🌍
Saving the world one PR at a time
  • Red Hat, Inc.
  • Brno
View GitHub Profile
@karelhala
karelhala / gist:5071863
Created March 2, 2013 16:43
Do you wonder how to use wget to login faceboook? Well this is exactly how to do it. Just paste it in console, change email, passwd and you can log in very easily.
wget "https://www.facebook.com/login.php?login_attempt=1" --post-data "email=mail&pass=heslo" --no-check-certificate --keep-session-cookies --save-cookies=cookies --load-cookies=cookies -U "Mozilla/5.0 (Windows NT 5.2; rv:2.0.1) Gecko/20100101 Firefox/4.0.1" -S
#Description what does every option do
#--post-data tells wget to send these information
#--keep-session-cookies mark your cookies to be used later on
#--save-cookies=cookies save your cookies into file "cookies" you need this to bypass cookies verification on facebook
#--load-cookies you need this to force facebook to think you use cookies
#-U "Mozilla/5.0 (Windows NT 5.2; rv:2.0.1) Gecko/20100101 Firefox/4.0.1" makes facebook to think you use proper browser, otherwise facebook wouldn't log-in
#-S print out whole communication to console
#after the running this script, you can check if everything is ok by openning file login.php?login_attempt=1 it should show your timeline
//Refresh from comand line
reload!; EmsRefresh.refresh(ManageIQ::Providers::Hawkular::MiddlewareManager.first)
//List all tests
rspec --format documentation
//simulate worker
simulate_queue_worker
//run on VPN IP
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
sudo ln -sf /usr/local/n/versions/node/5.4.1/bin/node /usr/bin/node
node –v (should show updated version now)
npm rebuild node-sass (Optional: if you use this)
alias d=docker
d kill `d ps -aq`
d rm -f `d ps -aq`
d rmi -f `d images -qa`
d volume rm `d volume ls -q`
d network rm `d network ls -q`
git checkout eeddb0dc6
#!/bin/sh
year=$(date --date="7 days ago" +"%Y")
month=$(date --date="7 days ago" +"%m")
day=$(date --date="7 days ago" +"%d")
file=/tmp/$2.html
wget -q -O $file "https://github.com/$1/$2/pulls?utf8=%E2%9C%93&q=is%3Apr%20author%3A$3%20updated%3A%3E%3D$year-$month-$day%20sort%3Acreated-asc" >/dev/null
urls=$(cat $file | sed -n "s/<a href=\"\(\/$1\/$2\/pull\/[0-9]*\)\" class=\"[^m][^>]*[^>]*>/\1/p")
const mapStateToProps = ({buttons: {buttonsTitle} = {buttons: {buttonsTitle: ''}}}) => ({
buttonsTitle: buttonsTitle
});
#!/usr/bin/env bash
line=$(printf "=%.0s" {1..50})
for FMT in $(iconv -l); do
echo "$line\nFormat $FMT:\n$line"
iconv -f $FMT -t UTF8 < inputFile.srt | head -n20
done > all.txt