Skip to content

Instantly share code, notes, and snippets.

Francesco Saverio Cannizzaro fcannizzaro

  • Palermo , Italy
Block or report user

Report or block fcannizzaro

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@fcannizzaro
fcannizzaro / bintree.c
Last active Jun 14, 2019
Binary Tree C implementation
View bintree.c
#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 / media-keyboard.user.js
Created Dec 14, 2017
use media key to play/pause HTML5 video
View media-keyboard.user.js
// ==UserScript==
// @name Media Keyboard
// @version 0.1
// @description try to take over the world!
// @author Francesco Cannizzaro
// @match *://*/*
// ==/UserScript==
(function() {
'use strict';
@fcannizzaro
fcannizzaro / InfiniteScroll.kt
Last active Aug 28, 2017
Kotlin version of ssinss's EndlessRecyclerOnScrollListener (https://gist.github.com/ssinss/e06f12ef66c51252563e)
View InfiniteScroll.kt
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 Aug 12, 2017
Kotlin Regex Extensions
View Main.kt
/**
*
* 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
View unipa-subscription-checker.user.js
// ==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 Apr 1, 2017
JSON View Material theme for Chrome Extension (Color Scheme https://github.com/equinusocio/material-theme)
View JSONView - Material Theme.css
body {
background: #263238;
color : #89DDFF;
font-family: monospace;
white-space: pre;
}
a{
color: #C3E88D;
}
View unipa-subscription.user.js
// ==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 Dec 9, 2016
Unipa Old Colors / Fix Empty Lines
View unipa-old-style.css
/* 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 Mar 6, 2016
c source with 6 different algorithms for Fibonacci's function ( + time )
View fibonacci.c
#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];
@fcannizzaro
fcannizzaro / infix_expr.c
Last active Aug 29, 2015
Infix expression
View infix_expr.c
#include <stdio.h>
#include <math.h>
#include <stdbool.h>
#include "base.h"
main(){
_struct * list = NULL;
FILE * file = fopen("post.ms", "r");
char value[10] , * pt;
You can’t perform that action at this time.