Skip to content

Instantly share code, notes, and snippets.

View SathyaBhat's full-sized avatar
🎶

Sathyajith Bhat SathyaBhat

🎶
View GitHub Profile
@SathyaBhat
SathyaBhat / fetch-spotify-dataid.js
Created May 10, 2014 10:48
Fetches spotify data-ids from Spotify's http page. The list is then sent to spotify-to-mp3 ruby gem to download via Grooveshark. And that is how you download songs from spotify.
items = document.getElementsByClassName('play-track');
for(i= 0; i<items.length;i++) {console.log('http://open.spotify.com/track/' + items[i].getAttribute('data-id'));}
@SathyaBhat
SathyaBhat / rbangalorewiki.md
Last active August 29, 2015 14:23
/r/Bangalore Wiki

Welcome to Bangalore!

Bangalore, or Bengaluru as it is known now, has grown in stature from pensioner’s paradise to the IT capital of India. Whether you’re here for few hours or few days, there are lot of things to do, places to visit to experience Bangalore.

Food

From the traditional South Indian idli/dosas to fast food, there are plenty of options for food lovers. Here’s some of the places to visit.

@SathyaBhat
SathyaBhat / gist:748648
Created December 20, 2010 17:05
Stupid php code to fetch images from remote server & serve it to you.
# Stupid php code to fetch images from remote server & serve it to you. Takes single image URL only.
# Replaces prior images. No caching. Horribly n00bish. Don't flame me, written with no php knowledge
index.php:
---
<HTML>
<HEAD>
<TITLE>Image Grabber </TITLE>
</HEAD>
@SathyaBhat
SathyaBhat / gist:748751
Created December 20, 2010 18:19
Bookmarklet to mobilize webpages. Ideal to bypass proxies / just get the text content
javascript: var d = document, w = window, f = 'http://instapaper.com/m', l = d.location, e = encodeURIComponent, u = f + '?u=' + e(l.href); a = function () { w.open(u); }; a();void(0)
var pattern=/\bIWSS/
// var mobilizr = "http://google.com/gwt/x?u="
// var mobilizr = "http://www.instapaper.com/m?u="
var mobilizr = "http://viewtext.org/article?url="
var hnold = /news.ycombinator.com/
var imgur = /imgur.com/
var new_image = "http://sbhat.me/u/fetch_images.php?ImgUrl="
var newurl
var mobi
@SathyaBhat
SathyaBhat / autoreviewcomments.user.js
Created November 24, 2011 09:09 — forked from Benjol/autoreviewcomments.user.js
Add pro-forma comments dialog for reviewing (pre-flag)
// ==UserScript==
// @name AutoReviewComments
// @namespace benjol
// @version 1.1.6
// @description Add pro-forma comments dialog for reviewing (pre-flag)
// @include http://*stackoverflow.com/questions*
// @include http://*stackoverflow.com/review*
// @include http://*stackoverflow.com/admin/dashboard*
// @include http://*serverfault.com/questions*
// @include http://*serverfault.com/review*
@SathyaBhat
SathyaBhat / gist:2273068
Created April 1, 2012 08:00
Ruby code to go through home timeline & expand t.co URLs
require 'twitter'
def setup_twitter()
Twitter.configure do |config|
config.consumer_key = ""
config.consumer_secret = ""
config.oauth_token = ""
config.oauth_token_secret = ""
end
twitter = Twitter::Client.new
// ==UserScript==
// @name Stack Exchange Retag helper
// @namespace Rob W
// @author Rob W
// @description Configurable helper to enable a quicker retagging of questions at Stack Overflow
// @include http://*.superuser.com/questions/*
// @include http://*.superuser.com/q/*
// @include http://*.superuser.com/search?*
// @include http://*.superuser.com/*/edit*
// @version 2.2
@SathyaBhat
SathyaBhat / gist:5559816
Last active December 17, 2015 05:39
Custom proforma comments for WebApps
callback(
[
{ "name": "No Product recco", "description": "Sorry, [webapps.se] doesn't do product recommendations."},
{ "name": "Nothing but a URL (and isn't spam)", "description": "Whilst this may theoretically answer the question, <a href=\"http://meta.stackoverflow.com/q/8259\">it would be preferable</a> to include the essential parts of the answer here, and provide the link for reference."},
{ "name": "Requests to OP for further information", "description": "This is really a comment, not an answer. With a bit more rep, <a href=\"http://$SITEURL$/privileges/comment\">you will be able to post comments</a>. For the moment I've added the comment for you, and I'm flagging this post for deletion."},
{ "name": "OP using an answer for further information", "description": "Please use the <em>Post answer</em> button only for actual answers. You should modify your original question to add additional information."},
@SathyaBhat
SathyaBhat / superping-close-voters
Created June 25, 2013 04:52
Adds a button for copying superping-ready user names of close voters
// ==UserScript==
// @name Copy User Links
// @author Werner Robitza
// @namespace
// @description Adds a button for copying superping-ready user names of close voters
// @include http://stackoverflow.com/*
// @include http://meta.stackoverflow.com/*
// @include http://superuser.com/*
// @include http://serverfault.com/*
// @include http://meta.superuser.com/*