- download ZIP
- install requirements
pip install -r requirements.txt - edit claim_free_title.py - Add authentication info
PACKPUB_USER = "you_user@email.com"
PACKPUB_PASS = "Y0urP4ssH3r3"
- run the script
python claim_free_title.py
| # use UTF8 | |
| set -g utf8 | |
| set-window-option -g utf8 on | |
| # make tmux display things in 256 colors | |
| set -g default-terminal "screen-256color" | |
| set -g default-terminal "screen-256color" | |
| # set scrollback history to 10000 (10k) | |
| set -g history-limit 10000 |
| /** | |
| * @author Bahman Movaqar <Bahman AT BahmanM.com> | |
| */ | |
| @Grab('org.jsoup:jsoup:1.8.2') | |
| import static org.jsoup.Jsoup.parse | |
| def cookieManager = new CookieManager(null, CookiePolicy.ACCEPT_ALL) | |
| CookieHandler.setDefault(cookieManager) | |
| def doc = parse( | |
| new URL('https://www.packtpub.com/packt/offers/free-learning').text |
| #!/usr/bin/ruby | |
| # Create display override file to force Mac OS X to use RGB mode for Display | |
| # see http://embdev.net/topic/284710 | |
| require 'base64' | |
| data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
| edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
| vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
| " Set up Vundle to manage plugins | |
| set nocompatible | |
| filetype off | |
| " set the runtime path to include Vundle and initialize | |
| set rtp+=~/.vim/bundle/vundle/ | |
| call vundle#rc() | |
| " let Vundle manage Vundle, required | |
| Plugin 'gmarik/vundle' |
| #!/usr/bin/php | |
| <?php | |
| $in = fopen('php://stdin', 'r'); | |
| $result=array(); | |
| $format='_.'; | |
| while($line=fgetcsv($in, 0, "\t")) { | |
| $result[]='|'.$format.implode('|'.$format, $line).'|'; | |
| $format=''; | |
| } | |
| fclose($in); |
| function _common_section | |
| printf $c1 | |
| printf $argv[1] | |
| printf $c0 | |
| printf ":" | |
| printf $c2 | |
| printf $argv[2] | |
| printf $argv[3] | |
| printf $c0 | |
| printf ", " |
This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.
###Array ####Definition:
As pointed out by @johntyree in the comments, using git reflog is easier and more reliable. Thanks for the suggestion!
$ git reflog
1ed7510 HEAD@{1}: checkout: moving from develop to 1ed7510
3970d09 HEAD@{2}: checkout: moving from b-fix-build to develop
1ed7510 HEAD@{3}: commit: got everything working the way I want
70b3696 HEAD@{4}: commit: upgrade rails, do some refactoring