Skip to content

Instantly share code, notes, and snippets.

Dominik Przybysz alien11689

View GitHub Profile
alien11689 /
Created Apr 13, 2019 — forked from magnetikonline/
Bash string manipulation cheatsheet.

Bash string manipulation cheatsheet

Assign value to variable if variable is not already set. Value will be returned.

Couple with : no-op if return value is to be discarded.
: ${variable="value"}
alien11689 / connect.js
Created Oct 15, 2017 — forked from gaearon/connect.js
connect.js explained
View connect.js
// connect() is a function that injects Redux-related props into your component.
// You can inject data and callbacks that change that data by dispatching actions.
function connect(mapStateToProps, mapDispatchToProps) {
// It lets us inject component as the last step so people can use it as a decorator.
// Generally you don't need to worry about it.
return function (WrappedComponent) {
// It returns a component
return class extends React.Component {
render() {
return (
alien11689 / gist:e2d298d1e08931a4fa702ca0a71df8a7
Created Oct 22, 2016 — forked from dodyg/gist:5616605
Kotlin Programming Language Cheat Sheet Part 2
View gist:e2d298d1e08931a4fa702ca0a71df8a7

This is a quick guide to Kotlin programming language. The previous part of this guide is here

#Object Oriented

fun main(args : Array<String>) {
  class local (val x : Int)
  val y = local(10)
alien11689 / gist:0cc153108ff72a30b1af1db01b15833a
Created Aug 21, 2016 — forked from dodyg/gist:5823184
Kotlin Programming Language Cheat Sheet Part 1
View gist:0cc153108ff72a30b1af1db01b15833a


Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3

Kotlin project website is at

All the codes here can be copied and run on Kotlin online editor.

Let's get started.

You can’t perform that action at this time.