Skip to content

Instantly share code, notes, and snippets.

View gabrielstuff's full-sized avatar

Gabriel gabrielstuff

View GitHub Profile
@hugohil
hugohil / procedure.md
Created September 26, 2016 10:44
Disable Oculus Home while still using the USB charger

Disable Oculus Home and use the Gear VR

TL;DR: Remove any Oculus app and enable the Gear VR Service developper mode. Do not disable Gear VR Service package.

This step-by-step guide will allow you to plug your device into the Samsung Gear VR HMD without auto-launching Oculus Home and still having the HMD buttons disabled and the USB charger active.

We came to this procedure thanks to this guide. We found some steps not necessary and missed informations so we made this one. Cheers to robamacaf !

Finally, this has been tested and worked on a Samsung Galaxy S7 / Android 6.0.1 with an Apache Cordova app. If you have tested this on another setup and it worked, please notify me and I'll update this guide.

@iamtekeste
iamtekeste / Download Google Drive files with WGET
Created July 8, 2015 11:00
Download Google Drive files with WGET
Download Google Drive files with WGET
Example Google Drive download link:
https://docs.google.com/open?id=[ID]
To download the file with WGET you need to use this link:
https://googledrive.com/host/[ID]
Example WGET command:
@iclems
iclems / Firebase Lazy-Safe Iterator
Last active June 21, 2018 09:48
This snippet enables to iterate over a Firebase reference in a non-blocking way. If you need to iterate over a large reference, a child_added query may block your Firebase as it will query the whole data before iteration. With this snippet, children are retrieved one by one, making it slower / safer.
// By Clément Wehrung
function Iterator(queueRef, processingCallback) {
this.queueRef = queueRef;
this.processingCallback = processingCallback;
this.processed = {};
this.processNext();
}
Iterator.prototype.processNext = function() {
@clayton
clayton / ffmpeg-install.sh
Created August 9, 2013 18:55
Install FFMPEG on OS X with HomeBrew to convert Mp4 to WebM
# Installation
brew install ffmpeg --with-vpx --with-vorbis --with-libvorbis --with-vpx --with-vorbis --with-theora --with-libogg --with-libvorbis --with-gpl --with-version3 --with-nonfree --with-postproc --with-libaacplus --with-libass --with-libcelt --with-libfaac --with-libfdk-aac --with-libfreetype --with-libmp3lame --with-libopencore-amrnb --with-libopencore-amrwb --with-libopenjpeg --with-openssl --with-libopus --with-libschroedinger --with-libspeex --with-libtheora --with-libvo-aacenc --with-libvorbis --with-libvpx --with-libx264 --with-libxvid
# Easy Peasy
ffmpeg -i video.mp4 video.webm
@keithmorris
keithmorris / boilerplate-widget.php
Created December 4, 2012 23:51 — forked from eddiemoya/boilerplate-widget.php
WordPress Boilerplate Widget
<?php /*
Plugin Name: Boilerplate Widget
Description: Starting point for building widgets quickly and easier
Version: 1.0
Author: Eddie Moya
/**
* IMPORTANT: Change the class name for each widget
*/
class Boilerplate_Widget extends WP_Widget {
@dariocravero
dariocravero / README.md
Created October 20, 2012 05:25
Save files in Meteor

Create a Meteor app and put the client_/server_ files in a client/server directories. Also, create a public dir to save the uploaded files.

@pitpit
pitpit / Sublime Text 2 URL Launcher.md
Created September 13, 2012 09:23
Create an URI protocol (edit://) in OSX to directly edit a file from browser to Sublime Text 2

This step by step explains how to create an URI protocol (a scheme) to directly edit a file in Sublime Text 2 from browser (or from the terminal).

Then it explains how to add this kind of link to Symfony2 Exceptions in order to allow opening file directly when an Exception is thrown.

Designed for OSX

Create the URI launcher for "edit://" URI

Launch AppleScript and save the following script as an Application (name it "Sublime Text 2 URL Launcher"):

@mrdoob
mrdoob / gist:1325393
Created October 30, 2011 02:48
ffmpeg: recording the screen.
ffmpeg -f x11grab -b 1M -bt 2M -r 30 -s 512x512 -i :0.0+1,53 -an kinect.webm
@evanc
evanc / gist:1076018
Created July 11, 2011 14:53
imgur jQuery File Upload plugin
(function ($) {
var n = 'undefined',
func = 'function',
UploadHandler, methods, MultiLoader = function (b) {
var c = 0,
list = [];
this.complete = function () {
c += 1;
if (c === list.length + 1) {
b(list);