Skip to content

Instantly share code, notes, and snippets.

View leohmoraes's full-sized avatar
🏠
Working/Learning and Hackathon from home

Léo Moraes leohmoraes

🏠
Working/Learning and Hackathon from home
View GitHub Profile

Setup Mac OS X (Yosemite)

1. Run Software Update

Make sure everything is up to date.

2. Install Xcode and its "Command Line Tools"

  1. Go to App Store and install Xcode.

Setup Mac OS X (Yosemite)

1. Run Software Update

Make sure everything is up to date.

2. Install Xcode and its "Command Line Tools"

  1. Go to App Store and install Xcode.
@echo Off
php "%~dp0NOMEDOCOMANDO.phar" %*
#REM [en]
#REM %~dp0 is the directory of the actual file (command.bat) , its like the directive __DIR__ on php.
#REM [pt_BR]
#REM %~dp0 é o diretório do arquivo atual, similar a diretiva __DIR__ do php.
@leohmoraes
leohmoraes / firewall.sh
Last active August 29, 2015 14:26 — forked from rbdcti/firewall.sh
iptables firewall script
# Drop ICMP echo-request messages sent to broadcast or multicast addresses
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
# Drop source routed packets
echo 0 > /proc/sys/net/ipv4/conf/all/accept_source_route
# Enable TCP SYN cookie protection from SYN floods
echo 1 > /proc/sys/net/ipv4/tcp_syncookies
# Don't accept ICMP redirect messages
@leohmoraes
leohmoraes / show.sh
Last active August 29, 2015 14:26 — forked from gertcuykens/show.sh
mac
#!/bin/bash
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
@leohmoraes
leohmoraes / mac_bashrc
Last active August 29, 2015 14:26 — forked from francisluong/mac_bashrc
MAC .bashrc
# Reset
Color_Off='\[\e[0m\]' # Text Reset
# Regular Colors
Black='\[\e[0;30m\]' # Black
Red='\[\e[0;31m\]' # Red
Green='\[\e[0;32m\]' # Green
Yellow='\[\e[0;33m\]' # Yellow
Blue='\[\e[0;34m\]' # Blue
Purple='\[\e[0;35m\]' # Purple
@leohmoraes
leohmoraes / mac-setup
Last active August 29, 2015 14:26 — forked from thomaspuppe/mac-setup
Mac Setup
Currently just a collection of snippets, but should be developed into a setup Script!
# Make Sublime available from the command line (sublime ~/.hgrc)
$ sudo ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime
@leohmoraes
leohmoraes / .bash_profile
Last active August 29, 2015 14:26 — forked from mytharcher/.bash_profile
Mac profiles
export PS1="\w $ "
export CLICOLOR=1
export GREP_OPTIONS="--color=auto"
alias cl="source cl.sh"
alias work="cd ~/work"
alias ll="ls -al"
alias ahosts="vi ~/etc/apache2/httpd-vhosts.conf"
alias vhosts="sudo vi /etc/hosts"
alias subl='open -a "Sublime Text 2"'
if test ! $(which brew); then
echo "Installing homebrew..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
brew update
brew install coreutils
brew install findutils
brew install bash
@leohmoraes
leohmoraes / readme.md
Last active August 29, 2015 14:26
Seleção de Comandos para usar no Mac (Dicas)

Terminal Tips and Tricks You Never Thought You Needed

Ditto

A hidden gem in OS X is Apple’s ditto command. I’ve found this incredibly useful in copying large amounts of data as it can run within a Terminal window that contains more useful information about its progress than the more traditional Finder copy window.

$ ditto -V /old/work/ /new/work/