Skip to content

Instantly share code, notes, and snippets.

@debloper
debloper / reset.sh
Created May 2, 2015 12:59
Reset forgotten MySQL root password
service mysql stop
mysqld_safe --skip-grant-tables
mysql --user=root mysql
@debloper
debloper / schema.svg
Created March 25, 2015 10:52
Uniqueness of Singularity
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@debloper
debloper / timing.md
Created March 15, 2015 04:21
Hacking Gaia at FOSSAsia2015

Total Time 1:30hrs

Break ups:

  • [5min] Introduction of Gaia
    • Schematic Architecture of FxOS
    • Pick the top layer - i.e. Gaia
    • Discuss it's attributes (built with Web Technologies)
    • Briefly discuss the general overview
    • Demonstration of Mulet, WebIDE (& Flame)
  • [10min] App security/permission model
@debloper
debloper / repel.js
Last active August 29, 2015 14:07
Lean mouseover-on-page element animator scripts
// Set the element to select; the only moving part here
// Like literally...
var elem = document.querySelector("elem")
, html = document.querySelector("html");
// Apply positioning, just in case it wasn't already
elem.style.position = "absolute";
// Take the viewport height/width into consideration
// @TODO: should be updated on window resize
@debloper
debloper / README.md
Last active May 24, 2017 05:04
Flashing Firefox OS on Flame Reference Devices

Flashing Flame Devices with Firefox OS

If you have a Flame reference device and wanna try out alternate versions of Firefox OS apart from the stock one, but not willing to build from source, then follow this mini-manual.

Get the build

You can download the packages from the Nightly Build directories of Mozilla FTP. You specifically need the following two files:

  • b2g-XX.0a1.en-US.android-arm.tar.gz (XX is the version number)
  • gaia.zip
@debloper
debloper / ingress.js
Created July 14, 2014 11:05
Distraction Free Ingress Intel
// Here are the elements we don't need to see
// Feel free to remove the ones you _do_ need
var elements = [
"header",
"comm",
"geotools",
"game_stats",
"player_stats",
"bottom_right_stack",
"portal_filter_header",
@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
@debloper
debloper / keybase.md
Created May 21, 2014 08:25
GitHub proof for Keybase

Keybase proof

I hereby claim:

  • I am debloper on github.
  • I am debs (https://keybase.io/debs) on keybase.
  • I have a public key whose fingerprint is B0CA 7DEA 40F3 120C 14A8 8484 9552 3A9B 0090 2AED

To claim this, I am signing this object:

@debloper
debloper / mediawiki.md
Last active August 29, 2015 13:56
Script examples for regular server deployments

Short URLs in MediaWiki

Settings for mediawiki running on Apache server, with clean URLs like domain.tld/Article_Name, when the installation directory is %{DOCUMENT_ROOT}/w/

The Contents of the .htaccess file:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
@debloper
debloper / notes.md
Created November 26, 2013 01:11
WordPress Multisite on OpenShift Express

To start from scratch

  • Create a quickstart WordPress 3.x app with PHP & MySQL cartridge
  • Setup WordPress by visiting app-url/wp-admin/install.php
  • Clone the app locally for making further changes

OPTIONAL: version update

  • Update source with new WP version

Multisite configuration

  • Add define('WP_ALLOW_MULTISITE', true); to wp-config.php