Skip to content

Instantly share code, notes, and snippets.

View junaidk's full-sized avatar

Junaid Khalid junaidk

  • Mirantis
  • Berlin
View GitHub Profile
@junaidk
junaidk / signAndAlign.py
Created December 26, 2014 14:12
Sign and align multiple unaligned apks
# java and sdk tools should be on system path
# it needs zipalign and jarsigner tools
# http://developer.android.com/tools/publishing/app-signing.html
from subprocess import call
keyPass = ""
storepass = ""
alias = ""
keyStorePath = ""
@junaidk
junaidk / idea.md
Last active August 29, 2015 14:10
Intelli j idea shortcuts

These are some of my most used keyboard short cuts

  • Syntax aware selection in the editor selects a word at the caret and then selects expanding areas of the source code. For example, it may select a method name, then the expression that calls this method, then the whole statement, then the containing block, etc.: Ctrl+W

  • Basic Code Completion, to complete methods, keywords etc.: Ctrl+Space

  • Go to Declaration. Use this to navigate to the declaration of a class, method or variable used somewhere in the code: Ctrl+B

  • Introduce Variable Refactoring, to create a variable from an expression. This expression may even be incomplete or contain errors. Since version 8, IDEA intelligently selects a likely expression when no text is selected: Ctrl+Alt+V

@junaidk
junaidk / ReadMe
Last active August 29, 2015 14:07
Maven Scala pom + Eclipse
In eclipse create configuration for project. With Main class name.
@junaidk
junaidk / 10books.md
Last active August 29, 2015 14:05
10 Books Challange

Wasay

  1. The Alchemist (inspirational and all)
  2. The kite runner (I don't know, I liked it)
  3. The catcher in the Rye (Best book ever. Period.)
  4. 1493 (History but good)
  5. A case of exploding mangoes (Well, I needed a Pakistani book in the list)
  6. Neither Here nor There (Best travel book ever)
  7. By River Piedra I Sat and Wept (Emotional as hell)
  8. The outliers (A feel good book for crappy days)
  9. About the Author (A fun read)
@junaidk
junaidk / downloader.py
Last active August 29, 2015 14:05
WallBase Scrapping
import urllib2
fs = open("../satish.txt","r")
for line in fs:
wfile = urllib2.urlopen(line)
fileName = line.split("/")[4]
fileName = fileName.replace("\n","")
output = open("images/"+fileName,'wb')
output.write(wfile.read())
output.close()
@junaidk
junaidk / settings_default.json
Created August 14, 2014 15:14
Sublime Alignment Plugin Settings file
{
// If the indent level of a multi-line selection should be aligned
"align_indent": true,
// If indentation is done via tabs, set this to true to also align
// mid-line characters via tabs. This may cause alignment issues when
// viewing the file in an editor with different tab width settings. This
// will also cause multi-character operators to be left-aligned to the
// first character in the operator instead of the character from the
// "alignment_chars" setting.

cocos2d-x

Build Status Build Status

[cocos2d-x][1] is a multi-platform framework for building 2d games, interactive books, demos and other graphical applications.

@junaidk
junaidk / LineBreak.py
Last active August 29, 2015 14:04
Plugin to remove line breaks and create a single line
import sublime, sublime_plugin
class LineCommand(sublime_plugin.TextCommand):
def run(self, edit):
s = self.view.sel()
for region in s:
if not region.empty():
selection = self.view.substr(region)
selection_mod = selection.replace('\n', ' ').replace('\r', '')

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).

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.

@junaidk
junaidk / resources.md
Last active January 4, 2023 10:25
Google App Script Resources