Skip to content

Instantly share code, notes, and snippets.

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

Evandro Ribeiro ribeiroevandro

🏠
Working from home
View GitHub Profile
@ribeiroevandro
ribeiroevandro / setup-linux-for-web-developers.sh
Last active August 29, 2015 12:38 — forked from andrewslince/setup linux for web developers
This script installs the softwares: Skype, JDK (Java Development Kit), Google Chrome, Google Talk Plugin (It' s necessary for hangouts use), Sublime Text 3, Terminator, Git, GitK, PHP5, cURL (PHP extension), PHPUnit (For create/running unit tests with PHP), Apache Server, enable mod_rewrite for Apache (For clean url use), MySql Server, PHPMyAdmi…
#!/bin/bash
clear
echo "Please enter your e-mail:"
read email
# install google chrome
sudo apt-get install libcurl3 libnspr4-0d libxss1 -y
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome*; rm google-chrome*
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\ )-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs s udo apt-get -y purge
<div>
<h2>Categorias do site</h2>
<ul>
<li><a href="#">Início</a></li>
<li><a href="#">Quem Somos</a></li>
<?php
$args = array(
'orderby' => 'name',
'order' => 'ASC',
'title_li' => 'Departamentos',

###Adaptando o CSS da paginação do Twitter Bootstrap para o CakePHP Marcação necessária:

<div class="pagination">
  <div class="list">
    <?php
      echo $this->Paginator->prev('« Anterior', null, null, array('class' => 'prev disabled'));
      echo $this->Paginator->numbers(array('separator' => false));
      echo $this->Paginator->next('Próximo »', null, null, array('class' => 'prev disabled'));
    ?>
@ribeiroevandro
ribeiroevandro / .gitconfig
Last active December 20, 2015 10:59
Alias para GIT.
[color]
branch = auto
diff = auto
interactive = auto
status = auto
ui = true
[color "status"]
added = yellow
changed = cyan
untracked = red
@ribeiroevandro
ribeiroevandro / create-site
Last active December 21, 2015 01:08
Script for creating Virtual Servers On Apache
#!/bin/bash
# Script for creating Virtual Servers On Apache
# Check for the correct parameters
if [ $# -eq 0 ]; then
echo 'Você precisa passar o domínio a ser criado como parâmetro'
echo 'Uso: create-site your-domain.com'
exit 0
fi
@ribeiroevandro
ribeiroevandro / placeholder
Created August 17, 2013 12:20
Placeholder com jQuery e HTML5
$(document).ready(function(){
$('.inputs[placeholder]').each(function(){
var ph = $(this).attr('placeholder')
$(this).val(ph).focus(function(){
if($(this).val() == ph) $(this).val('')
}).blur(function(){
if(!$(this).val()) $(this).val(ph)
})
})
})
@ribeiroevandro
ribeiroevandro / remove-site.sh
Last active December 21, 2015 12:08
Script for remove Virtual Servers On Apache
#!/bin/bash
# Script for remove Virtual Servers On Apache
# Check for the correct parameters
if [ $# -eq 0 ]; then
echo 'Você precisa passar o domínio a ser removido como parâmetro'
echo 'Uso: remove-site your-domain.com'
exit 0
fi
<div class="content-art">
<ul>
<li>
<div class="competence-circle competence-circle-red">
<div class="competence-circle-inner">
<h6>
Organização
</h6>
</div>
</div>
class CreateUsers < ActiveRecord::Migration
def self.up
create_table :users do |t|
t.string :username
t.string :email
t.string :password_hash
t.string :password_salt
t.timestamps
end