Skip to content

Instantly share code, notes, and snippets.

Sébastien Vanvelthem belgattitude

Block or report user

Report or block belgattitude

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
@belgattitude
belgattitude / install_phpexcel_php73.sh
Last active Apr 7, 2019
Install script for ilia/php_excel with PHP7.3
View install_phpexcel_php73.sh
#!/bin/bash
#
# Example script to install LibXL, ilia/php_excel on PHP 7.3 (ondrej/ppa)
#
# Usage:
# > sudo ./install_phpexcel_php73.sh
# > sudo service php7.3-fpm reload (if using fpm)
#
# Requirements:
# - Tested with Ubuntu 64bits (14.04, 16.04+)
@belgattitude
belgattitude / video-tracks.scss
Last active Oct 15, 2018
Example of subs styling
View video-tracks.scss
/* Example of captions styling for FF and Chrome.
* Warning ! Only my prod build includes postcss/autoprefixer work.
* this example needs prefixes
*/
@import '../_variables.scss';
@import '../_media-queries.scss';
$track-font-family: $primary-font, sans-serif;
$track-color: yellow;
@belgattitude
belgattitude / BasicVideoPlayer.tsx
Last active Oct 1, 2018
An example of mini video player
View BasicVideoPlayer.tsx
import React, {SourceHTMLAttributes, TrackHTMLAttributes, VideoHTMLAttributes} from 'react';
import {Omit} from 'utility-types';
export type VideoSourcesProps = Array<SourceHTMLAttributes<HTMLSourceElement>>;
export type TracksSourcesProps = Array<TrackHTMLAttributes<HTMLTrackElement>>;
export type BasicVideoProps = {
srcs?: VideoSourcesProps;
tracks?: TracksSourcesProps;
playbackRate: number;
View install_phpexcel_php72.sh
#!/bin/bash
#
# Example script to install LibXL, ilia/php_excel on PHP 7.2 (ondrej/ppa)
#
# Usage:
# > sudo ./install_phpexcel_php72.sh
# > sudo service php7.2-fpm reload (if using fpm)
#
# Requirements:
# - Tested with Ubuntu 64bits (14.04, 16.04+)
@belgattitude
belgattitude / README.md
Created Feb 8, 2018 — forked from tophtucker/README.md
Beginning to reverse-engineer FizzyText
View README.md

TOTALLY SUPER DUPER NOT MY WORK! Trying to illuminate how FizzyText (seen here, source here, isolated from dat.GUI dependency here) works. Original appears to have been written by George Michael Brower.

In the original, which I find brilliant:

  • Solid black text is drawn onto an invisible canvas, from which it gets bitmap data
  • The bitmap data is read like a collision detection array, where black means "you're on top of text" and white means "you're not"
  • Particles of size r=0 are randomly spawned on a visible canvas
  • The particles grow if they're on top of a (non-rendered) black pixel, and shrink till they disappear if not
  • When they shrink to r=0, they respawn randomly somewhere
  • The particles follow a Perlin noise flow field, a very sensible and fluid kind of random movement, in which nearby particles
View create_and_run_standalone_javabridge_server.sh
#!/usr/bin/env bash
set -e
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PROJECT_DIR="$SCRIPT_DIR/.."
# PHPJavabridge version
PJB_VERSION="7.0.0"
PJB_DIR="$SCRIPT_DIR/downloads/php-java-bridge-$PJB_VERSION"
@belgattitude
belgattitude / install_phpexcel_php5.6.sh
Last active Aug 25, 2019
Install libxl/php_excel for PHP5.6 (ondrej/php ppa)
View install_phpexcel_php5.6.sh
#!/bin/bash
#
# ilia/php_excel extension example install script
#
# usage:
# > sudo ./install_phpexcel_php5.6.sh
# > (optionally) sudo service php5.6-fpm restart
#
# requirements:
# - Ubuntu 64bits (trusty/xenial)
@belgattitude
belgattitude / install_phpexcel_php7.sh
Last active Feb 17, 2019
Install libxl, php_excel extension on PHP7.1 (ondrej/ppa)
View install_phpexcel_php7.sh
#!/bin/bash
#
# ilia/php_excel extension example install script for PHP7+
#
# usage:
# > sudo ./install_phpexcel_php7.sh
# > (optionally) sudo service php7.1-fpm restart)
#
# requirements:
# - Ubuntu 64bits (trusty/xenial)
You can’t perform that action at this time.