Skip to content

Instantly share code, notes, and snippets.

View adrigrillo's full-sized avatar

Adrián Rodríguez Grillo adrigrillo

View GitHub Profile
@adrigrillo
adrigrillo / config.yml
Created May 3, 2020 16:11
Fusuma configuration
swipe:
3:
left:
command: "xdotool key alt+Right" # History forward
right:
command: "xdotool key alt+Left" # History back
up:
command: "xdotool key super" # Activity
down:
command: "xdotool key alt+Tab" # Next Activity
@adrigrillo
adrigrillo / heif-to-jpg.sh
Created January 25, 2020 13:04
Convert HEIC files from Iphone to JPG
for file in *.heic
do
heif-convert $file ${file/%.heic/.jpg}
done
for file in *.HEIC
do
heif-convert $file ${file/%.HEIC/.jpg}
done

Keybase proof

I hereby claim:

  • I am adrigrillo on github.
  • I am adrigrillo (https://keybase.io/adrigrillo) on keybase.
  • I have a public key ASBE2EEnM4w4-0Kl471X2nvy9qs6IvHfeCs56F7u0URPNQo

To claim this, I am signing this object:

@adrigrillo
adrigrillo / get-port-in-range.sh
Created January 5, 2018 08:12
Bash function to get the first port free in a range
#!/usr/bin/env bash
#
# Check if port is available
get_available_port() {
max_port=${2}
for (( port=${1} ; port <= max_port; port++ )); do
netstat -tulan | grep ${port} >> /dev/null
if [[ ${?} -gt 0 ]]; then
export PORT=${port}
@adrigrillo
adrigrillo / terminal-tree-folder-print.sh
Created September 4, 2017 21:47
Terminal command to print the folder structure
find . -type d | sed -e "s/[^-][^\/]*\// |/g" -e "s/|\([^ ]\)/|-\1/"
# If you want to print all the folders and files, use this command:
# find | sed 's|[^/]*/|- |g'