Skip to content

Instantly share code, notes, and snippets.

💭
Decentralizing...

Eric Muyser ericmuyser

💭
Decentralizing...
Block or report user

Report or block ericmuyser

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 gist:fc647b3ad50f6824a56e
dust.helpers["tap"] = function(input, chunk, context) {
// return given input if there is no dust reference to resolve
// dust compiles a string/reference such as {foo} to a function
if (typeof input !== "function") {
return input;
}
var dustBodyOutput = '',
@ericmuyser
ericmuyser / script.js
Created May 4, 2014
ImTranslator TTS Spidermonkey Script
View script.js
// ==UserScript==
// @name Japanese Text-To-Speech
// @namespace http://use.i.E.your.homepage/
// @version 0.1
// @description enter something useful
// @match http://www.memrise.com/course/*/*/edit/
// @copyright 2012+, You
// ==/UserScript==
unsafeWindow.injectTTS = function(ttsURL) {
@ericmuyser
ericmuyser / server.js
Created May 4, 2014
ImTranslator TTS Server
View server.js
var connect = require('connect');
var http = require('http');
var exec = require('child_process').exec;
var url = require('url');
var app = connect()
.use(function(req, res) {
var queryData = url.parse(req.url, true).query;
var callback = queryData.callback;
View gist:9553730
'header': {>"konf/_header.include"/},
'footer': {>"konf/_footer.include"/},
'search': {>"konf/_search.include"/},
'primarySidebar': {>"konf/_search.include"/},
'content': function(context) {
return context.choose(
{>"konf/home.include"/},
{>"konf/brand.include"/},
{>"konf/searchResults.include"/}
View reflow.js
function reflowLayout() {
// Add this arbitrary margin-bottom to force a reflow
$('html').css('zoom', 1.001);
// We need the timeout for this zoom hack to work on all devices
setTimeout(function() {
$('html').css('zoom', 1);
}, 100);
}
@ericmuyser
ericmuyser / networth.html
Created May 22, 2013
Dashboard for net worth + current TODO list. Keeps you motivated? Currently over invested in ASICMINER, lol.
View networth.html
<html>
<body>
<div style="text-align: center">
<br />
<br />
<img id="am_value" src="" style="width: 700px; " />
<br />
<textarea id="todo" rows="20" cols="120"></textarea>
</div>
<script>
View speedtrain.sh
#!/bin/bash
#:Title : Speedtrain on Rails
#:Date :
#:Author : Obi Akubue, Eric Muyser
#:Version : 1.0
#:Description: This script installs Ruby on Rails on Ubuntu 12.04 with the option to install Apache and Phusion Passenger. (It creates a test rails app)
#Usage Option 1: To Install Rails (Ruby + Rubygems) + Sqlite. Simply run the script by typing ./speedtrain
#Usage Option 2: To Install Rails (Ruby + Rubygems) + Sqlite + MySQL + Apache + Passenger. Run script by typing ./speedtrain -p
View index-with-cache.php
<?php
$Phpr_InitOnly = true;
require_once('boot.php');
$cache = Core_CacheBase::create();
// change vars here
$debug = 1; // set to 1 if you wish to see execution time and cache actions
@ericmuyser
ericmuyser / gist:5243367
Last active Dec 15, 2015
Re-initialize LS datepicker madness
View gist:5243367
jQuery(function($) {
$('#FoxyGift_Configuration_foxygift_flexible_validity_date').change(function() {
if ($(this).is(':checked')) {
$('#form_field_foxygift_valid_daysFoxyGift_Configuration').addClass('hidden');
$('#form_field_foxygift_valid_untilFoxyGift_Configuration').removeClass('hidden');
}
else {
$('#form_field_foxygift_valid_daysFoxyGift_Configuration').removeClass('hidden');
$('#form_field_foxygift_valid_untilFoxyGift_Configuration').addClass('hidden');
}
View gist:3833527
class Admin::Local::LocationsController < Admin::BaseController
def index
@locations = Local::Location.page(params[:page]).per(params[:limit])
end
into
class Admin::Local::LocationsController < Admin::BaseController
def index
You can’t perform that action at this time.