Skip to content

Instantly share code, notes, and snippets.

View sayak-sarkar's full-sized avatar
🏠
Working from home

Sayak Sarkar sayak-sarkar

🏠
Working from home
View GitHub Profile
@debloper
debloper / 9GAG.js
Last active November 15, 2021 07:35
Unlock NSFW without logging in
// Remap $ to jQuery object
var $ = jQuery;
// The real fun begins... first catch all the post-anchors & loop on them
$(document).on("scroll", function () {
// Let's declare some reusable globals for the next iterations
var urlBase = "http://img-9gag-lol.9cache.com/photo/";
$(".badge-evt.badge-nsfw-entry-cover").each(function () {
// Remove the NSFW class, to avoid redundant processing
@dolftax
dolftax / b2g_rasp.md
Last active August 29, 2015 14:03
Firefox OS for Raspberry Pi
  • Clone the repositories
git clone git://git.yoctoproject.org/poky
cd poky
git clone git://git.yoctoproject.org/meta-raspberrypi
git clone git://git.openembedded.org/meta-openembedded
git clone git://github.com/imphil/meta-b2g.git
. ./oe-init-build-env rpi-build
@nirbheek
nirbheek / set_gnome-terminal_transparency.sh
Last active March 6, 2024 09:41
A tiny script to set the transparency for X windows. If AUTOMAGIC_MODE is "true", it tries to find all gnome-terminal windows and applies the transparency to all of them.
#!/bin/bash
# vim: set sts=4 sw=4 et tw=0 :
#
# License: BSD
AUTOMAGIC_MODE="true"
OPACITY_100="0xffffffff"
OPACITY_0="0x0"
: ${XWININFO:=$(type -P xwininfo)}
@cuppster
cuppster / node-express-cors-middleware.js
Created April 9, 2012 16:02
express.js middleware to support CORS pre-flight requests
app.use(express.methodOverride());
// ## CORS middleware
//
// see: http://stackoverflow.com/questions/7067966/how-to-allow-cors-in-express-nodejs
var allowCrossDomain = function(req, res, next) {
res.header('Access-Control-Allow-Origin', '*');
res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE');
res.header('Access-Control-Allow-Headers', 'Content-Type, Authorization');