Skip to content

Instantly share code, notes, and snippets.

View creativcoder's full-sized avatar

creativcoder creativcoder

View GitHub Profile
@creativcoder
creativcoder / guide.txt
Created November 29, 2014 09:45
Resolving adb "???????? no permissions" error
1) Create a file as /tmp/android.rules with the following contents (hex vendor numbers were taken from the
vendor list page):
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0e79", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0502", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0b05", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="413c", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0489", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="091e", MODE="0666"
@creativcoder
creativcoder / gist:5dc5c2e35cd218ce9b5d
Last active August 22, 2022 14:41
Get list of installed packages(apps) in android via adb shell
Issue this command to terminal with your device connected :
$ adb shell pm list packages
If that doesn't work, then:
$ adb shell
$ su
$ pm list packages
@creativcoder
creativcoder / introrx.md
Last active August 29, 2015 14:24 — forked from staltz/introrx.md

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called Reactive Programming, particularly its variant comprising of Rx, Bacon.js, RAC, and others.

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

@creativcoder
creativcoder / stdc++.h
Last active August 29, 2015 14:26 — forked from velicast/stdc++.h
Linux GCC 4.8.0 /bits/stdc++.h header definition.
// C++ includes used for precompiling -*- C++ -*-
// Copyright (C) 2003-2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
@creativcoder
creativcoder / calc.py
Last active August 29, 2015 14:27 — forked from Zirak/calc.py
A Shunting Yard implementation in Python
#this program uses the Shunting Yard algorithm to transform infix expressions
# into postfix, and then an AST, which can then be easily evaluated.
#just run `python calc.py` and enjoy. enjoyment is optional and not included
# with the standard calc.py package, but for an extra $99.99 we can have a
# calc.py Premium Deluxe sent to you over the next 6-8 weeks, which may or may
# not increase your enjoyment of our calc.py product.
#for a list of operators supported and not supported (for isntance, the unary -
# is a ~) look below.
#TODO: handle parentheses.
@creativcoder
creativcoder / Sublime Text License Key
Last active August 29, 2015 14:28
Sublime Text 2 License Key, Sublime Text 3 License Key, Sublime Text Full Version.
Tags: Sublime Text 2 License Key, Sublime Text 3 License Key, Sublime Text Full Version
Go to menu Help > Enter License.
----- BEGIN LICENSE -----
J2TeaM
2 User License
EA7E-940282
45CB0D8F 09100037 7D1056EB A1DDC1A2
@creativcoder
creativcoder / CallPython.cs
Created November 15, 2015 14:26
Passing arguements from C# to python
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CallPython
{
@creativcoder
creativcoder / README.md
Created March 13, 2016 07:53 — forked from zenorocha/README.md
A template for Github READMEs (Markdown) + Sublime Snippet

Project Name

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage

@creativcoder
creativcoder / gist.md
Last active July 28, 2016 13:27
Provision a trusted worker to the serviceworkerglobalscope, on invoking run_serviceworker_scope from ServiceWorkerManager thread.

Approach:

  • The service worker manager will send a message to constellation with, its sender and a pipeline id, and a scope_url.

  • The constellation on receiving the message will find the pipeline and send a message to its containing script thread passing the SW manager sender.

  • The script_thread on receiving the message will query its TLS ServiceWorkerRegistration (by scope_url) and retrieve the Trusted<ServiceWorker> by calling get_trusted_worker() on ServiceWorkerRegistration object , and send the Trusted<ServiceWorker> to the SW manager using the sender which it gets from the constellation.

So is this approach going in right direction ?

@creativcoder
creativcoder / main.rs
Created November 14, 2016 21:09
Sized bound on Function
use std::marker::Sized;
struct Tee;
trait T: {
fn foo(&self) {
bar(&self)
}
}