Skip to content

Instantly share code, notes, and snippets.

View turboBasic's full-sized avatar
๐Ÿ”ฎ
Focusing

andriy melnyk turboBasic

๐Ÿ”ฎ
Focusing
View GitHub Profile
@turboBasic
turboBasic / executeInBash.groovy
Last active September 12, 2021 07:44
Execute complex bash command in Jenkins script console #jenkins #groovy #shell
String DIR = '/data/jenkins/workspace/UISW-C-UI/Daily/c-daily-build'
void executeInBash(String bashCommand) {
java.lang.Process process = ['/bin/bash', '-c', bashCommand].execute()
process.waitFor()
println process.getText()
}
//////
@turboBasic
turboBasic / Jenkinsfile.groovy
Last active August 7, 2020 13:32 — forked from Faheetah/Jenkinsfile.groovy
Jenkinsfile idiosynchrasies with escaping and quotes #jenkins #groovy #shell
node {
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1'
echo 'No quotes, pipeline command in single quotes'
sh 'echo $BUILD_NUMBER'
// 1
echo 'Double quotes are silently dropped'
sh 'echo "$BUILD_NUMBER"'
// 1
@turboBasic
turboBasic / firefox-places-query.md
Last active November 8, 2021 06:56
Firefox bookmarks with queries to Places db #firefox

Firefox Places database queries

Summary

  • For bookmark queries term is searched within bookmark names and tags. Title is returned if it contains term, tag is returned if only it matches term completely.
@turboBasic
turboBasic / all-emoji-in-single-line.groovy
Last active April 25, 2020 08:34
All Emojis up to 13.0 in single string and list for easy iteration #groovy #emoji
String emojiString = '๐Ÿ˜€ ๐Ÿ˜ƒ ๐Ÿ˜„ ๐Ÿ˜ ๐Ÿ˜† ๐Ÿ˜… ๐Ÿคฃ ๐Ÿ˜‚ ๐Ÿ™‚ ๐Ÿ™ƒ ๐Ÿ˜‰ ๐Ÿ˜Š ๐Ÿ˜‡ ๐Ÿฅฐ ๐Ÿ˜ ๐Ÿคฉ ๐Ÿ˜˜ ๐Ÿ˜— โ˜บ๏ธ โ˜บ ๐Ÿ˜š ๐Ÿ˜™ ๐Ÿฅฒ ๐Ÿ˜‹ ๐Ÿ˜› ๐Ÿ˜œ ๐Ÿคช ๐Ÿ˜ ๐Ÿค‘ ๐Ÿค— ๐Ÿคญ ๐Ÿคซ ๐Ÿค” ๐Ÿค ๐Ÿคจ ๐Ÿ˜ ๐Ÿ˜‘ ๐Ÿ˜ถ ๐Ÿ˜ ๐Ÿ˜’ ๐Ÿ™„ ๐Ÿ˜ฌ ๐Ÿคฅ ๐Ÿ˜Œ ๐Ÿ˜” ๐Ÿ˜ช ๐Ÿคค ๐Ÿ˜ด ๐Ÿ˜ท ๐Ÿค’ ๐Ÿค• ๐Ÿคข ๐Ÿคฎ ๐Ÿคง ๐Ÿฅต ๐Ÿฅถ ๐Ÿฅด ๐Ÿ˜ต ๐Ÿคฏ ๐Ÿค  ๐Ÿฅณ ๐Ÿฅธ ๐Ÿ˜Ž ๐Ÿค“ ๐Ÿง ๐Ÿ˜• ๐Ÿ˜Ÿ ๐Ÿ™ โ˜น๏ธ โ˜น ๐Ÿ˜ฎ ๐Ÿ˜ฏ ๐Ÿ˜ฒ ๐Ÿ˜ณ ๐Ÿฅบ ๐Ÿ˜ฆ ๐Ÿ˜ง ๐Ÿ˜จ ๐Ÿ˜ฐ ๐Ÿ˜ฅ ๐Ÿ˜ข ๐Ÿ˜ญ ๐Ÿ˜ฑ ๐Ÿ˜– ๐Ÿ˜ฃ ๐Ÿ˜ž ๐Ÿ˜“ ๐Ÿ˜ฉ ๐Ÿ˜ซ ๐Ÿฅฑ ๐Ÿ˜ค ๐Ÿ˜ก ๐Ÿ˜  ๐Ÿคฌ ๐Ÿ˜ˆ ๐Ÿ‘ฟ ๐Ÿ’€ โ˜ ๏ธ โ˜  ๐Ÿ’ฉ ๐Ÿคก ๐Ÿ‘น ๐Ÿ‘บ ๐Ÿ‘ป ๐Ÿ‘ฝ ๐Ÿ‘พ ๐Ÿค– ๐Ÿ˜บ ๐Ÿ˜ธ ๐Ÿ˜น ๐Ÿ˜ป ๐Ÿ˜ผ ๐Ÿ˜ฝ ๐Ÿ™€ ๐Ÿ˜ฟ ๐Ÿ˜พ ๐Ÿ™ˆ ๐Ÿ™‰ ๐Ÿ™Š ๐Ÿ’‹ ๐Ÿ’Œ ๐Ÿ’˜ ๐Ÿ’ ๐Ÿ’– ๐Ÿ’— ๐Ÿ’“ ๐Ÿ’ž ๐Ÿ’• ๐Ÿ’Ÿ โฃ๏ธ โฃ ๐Ÿ’” โค๏ธ โค ๐Ÿงก ๐Ÿ’› ๐Ÿ’š ๐Ÿ’™ ๐Ÿ’œ ๐ŸคŽ ๐Ÿ–ค ๐Ÿค ๐Ÿ’ฏ ๐Ÿ’ข ๐Ÿ’ฅ ๐Ÿ’ซ ๐Ÿ’ฆ ๐Ÿ’จ ๐Ÿ•ณ๏ธ ๐Ÿ•ณ ๐Ÿ’ฃ ๐Ÿ’ฌ ๐Ÿ‘๏ธโ€๐Ÿ—จ๏ธ ๐Ÿ‘โ€๐Ÿ—จ๏ธ ๐Ÿ‘๏ธโ€๐Ÿ—จ ๐Ÿ‘โ€๐Ÿ—จ ๐Ÿ—จ๏ธ ๐Ÿ—จ ๐Ÿ—ฏ๏ธ ๐Ÿ—ฏ ๐Ÿ’ญ ๐Ÿ’ค ๐Ÿ‘‹ ๐Ÿ‘‹๐Ÿป ๐Ÿ‘‹๐Ÿผ ๐Ÿ‘‹๐Ÿฝ ๐Ÿ‘‹๐Ÿพ ๐Ÿ‘‹๐Ÿฟ ๐Ÿคš ๐Ÿคš๐Ÿป ๐Ÿคš๐Ÿผ ๐Ÿคš๐Ÿฝ ๐Ÿคš๐Ÿพ ๐Ÿคš๐Ÿฟ ๐Ÿ–๏ธ ๐Ÿ– ๐Ÿ–๐Ÿป ๐Ÿ–๐Ÿผ ๐Ÿ–๐Ÿฝ ๐Ÿ–๐Ÿพ ๐Ÿ–๐Ÿฟ โœ‹ โœ‹๐Ÿป โœ‹๐Ÿผ โœ‹๐Ÿฝ โœ‹๐Ÿพ โœ‹๐Ÿฟ ๐Ÿ–– ๐Ÿ––๐Ÿป ๐Ÿ––๐Ÿผ ๐Ÿ––๐Ÿฝ ๐Ÿ––๐Ÿพ ๐Ÿ––๐Ÿฟ ๐Ÿ‘Œ ๐Ÿ‘Œ๐Ÿป ๐Ÿ‘Œ๐Ÿผ ๐Ÿ‘Œ๐Ÿฝ ๐Ÿ‘Œ๐Ÿพ ๐Ÿ‘Œ๐Ÿฟ ๐ŸคŒ ๐ŸคŒ๐Ÿป ๐ŸคŒ๐Ÿผ ๐ŸคŒ๐Ÿฝ ๐ŸคŒ๐Ÿพ ๐ŸคŒ๐Ÿฟ ๐Ÿค ๐Ÿค๐Ÿป ๐Ÿค๐Ÿผ ๐Ÿค๐Ÿฝ ๐Ÿค๐Ÿพ ๐Ÿค๐Ÿฟ โœŒ๏ธ โœŒ โœŒ๐Ÿป โœŒ๐Ÿผ โœŒ๐Ÿฝ โœŒ๐Ÿพ โœŒ๐Ÿฟ ๐Ÿคž ๐Ÿคž๐Ÿป ๐Ÿคž๐Ÿผ ๐Ÿคž๐Ÿฝ ๐Ÿคž๐Ÿพ ๐Ÿคž๐Ÿฟ ๐ŸคŸ ๐ŸคŸ๐Ÿป ๐ŸคŸ๐Ÿผ ๐ŸคŸ๐Ÿฝ ๐ŸคŸ๐Ÿพ ๐ŸคŸ๐Ÿฟ ๐Ÿค˜ ๐Ÿค˜๐Ÿป ๐Ÿค˜๐Ÿผ ๐Ÿค˜๐Ÿฝ ๐Ÿค˜๐Ÿพ ๐Ÿค˜๐Ÿฟ ๐Ÿค™ ๐Ÿค™๐Ÿป ๐Ÿค™๐Ÿผ ๐Ÿค™๐Ÿฝ ๐Ÿค™๐Ÿพ ๐Ÿค™๐Ÿฟ ๐Ÿ‘ˆ ๐Ÿ‘ˆ๐Ÿป ๐Ÿ‘ˆ๐Ÿผ ๐Ÿ‘ˆ๐Ÿฝ ๐Ÿ‘ˆ๐Ÿพ ๐Ÿ‘ˆ๐Ÿฟ ๐Ÿ‘‰ ๐Ÿ‘‰๐Ÿป ๐Ÿ‘‰๐Ÿผ ๐Ÿ‘‰๐Ÿฝ ๐Ÿ‘‰๐Ÿพ ๐Ÿ‘‰๐Ÿฟ ๐Ÿ‘† ๐Ÿ‘†๐Ÿป ๐Ÿ‘†๐Ÿผ ๐Ÿ‘†๐Ÿฝ ๐Ÿ‘†๐Ÿพ ๐Ÿ‘†๐Ÿฟ ๐Ÿ–• ๐Ÿ–•๐Ÿป ๐Ÿ–•๐Ÿผ ๐Ÿ–•๐Ÿฝ ๐Ÿ–•๐Ÿพ ๐Ÿ–•๐Ÿฟ ๐Ÿ‘‡ ๐Ÿ‘‡๐Ÿป ๐Ÿ‘‡๐Ÿผ ๐Ÿ‘‡๐Ÿฝ ๐Ÿ‘‡๐Ÿพ ๐Ÿ‘‡๐Ÿฟ โ˜๏ธ โ˜ โ˜๐Ÿป โ˜๐Ÿผ โ˜๐Ÿฝ โ˜๐Ÿพ โ˜๐Ÿฟ ๐Ÿ‘ ๐Ÿ‘๐Ÿป ๐Ÿ‘๐Ÿผ ๐Ÿ‘๐Ÿฝ ๐Ÿ‘๐Ÿพ ๐Ÿ‘๐Ÿฟ ๐Ÿ‘Ž ๐Ÿ‘Ž๐Ÿป ๐Ÿ‘Ž๐Ÿผ ๐Ÿ‘Ž๐Ÿฝ ๐Ÿ‘Ž๐Ÿพ ๐Ÿ‘Ž๐Ÿฟ โœŠ โœŠ๐Ÿป โœŠ๐Ÿผ โœŠ๐Ÿฝ โœŠ๐Ÿพ โœŠ๐Ÿฟ ๐Ÿ‘Š ๐Ÿ‘Š๐Ÿป ๐Ÿ‘Š๐Ÿผ ๐Ÿ‘Š๐Ÿฝ ๐Ÿ‘Š๐Ÿพ ๐Ÿ‘Š๐Ÿฟ ๐Ÿค› ๐Ÿค›๐Ÿป ๐Ÿค›๐Ÿผ ๐Ÿค›๐Ÿฝ ๐Ÿค›๐Ÿพ ๐Ÿค›๐Ÿฟ ๐Ÿคœ ๐Ÿคœ๐Ÿป ๐Ÿคœ๐Ÿผ ๐Ÿคœ๐Ÿฝ ๐Ÿคœ๐Ÿพ ๐Ÿคœ๐Ÿฟ ๐Ÿ‘ ๐Ÿ‘๐Ÿป ๐Ÿ‘๐Ÿผ ๐Ÿ‘๐Ÿฝ ๐Ÿ‘๐Ÿพ ๐Ÿ‘๐Ÿฟ ๐Ÿ™Œ ๐Ÿ™Œ๐Ÿป ๐Ÿ™Œ๐Ÿผ ๐Ÿ™Œ๐Ÿฝ ๐Ÿ™Œ๐Ÿพ ๐Ÿ™Œ๐Ÿฟ ๐Ÿ‘ ๐Ÿ‘๐Ÿป ๐Ÿ‘๐Ÿผ ๐Ÿ‘๐Ÿฝ ๐Ÿ‘๐Ÿพ ๐Ÿ‘๐Ÿฟ ๐Ÿคฒ ๐Ÿคฒ๐Ÿป ๐Ÿคฒ๐Ÿผ ๐Ÿคฒ๐Ÿฝ ๐Ÿคฒ๐Ÿพ ๐Ÿคฒ๐Ÿฟ ๐Ÿค ๐Ÿ™ ๐Ÿ™๐Ÿป ๐Ÿ™๐Ÿผ ๐Ÿ™๐Ÿฝ ๐Ÿ™๐Ÿพ ๐Ÿ™๐Ÿฟ โœ๏ธ โœ โœ๐Ÿป โœ๐Ÿผ โœ๐Ÿฝ โœ๐Ÿพ โœ๐Ÿฟ ๐Ÿ’… ๐Ÿ’…๐Ÿป ๐Ÿ’…๐Ÿผ ๐Ÿ’…๐Ÿฝ ๐Ÿ’…๐Ÿพ ๐Ÿ’…๐Ÿฟ ๐Ÿคณ ๐Ÿคณ๐Ÿป ๐Ÿคณ๐Ÿผ ๐Ÿคณ๐Ÿฝ ๐Ÿคณ๐Ÿพ ๐Ÿคณ๐Ÿฟ ๐Ÿ’ช ๐Ÿ’ช๐Ÿป ๐Ÿ’ช๐Ÿผ ๐Ÿ’ช๐Ÿฝ ๐Ÿ’ช๐Ÿพ ๐Ÿ’ช๐Ÿฟ ๐Ÿฆพ ๐Ÿฆฟ ๐Ÿฆต ๐Ÿฆต๐Ÿป ๐Ÿฆต๐Ÿผ ๐Ÿฆต๐Ÿฝ ๐Ÿฆต๐Ÿพ ๐Ÿฆต๐Ÿฟ ๐Ÿฆถ ๐Ÿฆถ๐Ÿป ๐Ÿฆถ๐Ÿผ ๐Ÿฆถ๐Ÿฝ ๐Ÿฆถ๐Ÿพ ๐Ÿฆถ๐Ÿฟ ๐Ÿ‘‚ ๐Ÿ‘‚๐Ÿป ๐Ÿ‘‚๐Ÿผ ๐Ÿ‘‚๐Ÿฝ ๐Ÿ‘‚๐Ÿพ ๐Ÿ‘‚๐Ÿฟ ๐Ÿฆป ๐Ÿฆป๐Ÿป ๐Ÿฆป๐Ÿผ ๐Ÿฆป๐Ÿฝ
@turboBasic
turboBasic / .gitattributes
Created November 10, 2019 18:08
Advanced Gitattributes settings
# COMMON SETTINGS THAT GENERALLY SHOULD ALWAYS BE USED WITH YOUR LANGUAGE
# SPECIFIC SETTINGS
#
# taken from: https://github.com/alexkaratarakis/gitattributes
# Auto detect text files and perform LF normalization
# http://davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/
* text=auto
#
@mattmc3
mattmc3 / zsh-strings.md
Last active November 7, 2025 16:38
Zsh - string utilities

zsh strings

Fish has a utility for [string maniplulation][string].

This is how you can do the same things with Zsh builtins.

References:

  • [Zsh regex][3]
  • [String modifiers][1]
  • [String expansion][2]
@ranma2913
ranma2913 / pipeline.gdsl
Last active January 4, 2025 09:42 — forked from ggarcia24/pipeline.gdsl
GDSL supporting pipeline declarative
//The global script scope
def ctx = context(scope: scriptScope())
//What things can be on the script scope
contributor(ctx) {
method(name: 'pipeline', type: 'Object', params: [body: Closure])
method(name: 'build', type: 'Object', params: [job: 'java.lang.String'], doc: 'Build a job')
method(name: 'build', type: 'Object', namedParams: [parameter(name: 'job', type: 'java.lang.String'), parameter(name: 'parameters', type: 'Map'), parameter(name: 'propagate', type: 'boolean'), parameter(name: 'quietPeriod', type: 'java.lang.Integer'), parameter(name: 'wait', type: 'boolean'),], doc: 'Build a job')
method(name: 'echo', type: 'Object', params: [message: 'java.lang.String'], doc: 'Print Message')
method(name: 'emailextrecipients', type: 'Object', params: [recipientProviders: 'Map'], doc: 'Extended Email Recipients')
#!/bin/bash
# This script takes a remote repository and merges it into
# the current one as a subdirectory
set -e
if [ -z "$1" ]
then
echo "Usage:"
@turboBasic
turboBasic / Use-symmetric-key-to-encrypt-repository.md
Last active October 31, 2024 15:14
Use git-crypt & symmetric key kept inside a repo to encrypt some files in the repository

Use git-crypt & symmetric key kept inside a repo to encrypt some files in the repository

Requirements

  1. GnuPG aka "gpg"
  2. git-crypt

you may totally ignore complicated gpg manuals, but you must understand how git-crypt operates.

@turboBasic
turboBasic / GPG-Simple-How-To.md
Last active September 22, 2022 11:05
GPG Simple How-To #gpg