Skip to content

Instantly share code, notes, and snippets.

Jérôme Gangneux jrmgx

Block or report user

Report or block jrmgx

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
View GVR-VRWebview-example.cs
public class AndroidWebview : MonoBehaviour {
bool isClickedDown = false;
void Update () {
// GVR 1.7: Get the pointer current raycast
RaycastResult result = GvrPointerInputModule.CurrentRaycastResult;
// If the raycast is not hiting our gameobject, quit
jrmgx / AndroidWebview.cs
Last active Feb 22, 2018
Android VR Webview Texture for Unity (more information at:
View AndroidWebview.cs
using UnityEngine;
using UnityEngine.EventSystems;
using System;
using System.Collections;
using System.Runtime.InteropServices;
public class AndroidWebview : MonoBehaviour, IPointerExitHandler, IPointerClickHandler, IBeginDragHandler, IDragHandler, IEndDragHandler {
View keep-ratio.js
// This will calculate height for any .keep-ratio-4-3 or .keep-ratio-16-9 elements
// to keep the 4/3 or 16/9 ratio aspect (width must be set, height will be calculated)
// Init with keepRatio.start();
// It needs jQuery because I'm a lazy one
var keepRatio = (function ($) {
function ration(event) {
$('.keep-ratio-4-3').each(function () {
$e = $(this);
$e.height($e.width() * 3/4);
import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.Surface;
import android.view.ViewGroup;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
jrmgx /
Last active Jun 28, 2017
Scripts to generate theses kind of images :

This will help you use the scripts

Step 1

You need to take a picture of the movie every second,
this can be done with ffmpeg

$ ffmpeg -i my_movie.mkv -vf fps=1 my_movie/img%06d.png
View interpolateHermiteFor.swift
extension UIBezierPath {
static func interpolateHermiteFor(points: [CGPoint], closed: Bool = false) -> UIBezierPath {
guard points.count >= 2 else {
return UIBezierPath()
if points.count == 2 {
let bezierPath = UIBezierPath()
jrmgx / StringExtensionHTML.swift
Created Nov 2, 2015 — forked from mwaterfall/StringExtensionHTML.swift
Decoding HTML Entities in Swift
View StringExtensionHTML.swift
import Foundation
// Very slightly adapted from
// 99.99% Credit to Martin R!
// Mapping from XML/HTML character entity reference to character
// From
private let characterEntities : [String: Character] = [

Keybase proof

I hereby claim:

  • I am jrmgx on github.
  • I am jrmgx ( on keybase.
  • I have a public key whose fingerprint is 5C80 B807 56AC 72CD FFFA CB44 576B B1BF 6A09 07D5

To claim this, I am signing this object:

jrmgx / spotify.php
Last active Dec 27, 2015
Get the track name/artist from a Spotify playlist (or selection)This is only a dirty scrapping, old school style \o/
View spotify.php
// Select tracks you want, do a right click > copy HTTP link then past in $list
$list = '
$final = [];
foreach (explode("\n", $list) as $item) {
$content = file_get_contents(trim($item));
function usage
echo "Usage: $0 ProjectName DocumentRoot"
echo "This script MUST be started as root"
You can’t perform that action at this time.