Skip to content

Instantly share code, notes, and snippets.

View dlanileonardo's full-sized avatar
🏠
Working from home

Dlani dlanileonardo

🏠
Working from home
View GitHub Profile
@dlanileonardo
dlanileonardo / perfectelementary.bash
Created August 2, 2014 23:58
Elementary Luna Essentials commands.
#Download Elementary OS from here:
#http://sourceforge.net/projects/elementaryos/files/stable/
#First you update your system
sudo apt-get update && sudo apt-get dist-upgrade
#Install Google Chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
@dlanileonardo
dlanileonardo / open_subl
Last active August 29, 2015 14:01 — forked from asux/open_subl
Open txtmt and subl on SublimeText in Linux.
#!/usr/bin/env ruby
# /usr/local/bin/open_subl
require 'cgi'
require 'uri'
begin
query = CGI.parse(URI.parse(ARGV.first).query)
url = query['url'].first
file = URI.parse(url).path
line = query['line'].first
column = query['column'].first
@dlanileonardo
dlanileonardo / .nanorc
Last active August 29, 2015 14:01
Arquivo de configuração do Nano Editor
## Use auto-indentation.
set autoindent
## Backup files to filename~.
set backup
## Constantly display the cursor position in the statusbar. Note that
## this overrides "quickblank".
set const
## Use cut to end of line by default.
set cut
@dlanileonardo
dlanileonardo / .bashrc
Last active December 12, 2018 16:01
Pretty Bash
#######################
# Pretty .bashrc
#######################
alias mountedinfo='df -hT'
BLACK='\e[0;30m'
BLUE='\e[0;34m'
GREEN='\e[0;32m'
CYAN='\e[0;36m'
@dlanileonardo
dlanileonardo / Codificação de Arquivos
Last active December 22, 2015 23:09
Codificação de Arquivos via Bash
# Checando codificação de arquivos:
find . -iname "*.phtml" | while read linha; do file -i $linha; done
# Conversão em Lote
find . -iname "*.phtml" | while read linha; do iconv --from-code=ISO-8859-1 --to-code=UTF-8 $linha > $linha.new; mv $linha.new $linha; done