Skip to content

Instantly share code, notes, and snippets.

View literat's full-sized avatar
:bowtie:
bowties are cool!

Litera Tomáš literat

:bowtie:
bowties are cool!
View GitHub Profile
@literat
literat / mac_git_gpg_verification
Created May 10, 2018 07:00
MAC OS X: Set up GPG verification for GitHub
Originaly: https://stackoverflow.com/questions/39494631/gpg-failed-to-sign-the-data-fatal-failed-to-write-commit-object-git-2-10-0
brew upgrade gnupg # This has a make step which takes a while
brew link --overwrite gnupg
brew install pinentry-mac
echo "pinentry-program /usr/local/bin/pinentry-mac" >> ~/.gnupg/gpg-agent.conf
killall gpg-agent
echo "test" | gpg --clearsign # on linux it's gpg2 but brew stays as gpg
@literat
literat / docker.md
Created May 10, 2018 07:02 — forked from f3l1x/aliases
Docker - installation, tips, commands, aliases

Docker

Shortcuts

$ curl -fsSL https://raw.github.com/tcnksm/docker-alias/master/zshrc >> ~/.bashrc && source ~/.bashrc
# ------------------------------------

Git History

https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History

Change multiple commits: git rebase -i HEAD~<number of commits>

'git pull --rebase --autostash' - this automatically stashes your local changes, pulls in new changes (and rebases if needed), and then pops the changes back off the stash.

Add repo to subdirectory

@literat
literat / Jenkins_2.md
Last active September 18, 2018 06:48

Since the value of $var is the empty string, this:

if [ $var == $var1 ]; then

expands to this:

if [ == abcd ]; then

which is a syntax error.

@literat
literat / Git_Fixup.md
Last active January 2, 2019 08:57
Git Fixup to most recent commit

Git Fixup

~/.bin/git-log-vgrep-most-recent-commit

#! /bin/bash

if (( $# < 1 )); then
  echo >&2 "Usage: $0 pattern [<since>..<until>]"
 exit 1
@literat
literat / React_App_Directory_Structure.md
Last active November 5, 2022 13:24
React Application Folder/Directory Structure

React App Folder/Directory Structure

move files around until it feels right

-- Dan Abramov

My directory structure

├── bin         - shell scripts for CI and other project maintenance
@literat
literat / sonar_qube_jenkins.md
Last active June 18, 2019 13:56
SonarQube + Jenkin s Pipelines
@literat
literat / fizbuzz.js
Created March 11, 2020 11:04
FizzBuzz
for(i=0;i++<100;console.log((i%3?'':'Fizz')+(i%5?'':'Buzz')||i));
@literat
literat / Jenkins Multibranch Pipeline Webhooks.md
Last active March 27, 2020 14:06
Jenkins Multibranch Pipeline Webhooks

How to send webhook payload or parameters to Jenkins Multibranch Pipeline from Bitbucket Server

  1. use Generic Webhook Trigger to send payload
  • but it will work only if the workspace in Jenkins is created
  • you must rescan branches first
  1. use Multibranch Scan Webhook Trigger
  • it runs rescan of branches when new branch is created

References: