This file contains hidden or 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() { | |
angular.module('app').factory('firebaseTool', firebaseTool); | |
function firebaseTool(){ | |
var service = {}; | |
service.create = function(url, objeto){ | |
var nova_chave = firebase.database().ref().child(url).push().key; |
This file contains hidden or 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
<?php | |
error_reporting(E_ALL); | |
ini_set('display_errors', 1); | |
function createImage($filename){ | |
$pathinfo = pathinfo($filename); | |
$info = getimagesize($filename); |
This file contains hidden or 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
// Cria um objeto | |
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB; | |
// Abre (ou cria) o banco | |
var open = indexedDB.open("Freeburguer", 1); | |
// Cria o esquema | |
open.onupgradeneeded = function() { | |
var db = open.result; | |
var store = db.createObjectStore("lanches", {keyPath: "id"}); |
This file contains hidden or 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
#!/usr/bin/env node | |
var del = require('del'); | |
var fs = require('fs'); | |
var path = require('path'); | |
// Diretório para excluir | |
var diretorio = 'platforms/android/assets/www/bower_components/'; | |
function verificarDiretorio(diretorio, expressaoRegular, callback){ |
This file contains hidden or 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
module.exports = function(ctx) { | |
// Se certifica de ter a plataforma android | |
if (ctx.opts.platforms.indexOf('android') < 0) { | |
return; | |
} | |
// Inicializa as dependencias nodejs | |
var fs = ctx.requireCordovaModule('fs'), | |
path = ctx.requireCordovaModule('path'), |
This file contains hidden or 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
{ "eventKey" : "LIKE", //REQUIRED String que representa o evento que gera o alerta | |
"loginReceiver" : "diogosm", //REQUIRED (alias, idpId or userCode) quem receberá o alerta | |
"priority" : "NORMAL", // Options: NONE (Doesn't send notification), LOW, NORMAL and HIGH | |
"object" : { // o objeto do alerta, como documento, postagem, imagem ou processo | |
"alertObjectId" : "1", // o número de identificação exclusivo do objeto | |
"alertObjectTypeDescriptionKey" : "Contract", // descrição do tipo de objeto | |
"alertObjectDescription" : "Agreement document", // a descrição do objeto mostrada no alerta | |
"alertObjectLink" : "/ecmnavigation?app_ecm_navigation_doc=7", // o link para acessar o objeto | |
"alertObjectDetailKey" : "from last Monday meeting", // (OPTIONAL) detalhes da chave | |
"alertObjectNote" : "Approved by the board members" // (OPTIONAL) a nota de objeto para informações extras, permite até 600 caracteres |
This file contains hidden or 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 pesquisa = "Diogo So"; | |
var query = db | |
.ref('albuns') | |
.orderByChild('nome') | |
.startAt(pesquisa) | |
.endAt(pesquisa + "\uf8ff"); | |
query.on('value', function(snapshot){ | |
if (snapshot.val()){ |
This file contains hidden or 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
Anonymous UUID: 217AD8CA-3F97-8F7B-FC29-9D7E60A9765B | |
Wed Sep 4 19:33:49 2019 | |
*** Panic Report *** | |
panic(cpu 0 caller 0xffffff80012b8a8f): initproc exited -- exit reason namespace 2 subcode 0xa description: none | |
uuid info: | |
0x10f9e9000 uuid = <3eba447f-a546-366b-b302-8dc3b21a3e30> | |
0x10460b000 uuid = <ae67e27b-133c-3e19-b3e1-d8151233254d> |
This file contains hidden or 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
user nginx; | |
worker_processes 1; | |
error_log /var/log/nginx/error.log warn; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} |
This file contains hidden or 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
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |