Skip to content

Instantly share code, notes, and snippets.

@pinguineras
pinguineras / PmtValue.php
Created September 17, 2015 21:00
PMT Calculation on PHP
<?php
/**
* Return the PMT Value / PHP (Brazil)
* @author Júlio César Gonçalves de Oliveira <julio@pinguineras.com.br>
* @response Integer
*
**/
$initialValue = 600;
$tax = 10; // %
@pinguineras
pinguineras / jquery.cycle.all.js
Created October 22, 2014 13:39
Jquery Cycle1 with no width and height setting
/*!
* jQuery Cycle Plugin (with Transition Definitions)
* Examples and documentation at: http://jquery.malsup.com/cycle/
* Copyright (c) 2007-2013 M. Alsup
* Version: 3.0.3 (11-JUL-2013)
* Dual licensed under the MIT and GPL licenses.
* http://jquery.malsup.com/license.html
* Requires: jQuery v1.7.1 or later
*/
;(function($, undefined) {
@pinguineras
pinguineras / jquery.cycle.all.js
Last active August 29, 2015 14:07
Jquery Cycle 1 With no width resize container (Modificação da linha 373)
/*!
* jQuery Cycle Plugin (with Transition Definitions)
* Examples and documentation at: http://jquery.malsup.com/cycle/
* Copyright (c) 2007-2013 M. Alsup
* Version: 3.0.3 (11-JUL-2013)
* Dual licensed under the MIT and GPL licenses.
* http://jquery.malsup.com/license.html
* Requires: jQuery v1.7.1 or later
*/
;(function($, undefined) {
@pinguineras
pinguineras / application.html
Created September 3, 2014 18:57
Callback de curtida no Facebook
<div class="fb-like" data-href="{HREF}" data-send="false" data-width="100%" data-show-faces="false"></div>
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({appId: '{APPID}', status: true, cookie: true, xfbml: true});
FB.Event.subscribe('edge.create', function(href, widget) {
alert('Legal, você curtiu o link: ' + href);
});
FB.Event.subscribe('edge.remove', function(href, widget) {
@pinguineras
pinguineras / app.js
Created September 3, 2014 18:53
ScrollToFixed fix to FESB
$(function(){
$(<element>).scrollToFixed({
preFixed: function() {
},
preAbsolute: function() {
$(this).css({'opacity':'0'});
},
postFixed: function() {},
postAbsolute: function(){
$(this).css({'opacity':'1'});
@pinguineras
pinguineras / order.php
Created March 20, 2014 17:01
Opencart 2.0 - /admin/controller/sale/order.php
<?php
class ControllerSaleOrder extends Controller {
private $error = array();
public function index() {
$this->load->language('sale/order');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('sale/order');