Skip to content

Instantly share code, notes, and snippets.

View fcannizzaro's full-sized avatar

Francesco Saverio Cannizzaro fcannizzaro

  • Palermo , Italy
  • 14:24 (UTC +02:00)
View GitHub Profile
[
{
"type": "character",
"start": 0,
"end": 1683043140,
"image": "https://webstatic.hoyoverse.com/upload/op-public/2023/04/10/c9478b85eef66221707dff01baf7f983_403546969743394661.jpg"
},
{
"type": "weapon",
"start": 0,
@fcannizzaro
fcannizzaro / media-keyboard.user.js
Created December 14, 2017 12:23
use media key to play/pause HTML5 video
// ==UserScript==
// @name Media Keyboard
// @version 0.1
// @description try to take over the world!
// @author Francesco Cannizzaro
// @match *://*/*
// ==/UserScript==
(function() {
'use strict';
@fcannizzaro
fcannizzaro / bintree.c
Last active November 20, 2020 06:43
Binary Tree C implementation
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
#define TEST_NUMBER 100
typedef struct node{
struct node * l, * r;
int value;
} node;
@fcannizzaro
fcannizzaro / InfiniteScroll.kt
Last active August 28, 2017 10:47
Kotlin version of ssinss's EndlessRecyclerOnScrollListener (https://gist.github.com/ssinss/e06f12ef66c51252563e)
import android.support.v7.widget.LinearLayoutManager
import android.support.v7.widget.RecyclerView
import kotlin.properties.Delegates
class InfiniteScroll(private var layoutManager: LinearLayoutManager, private var loadMore: (page: Int) -> Unit) : RecyclerView.OnScrollListener() {
private var loading = true
private var previousTotal = 0
private var visibleThreshold = 5
private var current_page = 1
@fcannizzaro
fcannizzaro / Main.kt
Created August 12, 2017 11:14
Kotlin Regex Extensions
/**
*
* Copyright 2017 FRANCESCO SAVERIO CANNIZZARO
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions
// ==UserScript==
// @name Unipa Subscription Checker
// @version 1.0
// @description Check Subscription
// @author Francesco Cannizzaro
// @match https://immaweb.unipa.it/immaweb/private/docenti/esami/iscrizioneLezioni.seam*
// @require https://code.jquery.com/jquery-3.2.0.min.js
// @grant GM_xmlhttpRequest
// ==/UserScript==
@fcannizzaro
fcannizzaro / JSONView - Material Theme.css
Last active April 1, 2017 17:47
JSON View Material theme for Chrome Extension (Color Scheme https://github.com/equinusocio/material-theme)
body {
background: #263238;
color : #89DDFF;
font-family: monospace;
white-space: pre;
}
a{
color: #C3E88D;
}
// ==UserScript==
// @name Unipa Subscription
// @version 1.0
// @description Sort Unipa Files by Upload Date
// @author Francesco Cannizzaro
// @match https://immaweb.unipa.it/immaweb/private/docenti/esami/include/contenutiInsegnamentoMaterialeDidattico.seam?*
// @require https://code.jquery.com/jquery-3.2.0.min.js
// ==/UserScript==
(function() {
@fcannizzaro
fcannizzaro / unipa-old-style.css
Last active December 9, 2016 08:44
Unipa Old Colors / Fix Empty Lines
/* Colors */
.panel-theme-studenti>.panel-heading,
.panel-theme-studenti>.panel-footer {
background: #315572;
border-color: rgba(0,0,0,0.1);
}
.page-wrapper .page-heading-studenti{
padding-bottom: 8px;
@fcannizzaro
fcannizzaro / fibonacci.c
Last active March 6, 2016 21:06
c source with 6 different algorithms for Fibonacci's function ( + time )
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
#include<math.h>
// MATRIX UTILS
void mMultiply(int matrix[2][2]){
int tmp = matrix[0][0] + matrix[0][1];
matrix[0][1] = matrix[0][0];