Skip to content

Instantly share code, notes, and snippets.

View SathyaBhat's full-sized avatar
🎶

Sathyajith Bhat SathyaBhat

🎶
View GitHub Profile
@SathyaBhat
SathyaBhat / fixperms.bat
Created May 14, 2011 07:25
fix permissions for "You need permissions from .. to perform this action" in Windows 7
takeown /r /d y /f *
icacls * /reset /t /c /q
@SathyaBhat
SathyaBhat / gist:894012
Created March 30, 2011 07:36
Chrome extensions keyboard shortcut handler
/*
Right here's the thing - for keyPress events to be run, you'll have to make use of
content scripts. Content scripts handle things at webpage & DOM level. You'll have
to do changes to your manifest:
*/
------------------------
manifest.json:
------------------------
/*
Note: don't replace manifest.json, add the relevant changes else
@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)
@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 / analyze_rebuild_index.sql
Created November 10, 2010 21:54
Analyze & Compute Oracle Table Statistics & Rebuild & Move indexes to different tablespace
SET NEWPAGE 0 PAGESIZE 0 FEEDBACK OFF HEADING OFF
spool analyze_rebuild_index.sql
SELECT 'ALTER TABLE '||TABLE_NAME|| ' INITRANS 30;' FROM USER_TABLES;
SELECT 'ALTER INDEX '||INDEX_NAME|| ' INITRANS 50;' FROM USER_INDEXES;
SELECT 'ALTER INDEX '||INDEX_NAME||' REBUILD TABLESPACE INDX ;' FROM USER_INDEXES;
SELECT 'ALTER INDEX '||INDEX_NAME|| ' REBUILD;' FROM USER_INDEXES;
SELECT 'ANALYZE TABLE '||TABLE_NAME ||' COMPUTE STATISTICS;' FROM USER_TABLES;