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
//questo ti serve solo se vuoi mandare notifiche via web | |
//semplicemente registra una macchina ad un id, così tu poi puoi mandare notifiche anche ai singoli client | |
link(rel="manifest" href="/manifest.json") //il file manifest te lo da onesignal | |
script(src="https://cdn.onesignal.com/sdks/OneSignalSDK.js" async) | |
script. | |
var OneSignal = window.OneSignal || []; | |
OneSignal.push(["init", { | |
appId: "il-tuo-id", | |
autoRegister: true, | |
notifyButton: { |
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
<?php | |
//il seguente snippet per fare richiesta get e cercare una carta per nome | |
//funzione che ti fa la chiamata | |
function trovaCarta($nome_carta_da_cercare){ | |
$richiesta = file_get_contents("https://api.scryfall.com/cards/named?fuzzy=".$nome_carta_da_cercare ); | |
//attenzione: non va fatto json_ecnode() perchè già json | |
//attenzione: se va trattata in php come array multidim va fatto json_decode() | |
return $richiesta; | |
} | |
//questo lo uso solo per stampare il rislutato, il set dell'header va tolto se non elabori il json in javascript chiamando questa funzione |
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 rp = require('request-promise'); | |
var absolute_path="http://api.cineprime.it" | |
var richiesta={}; | |
richiesta.simple=function(url,header,callback){ | |
var options = { | |
uri: absolute_path+url, | |
headers: header, | |
json: true | |
}; |
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
//necessari moment e reques come moduli! | |
router.get('/tokenfromfblogin', function (req, res) { | |
var exp=moment().add(1, 'days').valueOf(); | |
var token = req.headers['fbtoken']; //passo nell'header il toke facecbook dellutente | |
const options = { | |
method: 'GET', | |
uri: `https://graph.facebook.com/v2.11/me?fields=id,name,email`, | |
qs: { | |
access_token: token, | |
} |
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
//includo libreria | |
var mialib=require('./posizione-libreria.js'); | |
//chiamo una funzione sincrona | |
var risultato1=mialib.miafunzione(1,2) | |
//chiamo una funzione asincrona | |
var risultato2; | |
mialib.funzioneasync(1,2,function(risultato){ | |
risultato2=risultato; | |
}); |
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
extends layout | |
block content | |
form(action='/login' method='post') | |
p User: | |
input(type='text' name='user' required) | |
p Password: | |
input(type='password' name='password' required) | |
p | |
button(type='submit') Accedi |
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
export PATH=$PATH:/opt/PostgreSQL/10/pgAdmin\ 4/bin |
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
//spam_bot per www.segnalatac.it per form senza captcha | |
//#HO TO: | |
//npm install requestify | |
//node spam_bot_sa.js | |
var richiesta=require('requestify'); | |
let i = 0; | |
var messaggio='ciao'; | |
let delaywaiting=1000; | |
function richiestaRicorsiva(i) { | |
setTimeout(() => { |
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
@font-face { | |
font-family: 'Pe-icon-7-stroke'; | |
src:url('../fonts/Pe-icon-7-stroke.eot?d7yf1v'); | |
src:url('../fonts/Pe-icon-7-stroke.eot?#iefixd7yf1v') format('embedded-opentype'), | |
url('../fonts/Pe-icon-7-stroke.woff?d7yf1v') format('woff'), | |
url('../fonts/Pe-icon-7-stroke.ttf?d7yf1v') format('truetype'), | |
url('../fonts/Pe-icon-7-stroke.svg?d7yf1v#Pe-icon-7-stroke') format('svg'); | |
font-weight: normal; | |
font-style: normal; | |
} |
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
/*! | |
========================================================= | |
* Light Bootstrap Dashboard - v1.3.1.0 | |
========================================================= | |
* Product Page: http://www.creative-tim.com/product/light-bootstrap-dashboard | |
* Copyright 2017 Creative Tim (http://www.creative-tim.com) | |
* Licensed under MIT (https://github.com/creativetimofficial/light-bootstrap-dashboard/blob/master/LICENSE.md) | |
NewerOlder