Skip to content

Instantly share code, notes, and snippets.

View gomesar's full-sized avatar

GomesAR gomesar

  • Brasil
View GitHub Profile
@gomesar
gomesar / citrix_fix.sh
Created January 30, 2019 14:34
Fix Citrix error on Linux
#!/bin/bash
# Fix Citrix error
# https://unix.stackexchange.com/questions/84175/create-a-symbolic-link-relative-to-the-current-directory
sudo mv /opt/Citrix/ICAClient/keystore/cacerts /tmp
sudo ln -s /etc/ssl/certs /opt/Citrix/ICAClient/keystore/cacerts
@gomesar
gomesar / vimrc.patch
Created October 2, 2018 13:52
indent xml files with gg=G
au FileType xml setlocal equalprg=xmllint\ --format\ --recover\ -\ 2>/dev/null
@gomesar
gomesar / cardapio_unicamp.py
Last active May 9, 2018 16:24
Cardápio diário da Unicamp
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
Requires: Pandas
Cardapio do dia da Unicamp
@author: gomesar
2018
'''
@gomesar
gomesar / largest10.sh
Created May 8, 2018 17:17
Find 10 largest files in directory
#!/bin/bash
# Find 10 largest files in directory
# find /path/to/search/ -type f -printf '%s %p\n'| sort -nr | head -10
find "${1}" -type f -printf '%s %p\n'| sort -nr | head -10
@gomesar
gomesar / gist:f9c32463a8abbe02470b9934eeb09db5
Last active September 28, 2018 13:26
tmuxToTmuxinatorLayout.sh
#!/bin/bash
# Scritp to list tmux windows and respectives layouts inputs to tmuxinator
# shows windows number, name and TmuxinatorLayout
tmux list-windows | sed -r 's/([0-9]+: .*) \([0-9]+ panes\).*layout (.*)] @.*/\1:\n layout: \2/g'
# tmux: https://github.com/tmux/tmux/wiki
# tmuxinator: https://github.com/tmuxinator/tmuxinator
# quick profile config guide: https://fabianfranke.de/2013/11/19/use-tmuxinator-to-recreate-tmux-panes-and-windows/
@gomesar
gomesar / installTmuxinator.bash
Last active April 28, 2018 15:45
Install gem with sudo in user environment
#!/bin/bash
# If you get permission denied error while using gem 'install tmuxinator'
# install tmuxinator in user environment
sudo -E gem install tmuxinator
# The -E part keeps your users environment intact.
# Else it would install it for the user root
# Thread: https://github.com/tmuxinator/tmuxinator/issues/27
# Credits: https://github.com/Chinggis6