Skip to content

Instantly share code, notes, and snippets.

View illusionfield's full-sized avatar

Hoffy illusionfield

View GitHub Profile
<smil>
<head>
<meta http-equiv="refresh" content="20"/>
<layout>
<!-- define the screen resolution -->
<root-layout width="1920" height="1080" backgroundColor="#18182c" />
<!-- define the screen layout zones in relative % -->
<region regionName="full" left="0" top="0" width="100%" height="100%" z-index="1" backgroundColor="#fdc400"/>
@illusionfield
illusionfield / bunny.smil
Last active August 11, 2021 11:33
smil bunny
<smil>
<head>
<meta http-equiv="refresh" content="20"/>
<layout>
<!-- define the screen resolution -->
<root-layout width="1920" height="1080" backgroundColor="#18182c" />
<!-- define the screen layout, in this case single fullscreen zone -->
<region regionName="main" left="0" top="0" width="1920" height="1080" z-index="1" backgroundColor="#18182c"/>
</layout>
@illusionfield
illusionfield / update-ffmpeg-rpi.sh
Created July 25, 2018 13:00 — forked from enzanki-ars/update-ffmpeg-rpi.sh
Install/Update FFmpeg with hardware acceleration on the Raspberry Pi
#!/bin/bash
# Compile and install/update (or install via Apt) FFmpeg Codecs
# Compile and install/update FFmpeg suite
# Compile with hardware acceleration
# Modified from https://retroresolution.com/compiling-ffmpeg-from-source-code-all-in-one-script/
echo "Begining Installation of FFmpeg Suite"
#Update APT Repository
echo "Updating the APT repository information"
@illusionfield
illusionfield / arm-elf-gcc_on_osx.sh
Last active January 23, 2018 10:04 — forked from steakunderscore/arm-elf-gcc_on_osx.sh
How I installed arm-elf-gcc on Mac OS X
#!/bin/bash
mkdir toolchain
cd toolchain
wget ftp://sources.redhat.com/pub/newlib/newlib-1.19.0.tar.gz
wget ftp://ftp.gnu.org/gnu/gdb/gdb-7.2a.tar.gz
wget ftp://ftp.gnu.org/gnu/binutils/binutils-2.29.tar.bz2
wget ftp://ftp.gnu.org/gnu/gcc/gcc-4.6.4/gcc-core-4.6.4.tar.bz2
@illusionfield
illusionfield / ssl.rules
Created October 9, 2016 09:10 — forked from konklone/ssl.rules
nginx TLS / SSL configuration options for konklone.com
# Basically the nginx configuration I use at konklone.com.
# I check it using https://www.ssllabs.com/ssltest/analyze.html?d=konklone.com
#
# To provide feedback, please tweet at @konklone or email eric@konklone.com.
# Comments on gists don't notify the author.
#
# Thanks to WubTheCaptain (https://wubthecaptain.eu) for his help and ciphersuites.
# Thanks to Ilya Grigorik (https://www.igvita.com) for constant inspiration.
server {
@illusionfield
illusionfield / gist:936ac94cdba5cf943aa0d34c91244fa0
Created May 31, 2016 19:51 — forked from JFK/gist:4591707
Ngnix + Nginx-GridFS-Replicaset(mongodb) + nginx-image-filter +nginx-proxy-cache Sample Configuration
user www-data;
#worker_processes 4;
#worker_priority 0;
#worker_cpu_affinity 0001 0010 0100 1000;
#worker_rlimit_nofile 163840;
#worker_processes 8;
#worker_priority 0;
#worker_cpu_affinity 00000001 00000010 00000100 00001000 00010000 00100000 01000000 10000000;
// PhantomJS Cheatsheet
$ brew update && brew install phantomjs // install PhantomJS with brew
phantom.exit();
var page = require('webpage').create();
page.open('http://example.com', function() {});
page.evaluate(function() { return document.title; });
@illusionfield
illusionfield / str_replace.js
Created April 11, 2016 15:48 — forked from frentsel/str_replace.js
js analog PHP str_replace()
String.prototype.strReplace = function(find, replace) {
if(typeof find === 'string')
return this.split(find).join(replace);
var str = this;
for(var i in find)
str = str.split(find[i]).join(replace[i]);
return str;
@illusionfield
illusionfield / Sync_Async_loading_handlebars.js
Created October 17, 2015 22:19 — forked from utsengar/Sync_Async_loading_handlebars.js
synchronous and asynchronous loading of handlebars templates
/*
* This decorates Handlebars.js with the ability to load
* templates from an external source, with light caching.
*
* To render a template, pass a closure that will receive the
* template as a function parameter, eg,
* T.render('templateName', function(t) {
* $('#somediv').html( t() );
* });
* Source: https://github.com/wycats/handlebars.js/issues/82
// Get the template HTML and remove it from the doumenthe template HTML and remove it from the doument
var previewNode = document.querySelector("#template");
previewNode.id = "";
var previewTemplate = previewNode.parentNode.innerHTML;
previewNode.parentNode.removeChild(previewNode);
var myDropzone = new Dropzone(document.body, { // Make the whole body a dropzone
url: "/target-url", // Set the url
thumbnailWidth: 80,
thumbnailHeight: 80,