Skip to content

Instantly share code, notes, and snippets.

Dominik Przybysz alien11689

Block or report user

Report or block alien11689

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@alien11689
alien11689 / README.md
Created Apr 13, 2019 — forked from magnetikonline/README.md
Bash string manipulation cheatsheet.
View README.md

Bash string manipulation cheatsheet

Assignment
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"}
: ${variable="value"}
View whiptailDemo.sh
title="Whiptail DEMO"
responseFile=/tmp/demoResponse
whiptail --title "$title" --msgbox "Hi, I'm whiptail" 8 40
function printMenu {
whiptail --title "$title" --menu \
"What do you want to see?" 30 78 10 \
"MESSAGE_BOX" "Maybe message box?" \
"YES_NO_BOX" "Maybe yes/no box?" \
View RestKnowTheRules-4DevelopersGdansk-2018.pdf
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alien11689
alien11689 / kotlin + spock build.gradle
Last active Sep 4, 2018
Gradle config for kotlin and spock test cooperation
View kotlin + spock build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.0.0-beta-1103"
}
}
apply plugin: "kotlin"
View RestKnowTheRules-Confitura-2018.pdf
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alien11689
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
alien11689 / pom.xml
Last active Jul 8, 2017
Maven+kotlin.pom.xml
View pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>...</groupId>
<artifactId>...</artifactId>
<version>1.0.0-SNAPSHOT</version>
@alien11689
alien11689 / pom.xml
Created Jul 8, 2017
Maven+groovy.pom.xml
View pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>...</groupId>
<artifactId>...</artifactId>
<version>1.0.0-SNAPSHOT</version>
View PortsAndAdapters-Confitura-2017.pdf
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alien11689
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)
  println("${y.x}")
You can’t perform that action at this time.