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 / 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
#
@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
@turboBasic
turboBasic / export_mysql_table_to_tsv.sh
Last active October 30, 2018 15:23
Export table from MySQL database to Tab-separated value (TSV) file (bash/sh one-liner)
#!/usr/bin/env bash
DB_HOST=localhost
DB_NAME=database
DB_USER=user
DB_PASSWORD=p@ssw0rd
DB_TABLE=some_table
mysql --host=$DB_HOST --user=$DB_USER --password=$DB_PASSWORD --execute="select * from $DB_NAME.$DB_TABLE;" > sql_dump_$DB_NAME_$DB_TABLE.tsv
exit
@mcattarinussi
mcattarinussi / gpg-ssh-setup.md
Last active May 11, 2025 10:53
A setup guide to use a personal gpg key for ssh authentication

GPG - SSH setup

Generating the master key

Here we create the master key. We want only Certify capability: we use the master key only to create the subkeys, Sign - Encrypt - Authenticate capabilities will be assigned to the subkeys.

Run the following command to start the master key generation process. Select the set your own capabilities creation process (type 8)

  ▶ gpg --full-generate-key --expert

gpg (GnuPG) 2.2.9; Copyright (C) 2018 Free Software Foundation, Inc.