Skip to content

Instantly share code, notes, and snippets.

View ashwanik-github's full-sized avatar
🎯
Focused

Ashwani Kumar ashwanik-github

🎯
Focused
View GitHub Profile
@ashwanik-github
ashwanik-github / Jenkinsfile.groovy
Created November 15, 2021 05:15 — forked from Faheetah/Jenkinsfile.groovy
Jenkinsfile idiosynchrasies with escaping and quotes
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
echo 'Even escaped with a single backslash they are dropped'
sh 'echo \"$BUILD_NUMBER\"' // 1
echo 'Using two backslashes, the quotes are preserved'
sh 'echo \\"$BUILD_NUMBER\\"' // "1"
@ashwanik-github
ashwanik-github / bash-to-zsh-hist.py
Created November 23, 2020 10:36 — forked from muendelezaji/bash-to-zsh-hist.py
Convert Bash history to Zsh history
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This is how I used it:
# $ cat ~/.bash_history | python bash-to-zsh-hist.py >> ~/.zsh_history
import sys
import time
@ashwanik-github
ashwanik-github / bash-to-zsh-hist.py
Created November 23, 2020 10:36 — forked from muendelezaji/bash-to-zsh-hist.py
Convert Bash history to Zsh history
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This is how I used it:
# $ cat ~/.bash_history | python bash-to-zsh-hist.py >> ~/.zsh_history
import sys
import time
@ashwanik-github
ashwanik-github / bash-to-zsh-hist.py
Created November 23, 2020 10:36 — forked from muendelezaji/bash-to-zsh-hist.py
Convert Bash history to Zsh history
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This is how I used it:
# $ cat ~/.bash_history | python bash-to-zsh-hist.py >> ~/.zsh_history
import sys
import time
@ashwanik-github
ashwanik-github / # Vim Cheatsheet
Created September 3, 2020 03:02 — forked from alsibir/# Vim Cheatsheet
[.vim] vim #vim
# Vim Cheatsheet
>Disclaimer: This cheatsheet is summarized from personal experience and other online tutorials. It should not be considered as an official advice.
## Global
```bash
:help keyword # open help for keyword
:o file # open file
:saveas file # save file as
:close # close current pane