Skip to content

Instantly share code, notes, and snippets.

@Meartan
Meartan / CleanReddit.js
Created April 10, 2016 11:25 — forked from TheFrostlixen/Bookmarklets.MD
Bookmarklets - JavaScript apps for your web browser
javascript:document.getElementsByClassName("side")[0].parentNode.removeChild( document.getElementsByClassName("side")[0]);
document.getElementById("header").parentNode.removeChild(document.getElementById("header"));
document.getElementsByClassName("panestack-title")[0].parentNode.removeChild( document.getElementsByClassName("panestack-title")[0]);
document.getElementsByClassName("menuarea")[0].parentNode.removeChild( document.getElementsByClassName("menuarea")[0]);
document.getElementsByClassName("usertext cloneable")[0].parentNode.removeChild( document.getElementsByClassName("usertext cloneable")[0]);
@Meartan
Meartan / README.md
Created December 16, 2015 00:54 — forked from JoelBesada/README.md
Backtick Example Command

This is an example command for Backtick. A Backtick command consists of some executable JavaScript and a bit of metadata in JSON.

Here are the required steps to create a command:

  1. Create a new Gist with a command.js and command.json file, or simply fork this one.

  2. Write your JavaScript in command.js. This will be injected into and executed on the page the user is currently on when they run it.

  3. Add some metadata to the command.json file:

  • name: The name of the command.
@Meartan
Meartan / GlobalSettings.txt
Created December 10, 2015 21:26 — forked from jhotmann/GlobalSettings.txt
Android Settings
adb_enabled=1
airplane_mode_on=0
airplane_mode_radios=cell,bluetooth,wifi,nfc,wimax
airplane_mode_toggleable_radios=bluetooth,wifi,nfc
assisted_gps_enabled=1
audio_safe_volume_state=1
auto_time=1
auto_time_zone=1
bluetooth_on=1
bugreport_in_power_menu=0
@Meartan
Meartan / prettifyJSON.js
Created October 11, 2015 03:53
JSON prettifier
// The original code from Scott Bush (http://scottbush.net/it/better-living-through-bookmarklets-json-prettifier/)
// I made a little change in it and now you can use it as a bookmarklet both on http and https
// The bookmarklet: javascript:(function()%7Bdocument.body.appendChild(document.createElement(%27script%27)).src%3D%27//rawgit.com/iharosi/1a95074c9e47ae9b649b/raw/18f25c45fcb0610bd8eabd389e1d794c0f13d383/prettifyJSON.js%27%3B%7D)()%3B
function FormatJSON(oData,sIndent){if(arguments.length<2){var sIndent="";}
var sIndentStyle=" ";var sDataType=RealTypeOf(oData);console.log(sDataType);if(sDataType=="array"){if(oData.length==0){return"[]";}
var sHTML="[";}else{var iCount=0;$.each(oData,function(){iCount++;return;});if(iCount==0){return"{}";}
var sHTML="{";}
var iCount=0;$.each(oData,function(sKey,vValue){if(iCount>0){sHTML+=",";}
if(sDataType=="array"){sHTML+=("\n"+sIndent+sIndentStyle);}else{sHTML+=("\n"+sIndent+sIndentStyle+"\""+sKey+"\""+": ");}
@Meartan
Meartan / python_resources.md
Last active August 29, 2015 14:23 — forked from jookyboi/python_resources.md
Python-related modules and guides.

Packages

  • lxml - Pythonic binding for the C libraries libxml2 and libxslt.
  • boto - Python interface to Amazon Web Services
  • Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  • Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
  • PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
  • Celery - Task queue to distribute work across threads or machines.
  • pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.

Guides

@Meartan
Meartan / javascript_resources.md
Last active August 29, 2015 14:23 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@Meartan
Meartan / css_resources.md
Last active August 29, 2015 14:23 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@Meartan
Meartan / 0_reuse_code.js
Last active August 29, 2015 14:23
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console