Skip to content

Instantly share code, notes, and snippets.

View xavbeta's full-sized avatar

Saverio Delpriori xavbeta

  • Regione Marche
  • Matelica, MC, Italy
View GitHub Profile
@xavbeta
xavbeta / configurazione-integrazione-cohesion.ipynb
Last active November 13, 2023 07:42
Configurazione Integrazione COHESION
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
base url: http://35.189.112.175:8080
endpoints:
/topurls (cached, cache lasts 1 day, updated 04:01)
/topdomains (cached, cache lasts 1 day, updated 04:11)
/hotness (cached, cache lasts 1 hour)
/counts (cached, cache lasts 1 hour)
/cc (no cached) deletes all caches
@xavbeta
xavbeta / never-expiring-fb-page-access-token-steps.md
Last active April 27, 2017 10:08
Never-expiring Facebook access token steps (v2.8+, 2016+) from http://stackoverflow.com/a/28418469/933621

Steps taken from http://stackoverflow.com/a/28418469/933621 (Dude you're a life saver!)

  • Create Facebook App

    1. Go to My Apps.
    2. Click "+ Add a New App".
    3. Setup a website app.

    You don't need to change its permissions or anything. You just need an app that wont go away before you're done with your access token.

  • Get User Short-Lived Access Token

git init - inizializzare una repository locale
git status - stato della repository Git
git add - aggiungere modifiche
git commit [-m <commit txt>]- registra un nuovo commit
git diff - mostrare le differenze rispetto all'ultimo commit
<?php
DEFINE("DB_ADDRESS", "localhost");
DEFINE("DB_NAME", "#####");
DEFINE("DB_USER", "#####");
DEFINE("DB_PASSWORD", "#####");
function openConnection(){
// Create connection
$conn = new mysqli(DB_ADDRESS, DB_USER, DB_PASSWORD, DB_NAME);
@xavbeta
xavbeta / pdgt_adventure.aiml
Last active April 18, 2016 10:46
AIML Crash Course - PDGT Lab
<?xml version="1.0" encoding="UTF-8"?>
<aiml>
<category>
<pattern>FIGHT DEFAULT</pattern>
<template>
<random>
<li>Non essere arrabbiato</li>
<li>Con chi ce l'hai?</li>
<li>La violenza non è la soluzione</li>
</random>