Skip to content

Instantly share code, notes, and snippets.

View fxrobin's full-sized avatar
🎯
Focusing

F.X. Robin fxrobin

🎯
Focusing
View GitHub Profile
@fxrobin
fxrobin / tools-version.sh
Created February 10, 2025 10:44
Get installed tool versions
#!/bin/bash
LINUX_VERSION=$(cat /etc/os-release | grep PRETTY_NAME | cut -d "=" -f 2 | sed 's/"//g')
LINUX_KERNEL_VERSION=$(uname -r)
JAVA_VERSION=$(java -version 2>&1 | tail -n 1)
MVN_VERSION=$(mvn -version | grep "Apache Maven" | cut -d " " -f 3)
MVN_JAVA_VERSION=$(mvn -version | grep "Java version")
GIT_VERSION=$(git --version | cut -d " " -f 3)
DOCKER_VERSION=$(docker --version | sed 's/[^0-9.]*//g')
AZCLI_VERSION=$(az --version | grep azure-cli | sed 's/[^0-9.]*//g')

In ~/.bashrc

# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'

alias cls='clear'
alias lh='ls -gFh --group-directories-first --time-style=long-iso'
@fxrobin
fxrobin / bash-prompt.md
Last active March 3, 2024 13:55
BASH PROMPT for GIT

This bash prompt enables git information for the current directory.

export PS1=$'\\n\[\\e[97;44m\\] \\u \\[\\e[34;106m\\] \\w \\[\\e[30;107m\\]$(GIT_PS1_SHOWUNTRACKEDFILES=1 GIT_PS1_SHOWDIRTYSTATE=1 __git_ps1) \\[\\e[00m\\] \\n\u25B8 '
#!/bin/bash
echo "extracting $1:$2 to $1.pem"
openssl s_client -showcerts -connect $1:$2 </dev/null 2>/dev/null|openssl x509 -outform PEM >$1.pem
@fxrobin
fxrobin / terminator-string-display.js
Created April 6, 2018 08:46
Displays a String like Terminator
var text = $('.typewriter').text();
var length = text.length;
var timeOut;
var character = 0;
(function typeWriter() {
timeOut = setTimeout(function() {
character++;
@fxrobin
fxrobin / night-vision.scss
Last active April 4, 2018 11:18
SCSS Night Vision Effect on Image
.night-vision-effect {
$url : url(photo.jpg);
$line-width: 5px;
background-image:
$url,
radial-gradient(
#0F0,
#000
),