Skip to content

Instantly share code, notes, and snippets.

Avatar

Antonio Carlos da Graça Mota Durão de Souza acdesouza

View GitHub Profile
@acdesouza
acdesouza / bash_utils.sh
Last active Dec 6, 2022
Bag of useful bash tools created combining multiple commands
View bash_utils.sh
# ----------------------------------------------------------------------------------------------------
# Renames all files in a directory removing the inital 3 digits from its filename
# "001 Potato.sh" => "Potato.sh"
# "002-Carrot.sh" => "Carrot.sh"
# "003.Letuce.sh" => "Letuce.sh"
# "1003. Tomato.sh" => "Tomato.sh"
#
# Source: https://stackoverflow.com/a/28305274
# MV is a DESTRUCTIVE command. Check if the mv command is correct.
@acdesouza
acdesouza / angular_header.js
Last active May 28, 2016
Define Angular.JS controller as a header file
View angular_header.js
# app/application.js
# require_tree app/controllers
angular.module('myApp').controller('fooCtrl', ctrlImpl);
function ctrlImpl () {
"use strict";
var ctrl = myApp.ctrlHeader;
View gist:9a3e06e95e5b8c220f86
Verifying that +acdesouza is my blockchain ID. https://onename.com/acdesouza
View brew install
brew install openssl bash bash-completion brew-cask git heroku-toolbelt imagemagick node mysql postgresql
@acdesouza
acdesouza / .slate
Created Oct 5, 2012
My Slate config
View .slate
config defaultToCurrentScreen true
config nudgePercentOf screenSize
config resizePercentOf screenSize
# Resize Bindings
bind m:ctrl;alt corner top-left resize:screenSizeX;screenSizeY
# Push Bindings
bind right:ctrl;alt push right bar-resize:screenSizeX/3
bind left:ctrl;alt push left bar-resize:screenSizeX/3
@acdesouza
acdesouza / _config_deploy.rb
Last active Apr 29, 2017
Scripts para criação de um servidor Ruby on Rails. Exemplo de config do Capistrano que usa esses scripts.
View _config_deploy.rb
require 'bundler/capistrano'
set :application, "<nome_projeto>"
set :scm, :git
set :repository, 'git://<url_do_projeto>'
set :user, '<user_allowed_to_connect_with_ssh_on_servers>'
set :domain, '<URL_do_servidor>'
# Using Vagrant? See also: https://gist.github.com/3490513
@acdesouza
acdesouza / bootstrap
Created Mar 21, 2012
Environment setup script for my Ruby 1.9.3 / Rails projects. This script MUST be in script directory. And MUST be executed from project root: source script/bootstrap
View bootstrap
#!/bin/bash
clear
echo "------------------------------------------------------------------------------------------------------"
echo "Fresh install development enviroment"
echo "Check if you need export http_proxy, before running ;)"
echo "------------------------------------------------------------------------------------------------------"
#############################################################################################################
# Install rvm
#############################################################################################################
if ! type rvm >/dev/null 2>&1; then
@acdesouza
acdesouza / gist:1226564
Created Sep 19, 2011 — forked from viniciusteles/gist:556029
Sete Atitudes para Hackear a Indústria de Software
View gist:1226564
Sete Atitudes para Hackear a Indústria de Software
By Klaus Wuestefeld
1) Torne-se excelente.
Seja realmente bom em alguma coisa. Não fique só choramingando ou
querendo progredir às custas dos outros. Não pense q pq vc sentou 4
anos numa faculdade ouvindo um professor falar sobre software q vc
sabe alguma coisa. Jogador de futebol não aprende a jogar bola tendo
@acdesouza
acdesouza / .bash_profile
Last active Jun 27, 2019
Meu .bash_profile no MacOSX
View .bash_profile
export LC_CTYPE="utf-8"
export EDITOR=vim
# Turn terminal colors on
export CLICOLOR=1
################################################################################
# Bash PS1
################################################################################
@acdesouza
acdesouza / openmailto.sh
Created Feb 11, 2011
Instalações que faço no meu Ubuntu 10.10 para a máquina de desenvolvimento
View openmailto.sh
#!/bin/sh
google-chrome -remote "openurl(https://mail.google.com/mail?view=cm&tf=0&to=`
echo $1 | sed 's/mailto://'`,new-tab)"