Skip to content

Instantly share code, notes, and snippets.

@davist11
davist11 / Fancy File Inputs.js
Created October 25, 2010 21:32
Fancy File Inputs
var SITE = SITE || {};
SITE.fileInputs = function() {
var $this = $(this),
$val = $this.val(),
valArray = $val.split('\\'),
newVal = valArray[valArray.length-1],
$button = $this.siblings('.button'),
$fakeFile = $this.siblings('.file-holder');
if(newVal !== '') {
@ografael
ografael / combo_dinamico.html
Created March 14, 2012 15:12
Carregar combo com JQuery - Cidades e Estados
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<script type="text/javascript" src="jquery-1.7.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$.getJSON('estados_cidades.json', function (data) {
@davidchc
davidchc / FretePagSeguro.php
Last active March 23, 2020 22:58
Classe Para Retornar o valor do Frete do Simulador do PagSeguro
<?php
class FretePagSeguro{
private $cepOrigem;
private $cepDestino;
private $peso;
private $preco;
private $url = 'https://pagseguro.uol.com.br/desenvolvedor/simulador_de_frete_calcular.jhtml?postalCodeFrom=%s&weight=%s&value=%s&postalCodeTo=%s';
private $sedex;
private $pac;
@javajack
javajack / jquery.gdocsviewer.js
Created December 10, 2013 19:18
A JQuery Plugin for Google Doc Viewer Iframe Embeding http://jsfiddle.net/javajack/4s8bn/embedded/result/
/*
* jQuery.gdocViewer - Embed linked documents using Google Docs Viewer
* Licensed under MIT license.
* Date: 2011/01/16
*
* @author Jawish Hameed
* @version 1.0
*/
(function($){
$.fn.gdocsViewer = function(options) {
@onefriendaday
onefriendaday / view_cart.html
Last active December 28, 2023 23:01
Pagseguro checkout transparent
<script type="text/javascript" src="https://stc.pagseguro.uol.com.br/pagseguro/api/v2/checkout/pagseguro.directpayment.js"></script>
<script type="text/javascript">
var paymentModule = 'pagseguro_app';
checkoutCallbacks.add(pagseguroCheckout);
function pagseguroCheckout() {
if ($('input[name=module]').val() == paymentModule) {
@sim642
sim642 / DI.m3u
Created July 5, 2015 12:52
Digitally Imported premium streams
#EXTM3U
#EXTINF:-1,Digitally Imported - Ambient
http://pub1.diforfree.org:8000/di_ambient_hi
#EXTINF:-1,Digitally Imported - Big Room House
http://pub1.diforfree.org:8000/di_bigroomhouse_hi
#EXTINF:-1,Digitally Imported - Breaks
http://pub1.diforfree.org:8000/di_breaks_hi
@PurpleBooth
PurpleBooth / README-Template.md
Last active June 25, 2024 09:23
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@mojaray2k
mojaray2k / instafeedjsaccess.md
Last active May 22, 2022 10:40
Getting Instagram Access Token for http://intafeedjs.com

#Use this URL to get your client authorized for Instafeed.JS plugin for Instagram.

  1. First login into your Instargam account
  2. Then go to https://www.instagram.com/developer/
  3. At the top click on the Button that says "Manage Clients".
  4. If you have not Register a new client.
  5. Fill out everything and where it says redirect url put this url: http://instafeedjs.com
  6. Then on the security tab make sure you uncheck "Disable implicit OAuth"
  7. Finally use this link to authoruize Instafeed. Where it says "[Client ID]" replace that including the brackets with your clientID from instagram:
  8. https://instagram.com/oauth/authorize/?client_id=[Client ID]&redirect_uri=http://instafeedjs.com&amp;response_type=token
@guiliredu
guiliredu / pagseguro-assinatura.php
Last active August 1, 2023 01:05
Exemplo de pagamento e assinatura pelo PagSeguro com PHP e CURL
<?php
$url = 'https://ws.pagseguro.uol.com.br/v2/pre-approvals/request';
$data['email'] = 'email_vendedor@gmail.com';
$data['token'] = 'TOKEN';
$data['currency'] = 'BRL';
$data['reference'] = $id_cliente;
$data['senderName'] = $cliente['nome'];