-
Segurança - Cabeçalho HTTP Strict-Transport-Security Ausente Nosso amiguinho explica bem aqui: http://gutocarvalho.net/octopress/2012/11/29/entendendo-o-hsts/
-
X-Content-Type-Options https://kb.sucuri.net/warnings/hardening/headers-x-content-type
-
Content-Security-Policy http://blog.caelum.com.br/content-security-policy-uma-arma-eficaz-contra-ataques-xss/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
curl 'http://api.fieldcontrol.com.br/orders/' -H 'Content-Type: application/json;charset=UTF-8' -H 'x-access-token: seu-token-aqui' --data-binary $'{ | |
"address": { | |
"zipCode": "05005900", | |
"city": "Sao Paulo", | |
"state": "SP", | |
"street": "Rua Turiassu", | |
"number": "902", | |
"complement": null, | |
"neighborhood": null, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
if (!String.prototype.endsWith) { | |
String.prototype.endsWith = function(searchStr, Position) { | |
// This works much better than >= because | |
// it compensates for NaN: | |
if (!(Position < this.length)) | |
Position = this.length; | |
else | |
Position |= 0; // round position |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select row_to_json(tasks) as tasks | |
from ( | |
select | |
id | |
from | |
tasks | |
where id = '71bb6799-da97-45e3-98eb-db1b14e4b79d' | |
) as tasks; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_static_style(styles) { | |
var result = []; | |
styles.forEach(function(v, i, a){ | |
var style=''; | |
if (v.stylers.length > 0) { // Needs to have a style rule to be valid. | |
style += (v.hasOwnProperty('featureType') ? 'feature:' + v.featureType : 'feature:all') + '|'; | |
style += (v.hasOwnProperty('elementType') ? 'element:' + v.elementType : 'element:all') + '|'; | |
v.stylers.forEach(function(val, i, a){ | |
var propertyname = Object.keys(val)[0]; | |
var propertyval = val[propertyname].toString().replace('#', '0x'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Africa/Abidjan | |
Africa/Accra | |
Africa/Addis_Ababa | |
Africa/Algiers | |
Africa/Asmara | |
Africa/Asmera | |
Africa/Bamako | |
Africa/Bangui | |
Africa/Banjul | |
Africa/Bissau |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
'use strict'; | |
angular.module('app.offline') | |
.factory('httpOfflineCacheStorage', httpOfflineCacheStorage); | |
function httpOfflineCacheStorage(Loki) { | |
var _cacheDb = null; | |
var _requests = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Restify Server CheatSheet. | |
// More about the API: http://mcavage.me/node-restify/#server-api | |
// Install restify with npm install restify | |
// 1.1. Creating a Server. | |
// http://mcavage.me/node-restify/#Creating-a-Server | |
var restify = require('restify'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _ = require('underscore')._; | |
var Task = (function() { | |
function Task(description) { | |
this.id = 1; | |
this.description = description; | |
} | |
Task.prototype.reportAsProblem = function(problemDescription) { | |
this.problemDescription = problemDescription; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Download the following ZIPs: | |
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links) | |
Download the correct GApps for your Android version: | |
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip) | |
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip) | |
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip) | |
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip) | |
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip) |