Skip to content

Instantly share code, notes, and snippets.

View alien11689's full-sized avatar

Dominik Przybysz alien11689

View GitHub Profile
[user]
name = ...
email = ...
[core]
pager = less -r
excludesfile = ~/.gitignore
editor = vim
precomposeunicode = true
autocrlf = false
[column]
set nu
set si
set expandtab
set tabstop=4
set shiftwidth=4
set softtabstop=4
:map \ r✓
@alien11689
alien11689 / README.md
Created April 13, 2019 14:54 — forked from magnetikonline/README.md
Bash string manipulation cheatsheet.

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"}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
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 October 15, 2017 20:03 — forked from gaearon/connect.js
connect.js explained
// 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 July 8, 2017 17:57
Maven+kotlin.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 July 8, 2017 15:27
Maven+groovy.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>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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?" \