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
| #For some reasons, Fonts aren't getting rendered in Firefox. Not sure why! | |
| #Using gectechnix.in as a temp filestore. Will prolly be deleting the fonts from the server soon | |
| #If it works right, this is how your note looks: Default: http://wrttn.me/bf1081/ ( http://www.diigo.com/item/image/x9o0/vm2u?size=o ) Black: http://wrttn.me/537a88/ ( http://www.diigo.com/item/image/x9o0/q02j?size=o ) | |
| require 'net/http' #For making the actual POST | |
| require 'json' #For parsing the POST data | |
| require 'launchy' #For opening generated link in default browser | |
| $/ = "~~" | |
| uri=URI('http://wrttn.me/api/v1/notes.json') | |
| print "Create Notes on http://wrttn.me via command line\n" |
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
| function resize( imagewidth, imageheight, thumbwidth, thumbheight ) { | |
| var w = 0, h = 0, x = 0, y = 0, | |
| widthratio = imagewidth / thumbwidth, | |
| heightratio = imageheight / thumbheight, | |
| maxratio = Math.max( widthratio, heightratio ); | |
| if ( maxratio > 1 ) { | |
| w = imagewidth / maxratio; | |
| h = imageheight / maxratio; | |
| } else { | |
| w = imagewidth; |
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
| #From http://flask.pocoo.org/docs/quickstart/ | |
| from flask import request | |
| @app.route('/login', methods=['POST', 'GET']) | |
| def login(): | |
| error = None | |
| if request.method == 'POST': | |
| if valid_login(request.form['username'], | |
| request.form['password']): |
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
| SOPA Emergency IP list: | |
| So if these ass-fucks in DC decide to ruin the internet, here’s how to access your favorite sites in the event of a DNS takedown | |
| tumblr.com 174.121.194.34 | |
| wikipedia.org 208.80.152.201 | |
| # News | |
| bbc.co.uk 212.58.241.131 | |
| aljazeera.com 198.78.201.252 |
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
| #Basically the heart of the Publicbox (https://github.com/hmans/publicbox) code | |
| # See whole file at: https://github.com/hmans/publicbox/blob/master/config.ru | |
| get '/*' do |path| | |
| doc = Nokogiri::HTML(open("https://www.dropbox.com/#{path}").read) | |
| files = [] | |
| doc.css('#list-view div.filerow').each do |row| | |
| files << { | |
| filename: row.css('div.filename a').first.content.strip, | |
| size: row.css('div.filesize span.hidden').first.content.to_i, | |
| modified: row.css('div.modified span.hidden').first.content.to_i, |
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
| @ECHO OFF | |
| REM Use this to convert m4a's to mp3's using VLC (http://www.videolan.org/vlc/).... Had to find this to convert songs | |
| REM downloaded with https://github.com/navinpai/8Tracks-Downloader :P :) | |
| :START | |
| FOR /R %%G IN (*.m4a) DO (CALL :SUB_VLC "%%G") | |
| FOR /R %%G IN (*.m4a.mp*) DO (CALL :SUB_RENAME "%%G") | |
| FOR /R %%G IN (*.m4a) DO (del "%%G") | |
| sleep 1000 | |
| GOTO :START | |
| GOTO :eof |
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
| #!/bin/bash | |
| # ---------------------------------- | |
| # Author: D0rkye | |
| # Homepage: http://d0rkye.zsenialis.com/ | |
| # Most code probably by kyleabaker: http://kyleabaker.com/2010/07/11/how-to-fix-your-ubuntu-boot-screen/ | |
| # ---------------------------------- | |
| sudo apt-get install v86d hwinfo -y | |
| sudo hwinfo --framebuffer | |
| echo "---------------------------------------------------------------" | |
| echo "Please enter the best resolution from the list above" |
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
| <?php | |
| // lulzhunter.php - by th3j35t3r | |
| // Linux only really. | |
| // This is a PHP Command line script. | |
| // So you are gonna need PHP5 and PHP5-CLI | |
| // If ya don't got that you can get em using this (on Ubuntu): | |
| // 'sudo apt-get install php5 php5-cli' | |
| // Then from your shell just execute 'php lulzhunter.php' |
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
| //Search all files in current folder for a text string and return filenames | |
| find . -type f -exec grep -l "text to look for" {} \; | |
| //Turn off Monitor | |
| xset dpms force off |
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
| <?php | |
| //Stupid Univ. didn't release results, instead each student had to enter seat number to get his result! | |
| // Wrote this script to automate the process and get the results of students from Seat No. 1-999 (Think that's the | |
| // complete range of seat numbers) | |
| // You end up with a seatno.html files for all seat nos in the range 1-999 ... Result of seat no. 'a' is 'a.html' | |
| // Ran this on Ubuntu running LAMPP and it worked as expected! Nothing platform specific, so should work for you too! | |
| // Edit if you need to find results of another semester (or if u are disgusted by the shitty code I've written and | |
| //want to improve the code!) | |
| $id = '4'; //Was a hidden field... Dunno what it is for |