View .bashrc
# Add git branch if its present to PS1
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
PS1='\[\033[01;36m\]\u@\h\[\033[00m\]:\[\033[01;37m\]\w\[\033[01;32m\]$(parse_git_branch)\[\033[00m\]'$'\n$ '
View how-install-netbeans-using-android-studios-javasdk.sh
$ path/to/netbeans-installer --javahome "path/to/android-studio-installation/jre"
View open-terminal-here.md

Put C:\Users<USER> in environment variables and at CMD (Administrator mode) run:
sh cd C:\Users\<USER> mklink bash.exe C:\Windows\System32\bash.exe

Set Open Terminal Here's Settings Command with: start /D "%cd%" bash.exe

View add_keys.sh
cat ~/.ssh/id_rsa.pub | ssh USER@HOST "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
View get-vw.sass
$vw-viewport: 320
$vw-enable: true
@function get-vw($font)
@if $vw-enable
$vw-context: $vw-viewport * 0.01 * 1px
@return $font / $vw-context * 1vw
@return $font
View remove_accents.php
<?php
/*
* Converts all accent characters to ASCII characters.
*
* If there are no accent characters, then the string given is just returned.
*
* @since 1.2.1
* @source https://core.trac.wordpress.org/browser/tags/4.3.1/src/wp-includes/formatting.php#L1056
*
View Client.java
package br.diegoscosta.com.socketchat;
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStreamReader;
import java.net.Socket;
public class Client
{
public static void main(String argv[]) throws Exception
View pull.sh
#!/bin/bash
# This scripts synchronize multiple repositories in sub-folders
# Usage: ./pull.sh ; to synchronize repositories in current file location
# Usage: ./pull.sh C:/Projects/ ; to synchronize other directory
# Author: Diego Costa <http://github.com/diegoscosta>
if [ "$1" ]; then
cd $1
echo "Syncing $1"
View RubyGemsSSLFix.bat
gem sources -r https://rubygems.org/
gem sources -a http://rubygems.org/
gem update --system
gem sources -r http://rubygems.org/
gem sources -a https://rubygems.org/
gem update
View wishlistr.random.dev.js
(function(){
var content = document.querySelectorAll("ul.wishlist > li");
if(content.length > 0){
var selectedContent = content[Math.floor(Math.random() * content.length )];
var detalhes = selectedContent.querySelector('div.details');
if(confirm("O item escolhido foi " + detalhes.querySelector("h4").innerText)){