Skip to content

Instantly share code, notes, and snippets.

//
// Currency Middleware
// -----------------------------------------------------------------------------
app.use((req, res, next) => {
const cookie = {
name: "currency",
options: {
path: "/",
maxAge: 3650 * 24 * 3600 * 1000, // 10 years in miliseconds
},
@rmoura-92
rmoura-92 / gist:688c8f023a9e33953d6e
Created December 16, 2014 12:13
SVG to PNG problem no decode delegate for this image format `' @ error/blob.c/BlobToImage/364 !HELP!
// PHP
$destinationPath = 'uploads/png/';
$filename = uniqid().'.png';
$svg = Input::get('canvas');
$path = $destinationPath.$filename;
$im = new Imagick();
$im->setBackgroundColor(new ImagickPixel('transparent'));
$im->readImageBlob($svg); // erro: "no decode delegate for this image format `' @ error/blob.c/BlobToImage/364"
$im->setImageFormat("png32");

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

@rmoura-92
rmoura-92 / details.js
Created October 10, 2013 10:40
paritlhaPorEmail
partilhaPorEmail: function(e) {
e.preventDefault();
e.stopPropagation();
if(this.model) {
var model = this.model.toJSON();
page = App.CurrentView.split('/')[0];
switch(page) {
case 'ferias':
case 'escapadinhas':
var body = _.first(_.last(model.detalhes)).coditions
@rmoura-92
rmoura-92 / Delegate.m
Created September 26, 2013 11:16
delegate.m
/**
* This is what you need to add to your applicationDidFinishLaunching
*/
- (void)applicationDidFinishLaunching:(UIApplication *)application
{
// Add registration for remote notifications
[[UIApplication sharedApplication]
registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)];
// Clear application badge when app launches
@rmoura-92
rmoura-92 / ignite.js
Created September 17, 2013 16:35
ignite
// Filename: ignite.js
define(
[
'jquery',
'underscore',
'backbone',
'collections/voos',
'collections/hoteis',
'collections/ferias',
@rmoura-92
rmoura-92 / router.js
Created September 17, 2013 16:23
routes
escapadinhasPagamento: function(id) {
var self = this;
var model;
this.before(function() {
App.Views.Home.hide();
App.Views.Start.holdBackground();
if(localStorage) {
detalhe = localStorage.getItem('escapadinhasLastDetalhe');
if(detalhe) {
@rmoura-92
rmoura-92 / ferias.js
Created September 12, 2013 16:29
last
getLast: function() {
/* clone = this.clone().toJSON();
this.reset(clone, function(col, opt) {
console.log(col, opt)
});*/
this.trigger('ola', this);
},
@rmoura-92
rmoura-92 / items.js
Created September 12, 2013 16:29
collection trigger
initialize: function() {
var self = this;
this.$el.empty();
this.item = new Item({collection:this.collection});
page = App.CurrentView.split('/')[0];
if(page == 'voos') {
this.$el.addClass('flight-items');
}

Contrato Arrasador 3

Atualizado em: 11/07/2012

Entre nós [nome da empresa] e você [nome do cliente]

Sumário:

Nós faremos o melhor para satisfazer suas necessidades e atender suas expectativas, mas é importante registrar tudo por escrito para que todos conheçam suas responsabilidades (quem faz o quê) e saibam o que acontece quando algo dá errado. Neste contrato você não encontrará termos jurídicos complicados ou textos longos e incompreensíveis. Nós não temos interesse em fazê-lo assinar algo que poderá se arrepender depois. O que nós queremos é o melhor para os dois lados, agora e no futuro.