A Pen by Zuri Pabon on CodePen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# “For almost every purpose, aliases are superseded by shell functions.” -- bash man page | |
alias rm-alias="unalias -a" | |
alias ..="cd .." | |
alias ..2="cd ../.." | |
alias ..3="cd ../../.." | |
alias ..4="cd ../../../.." | |
alias ..5="cd ../../../../.." | |
alias cdp="cd /var/projects" | |
# Use it as: pbcopy < myfile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Change .js and .es6 for whatever extension you like | |
for file in **/*.js;do mv $file $(echo ${file%*.*}.es6);done | |
# If wanna test it first then run | |
for file in **/*.js;do echo ${file%*.*}.es6;done | |
# Bash function, i.e. replaceExt(js, es6) | |
replaceExt () { | |
# If new extension is void/empty |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using find | |
find . -type f -not -name "*.js" -exec rm {} +; # recursively | |
find . -type f -not -name "*.js" -maxdepth 1 -exec rm {} +; # Only current dir | |
# Using rm | |
shopt -s extglob | |
rm **/!(*.js) # recursively | |
rm !(*.js) # Only current dir | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash | |
# Add to bash_profile | |
if [ -f ~/.git-completion.bash ]; then | |
. ~/.git-completion.bash | |
fi | |
# Create a ~/.gitconfig file containing | |
[diff] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="rotation-slider"> | |
<input type="range" min="0" max="10" step="0.1" value="0"> | |
<p></p> | |
</div> | |
<canvas/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# OSX | |
$ open -a Google\ Chrome --args --disable-web-security | |
# Linux | |
$ google-chrome --disable-web-security | |
# Also if you're trying to access local files for dev purposes like AJAX or JSON, you can use this flag too . | |
-–allow-file-access-from-files | |
# Window |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
############################################# | |
# DESC: THIS SCRIPT INSTALLS MySQL on OSX # | |
############################################# | |
#REQUIREMENTS: | |
# OS X 10.7 or newer | |
############################################# | |
# CHECK FOR OS X 10.7+ | |
# NOTE: To reset password: enter temporal password | |
# /usr/local/mysql/bin/mysql -u root -p |
First create publick keys and name them as home_rsa
and job_rsa
$ ssh-keygen -t rsa -C "[email protected]"
$ ssh-keygen -t rsa -C "[email protected]"
Then add them to ssh process:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Common | |
sudo apt-get update | |
sudo apt-get install build-essential gcc g++ make cmake htop curl unzip vim screen supervisor nmap sl meld git outguess firestarter | |
# Install gnome classic | |
sudo apt-get install gnome-session-fallback | |
# Install mate desktop | |
sudo apt-add-repository ppa:ubuntu-mate-dev/ppa | |
sudo apt-add-repository ppa:ubuntu-mate-dev/trusty-mate |
OlderNewer