Skip to content

Instantly share code, notes, and snippets.

View belgattitude's full-sized avatar

Sébastien Vanvelthem belgattitude

View GitHub Profile
@belgattitude
belgattitude / install_phpexcel_php7.sh
Last active February 17, 2019 17:24
Install libxl, php_excel extension on PHP7.1 (ondrej/ppa)
#!/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)
@belgattitude
belgattitude / install_phpexcel_php5.6.sh
Last active July 3, 2022 00:36
Install libxl/php_excel for PHP5.6 (ondrej/php ppa)
#!/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)
#!/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 / README.md
Created February 8, 2018 23:48 — forked from tophtucker/README.md
Beginning to reverse-engineer FizzyText

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
#!/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 / BasicVideoPlayer.tsx
Last active October 1, 2018 11:06
An example of mini video player
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;
@belgattitude
belgattitude / video-tracks.scss
Last active October 15, 2018 09:54
Example of subs styling
/* 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 / install_phpexcel_php73.sh
Last active January 17, 2022 01:53
Install script for ilia/php_excel with PHP7.3
#!/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+)
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions