Skip to content

Instantly share code, notes, and snippets.

View victorferraz's full-sized avatar

Victor victorferraz

View GitHub Profile
@victorferraz
victorferraz / noticias_model
Created May 2, 2012 00:55
Sidebar Tutorial
<?php
/*
* @package Noticias
* @version 1.0
* @author Victor Ferraz
* @copyright Copyright (c) 2011, Victor Ferraz
* @license http://www.gnu.org/licenses/gpl-3.0.txt
*/
class Noticias_model extends My_Model {
@victorferraz
victorferraz / sidebar
Created May 2, 2012 00:57
Sidebar Tutorial
<?php
/*
* @package Sidebar
* @version 1.0
* @author Victor Ferraz
* @copyright Copyright (c) 2011, Victor Ferraz
* @license http://www.gnu.org/licenses/gpl-3.0.txt
*/
class Sidebar
{
@victorferraz
victorferraz / autoload_sidebar
Created May 2, 2012 01:10
Sidebar Tutorial
$autoload['libraries'] = array(`sidebar');
$autoload['libraries'] = array(`sidebar');
#button {
width: 200px;
height: 50px;
padding: 10px;
border: solid 1px #ccc;
background: linear-gradient(#ccc, #222);
border-radius: 10px;
box-shadow: rgba(0, 0, 0, .5) 2px 2px 5px;
}
.button {
width: 200px;
height: 50px;
padding: 10px;
}
.header {
width: 800px;
}
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0-wip/css/bootstrap.min.css">
<style>
.button {
padding: 10px;
# remgit.sh
# Creates a remote git repository from the current local directory
# Configuration
# Replace SSH_USERNAME, SSH_HOST, SSH_GIT_PATH with your details
USER=SSH_USERNAME
HOST=SSH_HOST
GIT_PATH=SSH_GIT_PATH
REPO=${PWD##*/}
@victorferraz
victorferraz / gist:6664598
Created September 22, 2013 22:47
convert px to em
$base-font-size: 14px;
@function em($px : 0, $base: $base-font-size) {
$value : 0;
@if $px > 0 and $base > 0{
$value : ($px / $base) * 1em;
}@else{
$value : 0;
}
@return $value;
apt-get install -y ppa-purge
add-apt-repository -y ppa:ondrej/php5-oldstable
apt-get update
ppa-purge ppa:ondrej/php5
apt-get update && apt-get upgrade -y && apt-get autoremove -y && apt-get autoclean -y