Skip to content

Instantly share code, notes, and snippets.

Alexandre Vicenzi alexandrevicenzi

Block or report user

Report or block alexandrevicenzi

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
@alexandrevicenzi
alexandrevicenzi / tus-auth.go
Created Jul 28, 2017
Tus Server with Authentication
View tus-auth.go
package main
import (
"net/http"
"github.com/tus/tusd"
"github.com/tus/tusd/filestore"
)
func UserIsAuthenticated(r *http.Request) {
@alexandrevicenzi
alexandrevicenzi / fblogin.py
Created Aug 22, 2016
Python Tornado: Make email permission required when sign in with Facebook
View fblogin.py
#
# Read more:
# http://blog.alexandrevicenzi.com/required-email-facebook-login.html
#
import logging
import tornado.auth
import tornado.ioloop
import tornado.web
@alexandrevicenzi
alexandrevicenzi / README.md
Last active Jun 4, 2016 — forked from rikels/README.md
chromium os plugins
View README.md

This scripts installs: Flash, PDF, for some Chromium OS builds.

All credits go to dz0ny, his script can be found here: https://gist.github.com/3065781 but this script didn't work for me and some more people. so i tried to do what his script did, but a little different. And also a big thanks to Jamison Lofthouse and Steve Pirk, as they got the Google Hangout plugin to work.

How to install?

  1. start Chromium OS.
View browserdetect.html
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Which Browser?</title>
</head>
<body>
<p>You are using <span id="browser"></span> <span id="version"></span> on <span id="os"></span></p>
<script type="text/javascript" src="browserdetect.js"></script>
<script type="text/javascript">
@alexandrevicenzi
alexandrevicenzi / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@alexandrevicenzi
alexandrevicenzi / index.html
Last active May 31, 2019
Bootstrap CSS Animate Loading Icon Button
View index.html
<!-- Code snippet -->
<div class="form-group">
<div class="col-md-12 text-center">
<span class="glyphicon glyphicon-refresh glyphicon-refresh-animate"></span>
</div>
</div>
@alexandrevicenzi
alexandrevicenzi / HttpClientExtensions.cs
Created Feb 25, 2014
C# Post, Put and Patch as JSON async extensions
View HttpClientExtensions.cs
using System;
using System.Net.Http;
using System.Net.Http.Formatting;
using System.Threading.Tasks;
namespace MyProject.Extensions
{
public static class HttpClientEx
{
public const string MimeJson = "application/json";
@alexandrevicenzi
alexandrevicenzi / pdf.html
Created Feb 22, 2014
Plain text PDF with pdf.js
View pdf.html
<!doctype html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://mozilla.github.io/pdf.js/build/pdf.js"></script>
<script>
function pdfToPlainText(pdfData) {
PDFJS.disableWorker = true;
var pdf = PDFJS.getDocument(pdfData);
@alexandrevicenzi
alexandrevicenzi / external_ip.py
Last active Jan 2, 2016
Find your external IP using Pyhton
View external_ip.py
#!/usr/bin/env python
# -*- encoding: UTF-8 -*-
import urllib
# Telize is a JSON IP and GeoIP REST API
url = 'http://www.telize.com/ip'
u = urllib.urlopen(url)
data = u.read()
You can’t perform that action at this time.