Skip to content

Instantly share code, notes, and snippets.

@arthursoares
arthursoares / gist:7993995
Last active December 31, 2015 13:39
acho que ficou assim
<?php
// Inclui a API
require('_api.php');
// Prepara o XML
$opportunity_xml = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<opportunity>
<name>' . $_POST['LEAD'] .'</name>
<description>Cliente se cadastrou pelo hotsite e gostaria de mais informações sobre: ' . $_POST['LEAD'] .'</description>
@arthursoares
arthursoares / gist:8062156
Created December 20, 2013 21:43
saca esse
$uri = 'https://mandrillapp.com/api/1.0/messages/send.json';
$postString = '{
"key": "YOUR KEY HERE",
"message": {
"html": "this is the emails html content",
"text": "this is the emails text content",
"subject": "this is the subject",
"from_email": "someone@example.com",
"from_name": "John",
@arthursoares
arthursoares / form.html
Created December 26, 2013 17:17
Cada $_POST é um "name" que algum <INPUT> dentro do form tem. Você vai precisar criar uma conta no mandrill (free) e pegar a API Key. Você customiza abaixo conforme os campos e os dois arquivos que você precisar. :)
<form action="post.php" method="post" role="form" id="form-contato">
<div class="form-group">
<div class="col-sm-12 col-md-6">
<input type="text" name="FIRST_NAME" class="form-control" placeholder="Nome *"/>
</div>
<div class="col-sm-12 col-md-6">
<input type="tel" name="LAST_NAME" class="form-control" placeholder="Sobrenome *"/>
</div>
</div>
@arthursoares
arthursoares / Nexudus.md
Created January 21, 2014 19:12
Escopo básico do sistema

#Nexudus

##Recursos

Recursos são serviços ou coisas físicas que são cobradas quando utilizadas.

###Forma de cobrança

Os recursos podem ser cobrados por minutos ou por utilização.

@arthursoares
arthursoares / nexudus.xml
Last active August 29, 2015 13:57
Arquivo de linguagem pro Nexudus
<?xml version="1.0" encoding="UTF-8"?>
<languages>
<language name="English" culture="en">
<token name="A few simple forms to become a member" value="After you have spent FREE DAY with us - fill a few forms to become a member." />
<token name="AboutTitle" value="About {0}" />
<token name="AcceptTandC" value="Please accept terms and conditions" />
<token name="AgendaFormat" value="h:mm - h:mm" />
<token name="Allowances" value="Allowances" />
<token name="AxisFormat" value="h(:mm)tt" />
<token name="Blog" value="Startups+Teams" />
@arthursoares
arthursoares / tech.md
Created May 15, 2014 15:27
Exemplos tech
transaction_subject=15818877&payment_date=12:57:32 Jun 05, 2014 PDT&txn_type=web_accept&last_name=Henriques&residence_country=BR&item_name=NEX Batel: C9312303000030&payment_gross=&mc_currency=BRL&business=cadastros@nexcoworking.com.br&payment_type=instant&protection_eligibility=Ineligible&verify_sign=A.YWKPt9TvcFbuy9EVwOF3w4b6juAU25ns.hS92vzMD0q8dCj4ZzuxXI&payer_status=verified&tax=0.00&payer_email=arthur@arthursoares.com&txn_id=66K53067GM5255904&quantity=1&receiver_email=cadastros@nexcoworking.com.br&first_name=Arthur&payer_id=3JW7EQG2V7UL8&receiver_id=43FLX363BG92N&item_number=&handling_amount=0.00&payment_status=Completed&payment_fee=&mc_fee=0.66&shipping=0.00&mc_gross=1.00&custom=15818877&charset=windows-1252&notify_version=3.8&ipn_track_id=eb074341e9600
http://nex.spaces.nexudus.com/CallBacks/PayCoworkerInvoice/OK/PayPalStandard/15825839/15818877?PayPalIPN=true
@arthursoares
arthursoares / resources.htm
Last active August 29, 2015 14:02
resources.htm
{% extends master.master %}
{% block content %}
<div id="wrapper">
<!-- CONTAINER -->
<div id="main" class="container">
<!-- BREADCRUMB -->
<ul class="breadcrumb">
<li><a href="{% Url PublicHome, Index %}">{% T Home %}</a> <span class="divider">/</span></li>
<li class="active">{% T Space resources %}</li>
<!-- HEADER -->
<header class="navbar navbar-static-top">
<div class="navbar-inner">
<div class="container" style="min-height:100px">
<!-- LOGO OR SPACE NAME -->
{% if data.Business.HasLogo %}
<h1 class="pull-left"><a href="/"><img src="{% Url Business, GetLogo, h:80 %}" alt="logo"></a></h1>
{% else %}
<h1 style="margin-top:40px; margin-bottom:30px" class="pull-left">{{ data.Business.Name }}</h1>
<?php
$text = "Olá, como vai você ?";
$lang = "pt-BR";
// Name of the MP3 file generated using the MD5 hash
// Added things to prevent bug if you want the same sentence in two different languages
$file = md5($lang."?".urlencode($text));
// Save the MP3 file in this folder with the .mp3 extension