Skip to content

Instantly share code, notes, and snippets.

View mithunsatheesh's full-sized avatar
♦️
Focusing

Mithun Satheesh mithunsatheesh

♦️
Focusing
View GitHub Profile
@mithunsatheesh
mithunsatheesh / ios-chrome-devtools.md
Created March 17, 2020 08:26 — forked from james2doyle/ios-chrome-devtools.md
Enable remote debugging on the iOS simulator using Chrome Dev Tools

Install the tools:

brew install ios-webkit-debug-proxy

Run the simulator. And choose an iOS 10 device. The chrome remote debugging doesn't work with iOS 11 yet.

Enable the inspector

@mithunsatheesh
mithunsatheesh / Remove_MIUI_Bloatware.bat
Created November 9, 2019 02:47 — forked from asif-mistry/Remove_MIUI_Bloatware.bat
Batch file to remove preinstalled bloated apps in MIUI devices with ADB
@echo off
set /p Y=Enter adb.exe folder path:
cd %Y%
adb devices
pause
for %%X in (
"com.android.browser"
"com.android.chrome"
"com.android.email"
"com.android.thememanager"
@mithunsatheesh
mithunsatheesh / gamification.css
Last active August 7, 2017 04:05
hosting to load from tamper monkey script
/* Popup */
.popup-inner {
z-index: 999;
width: 350px;
padding: 10px;
position: fixed;
bottom: 0;
right: 0;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
@mithunsatheesh
mithunsatheesh / gamification.css
Created August 5, 2017 16:22
hosting to load from tamper monkey script
.popup-inner {
z-index: 999;
width: 350px;
padding: 10px;
position: fixed;
bottom: 0;
right: 0;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
box-shadow: 0 2px 6px rgba(0, 0, 0, 1);
@mithunsatheesh
mithunsatheesh / noderules-3.0
Last active August 29, 2015 14:13
proposal for version 3.0
##API CHANGES
1. Add rule function : add
adds a rule into the current engine and does re sync internally
2. Store rule function : store
provides the stringified rules so that it can be preserved to DB.
3. Load rules function : load
feed the stringified rules via this function. Rules will get loaded and synced appropriately.
@mithunsatheesh
mithunsatheesh / scrapper
Created January 4, 2015 13:56
scrapper code
var Req = require("request");
var Q = require("q");
var cheerio = require('cheerio');
var FnGetHtml = function(url) {
var deferred = Q.defer();
Req({
uri: url,
method: "GET"
<?php
include("../wp-config.php");
header('Content-type: application/json;');
//we collect all the posts in this array and encode at one point
$post_details_array = array();
$latest_news_array = array();
$cat_id=array(12,13,14);
@mithunsatheesh
mithunsatheesh / circular
Created September 17, 2014 12:24
Go nested levels of an object. Circular referencing.
var a = {};
a.a = a;
var i = 0;
(function inspect(a) {
if(a.hasOwnProperty('a')) {
console.log(++i);
@mithunsatheesh
mithunsatheesh / jssort
Created April 30, 2014 09:47
Sorting an array with only 0s and 1s in javascript
/** method 1 : no need to recreate array **/
var u = [0,0,1,1,0,1,0,1,1,1,0,0,0];
for(var i=0,j=u.length-1; i<j; i++,j--) {
if(u[i]==1 && u[j]==0) {
u[i] = 0;
@mithunsatheesh
mithunsatheesh / js-is-passbyvalue-or-passbyreference
Created April 24, 2014 10:44
js is pass by value or pass by reference ?
var b = {c:1};
var a = [b,2,3];
var c = a;
var d = b;
console.log("level 1");
console.log(c);
console.log(d);
console.log(a);