Skip to content

Instantly share code, notes, and snippets.

@luizeof
luizeof / mautic-form.js
Last active October 6, 2021 20:53
Manipulando Eventos de um formulário e enviando para o Mautic
<script>
// Coloque em qualquer parte do código
document.addEventListener('DOMContentLoaded', function () {
// Aqui você coloca o ID do seu formulário que será manipulado
document.getElementById("myForm").onsubmit = function(e) {myFunction(e)};
function myFunction(e) {
// altere aqui a url do seu mautic
@ptheofan
ptheofan / cloudflare_https_prefix.php
Created March 21, 2017 21:05
Cloudflare flexible SSL - trick PHP scripts to identify HTTPS when cloudflare reports it was HTTPS request
<?php
/*
Instructions
Go to your php.ini for the web scripts (pointless for cli scripts)
Make the following adjustment
auto_prepend_file = full/path/to/clousflare_https_prefix.php
reload/restart php service (or apache if running via apache)
How this works
@guiliredu
guiliredu / feriados-brasileiros-em-php.php
Last active June 15, 2024 02:40
Retorna um array com todos os feriados brasileiros
<?php
function dias_feriados($ano = null)
{
if (empty($ano)) {
$ano = intval(date('Y'));
}
$pascoa = easter_date($ano); // Limite de 1970 ou após 2037 da easter_date PHP consulta http://www.php.net/manual/pt_BR/function.easter-date.php
$dia_pascoa = date('j', $pascoa);
@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'];
@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
@PurpleBooth
PurpleBooth / README-Template.md
Last active June 20, 2024 01:55
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

@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
@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) {
@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) {