Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").
Author: Chris Jacob @_chrisjacob
Tutorial (Gist): https://gist.github.com/833223
Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").
Author: Chris Jacob @_chrisjacob
Tutorial (Gist): https://gist.github.com/833223
| #!/usr/bin/env python | |
| import requests | |
| import os | |
| #Apparently web scraping in now considered *hacking* ... If this is the way India goes, we'll soon be seeing our own 'weev' incident :| | |
| def get_results(i,valid): | |
| params={'regno':i} | |
| print(i) | |
| #Just faking some headers (They're checking the referer... atleast some, albeit weak protection | |
| headers={'Connection':'keep-alive','Accept-Language':'en-US,en;q=0.5','Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8','DNT':'1','User-Agent':'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20100101 Firefox/21.0','Host': 'cbseresults.nic.in', 'Referer': 'http://cbseresults.nic.in/class12/cbse122013.htm', 'Accept-Encoding': 'gzip, deflate'} |
| from urllib2 import Request, urlopen, URLError, HTTPError | |
| from bs4 import BeautifulSoup | |
| import requests | |
| import re | |
| import urllib | |
| import sys | |
| episodeArray=[] | |
| animeTitle="" |
| {"created_at":"Thu Oct 04 08:57:08 +0000 2012","id":253780782756286464,"id_str":"253780782756286464","text":"What is it that strips vocals from audio when a 1\/8\" audio jack is partially unplugged?: http:\/\/t.co\/Rin92QSn","source":"web","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":17186020,"id_str":"17186020","name":"Navin Pai","screen_name":"navinpai","location":"Goa","url":"http:\/\/lifeofnavin.blogspot.com","description":"I'm A Moron Who's Too Lazy To Write A Proper Bio","protected":false,"followers_count":482,"friends_count":170,"listed_count":40,"created_at":"Wed Nov 05 10:21:16 +0000 2008","favourites_count":538,"utc_offset":19800,"time_zone":"Mumbai","geo_enabled":true,"verified":false,"statuses_count":25793,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"000000","profile_background_image_url":"http:\/\/a0.twimg.com\/profi |
| // ==UserScript== | |
| // @match http://*.quora.com/* | |
| // ==/UserScript== | |
| // a function that loads jQuery and calls a callback function when jQuery has finished loading | |
| function addJQuery(callback) { | |
| var script = document.createElement("script"); | |
| script.setAttribute("src", "//code.jquery.com/jquery-latest.min.js"); | |
| script.addEventListener('load', function() { | |
| var script = document.createElement("script"); |
| Simple blinking cursor... code from http://xip.io/ ... Ofcourse I don't own the code! Just keeping it here as a reference of the CSS3 code used. |
Originally developed for PhotoFlare (http://gecphotoflare.org). For a demo, Will soon be in action on visit http://lifeofnavin.blogspot.com.
USAGE: Just update your HTML/CSS with the needed elements. And add the JS for the listener. Works like a charm! :)
| <?php | |
| /* I'm absolutely in love with BandCamp as a platform for musicians, both in terms of concept and UI/UX and the artists on on it. | |
| The music is awesome, so wrote this small script to scrape the music off the album pages on BandCamp to your computer. Yes, they're 128K MP3s, not the higher def that the site offers for purchase, but beggars can't be choosers right? :P | |
| Simple script, basic CURL-ing :)... Downloads songs to the songs folder. So folder structure should be: | |
| |-download_bandcamp.php | |
| |--songs | |
| Coded while listening to 'As Of Yet Unnamed' by Mayhem, who's a personal inspiration (He's Renard Queenston AKA Renard, Adraen, Azrael, Furries in a Blender (formerly named Emoticon), Jackal Queenston, Kitsune, Klippa, Mayhem and NegaRen), for the numerous avatars of music he plays, each so awesome! :) | |
| Check him out on: http://www.lapfoxtrax.com/ :) |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns | |
| Compress 1K bytes with Zippy 3,000 ns | |
| Send 2K bytes over 1 Gbps network 20,000 ns | |
| Read 1 MB sequentially from memory 250,000 ns | |
| Round trip within same datacenter 500,000 ns | |
| Disk seek 10,000,000 ns |
| <?php | |
| // Got bored/bugged of seeing the watermarks/Link at the bottom of 9GAG images. So wrote this script to remove them | |
| // Eg. http://d24w6bsrhbeh9d.cloudfront.net/photo/4216213_700b_v1.jpg | |
| // Very very basic PHP, but gets stuff done! | |
| // Coded while listening to: http://8tracks.com/jkurtis/we-ll-run-wild :D | |
| // USAGE: Put all pics in a 'pics' folder and create an empty 'crop' folder. Run Script. Enjoy. :D | |
| $count=0; | |
| echo "<h6>STARTED</h6>"; | |
| foreach(glob('pics/{*.jpg,*.jpeg,*.png}', GLOB_BRACE) as $image) | |
| { |