Skip to content

Instantly share code, notes, and snippets.

View marcosfreitas's full-sized avatar
🔥
Looking forward

Marcos Freitas marcosfreitas

🔥
Looking forward
View GitHub Profile
var p;
var p2;
function Play(evnt){
console.info('call');
if(evnt == 'pause'){
console.info('pause');
//esse evento deve pausar o setTimeout em execucação
clearTimeout(p);
p2 = setTimeout(function(){
//script para mudar status das logos
function transitor(){
var time = 200;
jQuery('#bloco-clientes #clientes div').each(function(){
console.log('time', time);
var idCli = this.id; console.log('cli id', idCli);
console.info('id: ',idCli);
// 7 segundos pra mudar de banner
<?php
/**
* Add to card text
*
* @param string $text Default text.
*
* @return string New text.
*/
function cs_add_to_cart_text( $text ) {
<?php
/**
* Custom simple product price format.
*
* Adds credit cart parcels in price html.
*
* @param string $price Old price format.
*
* @return string Price format with credit card parcels.
*/
@marcosfreitas
marcosfreitas / archive-product
Last active December 22, 2015 09:38
my custom loop of woocommerce archive-product.php
<?php
/**
* The Template for displaying product archives, including the main shop page which is a post type archive.
*
* Overriding original archive-product.php
*
* @author Marcos Freitas
* @package WooCommerce/Templates
* @version 1.0
*/
@marcosfreitas
marcosfreitas / my_part_on_functions.php
Last active December 22, 2015 09:48
my custom add scripts and style to woorpress sites.
<?
# ARCHIVE ONS
wp_enqueue_style('custom_onservices', get_template_directory_uri().'/extras/custom_onservices.css',"09082013","all");
wp_enqueue_style('store style', get_template_directory_uri().'/extras/ons-store.css',"20082013","all");
# BOOTSTRAP
//wp_enqueue_style('bootstrap css', get_template_directory_uri() .'/extras/bootstrap/css/bootstrap.min.css');
wp_enqueue_style('extend bootstrap', get_template_directory_uri() .'/extras/bootstrap/extends/ons-bootstrap.css');
//wp_enqueue_style('bootstrap responsive', get_template_directory_uri() .'/extras/bootstrap/css/bootstrap-responsive.css');
namespace controlador;
require('../Modulo.php');
namespace controlador\aluno;
/*
* http://www.meusite.com.br/aluno/matricula/nova/ namespace: controlador\aluno, classe: Matricula, método: nova
*/
class Matricula extends Modulo {
public function __construct() {
/*
* Author: http://stuffandnonsense.co.uk/blog/about/hardboiled_css3_media_queries/
*/
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
@marcosfreitas
marcosfreitas / mfplayer.js
Last active December 27, 2015 18:29
Source of jQuery mini player using HTML 5.
// Player
$('audio').get(0).controls = false;
/*$('#player').click(function(){
p = $(this);
if(p.hasClass('mutted')){
p.removeClass('mutted');
$('audio').get(0).currentTime=0;
$('audio').get(0).play();
}else{
p.addClass('mutted');
@marcosfreitas
marcosfreitas / mfplayer.html
Last active December 27, 2015 18:29
Structure of MF player with HTML 5
<section id="player" class="span1 mutted" style="display:none">
<audio id="onsplayer">
<source src="//gisca.com.br/novo/onservices/player/Jingle_Gisca_Emp_versao_01.ogg" type="audio/ogg">
<source src="//gisca.com.br/novo/onservices/player/Jingle_Gisca_Emp_versao_01.mp3" type="audio/mpeg">
Seu browser não suporta todas as funcionalidades deste site. Atualize-o.
</audio>
<div class="clearfix"></div>
</section>