Skip to content

Instantly share code, notes, and snippets.

Working from home

Ever Daniel Barreto everdaniel

Working from home
View GitHub Profile
View gist:8967762
{{ streams:cycle stream="sliders" }}
{{ entries }}
{{ if page:slug == stream_field:slug }}
Text goes here if same id's
{{ endif }}
{{ /streams:cycle }}
View aumentacoment.php
function aumentacoment($idtema_foro) {
$this->db->set('comentarios', 'comentarios + 1', FALSE);
$this->db->where('idtema_foro', $idtema_foro);
return $this->db->update('tema_foros', $data);
View insertacomenta.php
public function insertacomenta($idtema_foro = NULL) {
if (is_null($idtema_foro)) {
// podes mostrar una página de error
show_error('ID Tema no disponible');
// o podes hacer un redirect
$this->session->set_flashdata('error', 'ID Tema no disponible');
everdaniel / gmap3.js
Created Apr 23, 2014
Driving Directions / GMap3
View gmap3.js
var destinations = new Array();
destinations.push('Wattle Glen, Diamond Creek, Victoria 3089');
destinations.push('Watsonia, Diamond Creek, Victoria 3089');
destinations.push('St Helena, Diamond Creek, Victoria 3089');
destinations.push('Plenty, Diamond Creek, Victoria 3089');
destinations.push('Montmorency, Diamond Creek, Victoria 3089');
destinations.push('Hurstbridge, Diamond Creek, Victoria 3089');
destinations.push('Bundoora, Diamond Creek, Victoria 3089');
destinations.push('Doreen, Diamond Creek, Victoria 3089');
destinations.push('Eltham, Diamond Creek, Victoria 3089');
everdaniel / driving.html
Created Apr 23, 2014
Driving Directions / v2
View driving.html
<p>Get driving directions from your neighborhood:</p>
<a href="#" class="driving-directions" data-origin="Wattle Glen, Diamond Creek, Victoria 3089">From Wattle Glen</a>
<a href="#" class="driving-directions" data-origin="Watsonia, Diamond Creek, Victoria 3089">From Watsonia</a>
<a href="#" class="driving-directions" data-origin="St Helena, Diamond Creek, Victoria 3089">From St Helena</a>
<a href="#" class="driving-directions" data-origin="Plenty, Diamond Creek, Victoria 3089">From Plenty</a>
<a href="#" class="driving-directions" data-origin="Montmorency, Diamond Creek, Victoria 3089">From Montmorency</a>
<a href="#" class="driving-directions" data-origin="Hurstbridge, Diamond Creek, Victoria 3089">From Hurstbridge</a>
<a href="#" class="driving-directions" data-origin="Bundoora, Diamond Creek, Victoria 3089">From Bundoora</a>
<a href="#" class="driving-directions" data-origin="Doreen, Diamond Creek, Victoria 3089">From Doreen</a>
<a href="#" class="driving-directions" data-origin="Eltham, Diamond Creek, Vic
View gist:11269430
if( $('#map2').length > 0) {
var map2 = $('#map2'),
map_lat2 ='lat'),
map_ing2 ='ing');
// init the map and create a cluster with some markers
#config groups
#rds verifying commands
everdaniel / functions.php
Created Feb 6, 2013
JS Namespace en WordPress
View functions.php
// Define Esencia JS Namespace
function esencia_js_namespace() {
?><script type="text/javascript">
/* <![CDATA[ */
// Global Esencia Namespace
window.esencia = window.esencia || {};
// Theme Namespace
esencia.theme = esencia.theme || {};
View widget-cine.php
$args = array(
'numberposts' => 18,
'orderby' => 'post_date',
'post_type' => 'cartelera'
$posts = get_posts( $args );
if ( count( $posts ) > 0 ) :
<div class="cinema">
View itau.rb
# encoding: UTF-8
require 'mechanize'
require 'money'
require 'ostruct'
module Itau
class Session <, :pass)
def login
login_page = agent.get(itaurl)