Skip to content

Instantly share code, notes, and snippets.

// You can find all three of these in the "Account Details" section of your Cloudinary Dashboard.
var cloudinaryCloudName = "";
var cloudinaryApiKey = "";
var cloudinaryApiSecret = "";
// Upload a semi-transparent PNG file to your Cloudinary account. This semi-transparent image will be used as the watermark. Then, enter the name (Public ID) of that image below. Learn more at http://cloudinary.com/blog/adding_watermarks_credits_badges_and_text_overlays_to_images
var watermarkImageName = "";
@bacanapps
bacanapps / csv-to-json.php
Created August 3, 2017 20:03 — forked from robflaherty/csv-to-json.php
Convert CSV to JSON
<?php
/*
* Converts CSV to JSON
* Example uses Google Spreadsheet CSV feed
* csvToArray function I think I found on php.net
*/
header('Content-type: application/json');
// Set your CSV feed
@bacanapps
bacanapps / phone-number-regex
Created July 11, 2017 17:40 — forked from wiltonbsilva/phone-number-regex
Regular Expression to match Brazilian (cell)?phone numbers
RegEx:
(^|\()?\s*(\d{2})\s*(\s|\))*(9?\d{4})(\s|-)?(\d{4})($|\n)
Test:
11957375429
Test:
11 976546863
11 976542345
11 97654 9753
(11) 98765 1234
@bacanapps
bacanapps / cep-regex
Created July 11, 2017 17:40 — forked from wiltonbsilva/cep-regex
Regular Expression to match Brazilian zipcodes (CEP)
RegEx:
(\d{5})-?(\d{3})
Test:
09930-360
Test:
09930360
Test:
09930 777
@bacanapps
bacanapps / cpf-regex
Created July 11, 2017 17:39 — forked from wiltonbsilva/cpf-regex
Regular Expression to match a Brazilian CPF (similar to an SSN)
RegEx:
^([-\.\s]?(\d{3})){3}[-\.\s]?(\d{2})$
Test:
345.753.428-40
Test:
345.753.422.99
Test:
123-543-667.54
Test:
@bacanapps
bacanapps / business-models.md
Created April 27, 2017 17:22 — forked from ndarville/business-models.md
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
#!/usr/bin/env bash
# Assuming OS X Yosemite 10.10.4
# Install XCode and command line tools
# See https://itunes.apple.com/us/app/xcode/id497799835?mt=12#
# See https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcode-select.1.html
xcode-select --install
# Install the Homebrew package manager if you don't already use it; see source http://brew.sh
/* ===========================================================
* bootstrap-tooltip.js v2.2.2
* http://twitter.github.com/bootstrap/javascript.html#tooltips
* Inspired by the original jQuery.tipsy by Jason Frame
* ===========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
/* ===========================================================
* bootstrap-popover.js v2.0.1
* http://twitter.github.com/bootstrap/javascript.html#popovers
* ===========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
<?php
/**
* @file
* Default theme implementation to display the basic html structure of a single
* Drupal page.
*
* Variables:
* - $css: An array of CSS files for the current page.
* - $language: (object) The language the site is being displayed in.