Skip to content

Instantly share code, notes, and snippets.

View heartcode's full-sized avatar

Robert Pataki heartcode

View GitHub Profile
@daaain
daaain / gist:3932602
Created October 22, 2012 17:06
Google App Script - Spreadsheet JSON export
/**
* Adds a custom menu to the active spreadsheet, containing a single menu item
* for invoking the exportJSON() function specified above.
* The onOpen() function, when defined, is automatically invoked whenever the
* spreadsheet is opened.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function onOpen() {
var sheet = SpreadsheetApp.getActiveSpreadsheet();
@rricard
rricard / Error stack trace
Created August 10, 2012 01:58
Path config fallback for RequireJS compilation error
Error: Error: ENOENT, no such file or directory 'RAILS_ROOT/tmp/assets/http:/cdnjs.cloudflare.com/ajax/libs/zepto/1.0rc1/zepto.min,zepto.js'
at Object.fs.openSync (fs.js:338:18)
at build (/usr/local/Cellar/rbenv/0.3.0/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/requirejs-rails-0.9.0/bin/r.js:14166:23)
at requirejs.optimize.runBuild (/usr/local/Cellar/rbenv/0.3.0/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/requirejs-rails-0.9.0/bin/r.js:15358:30)
at Object.context.execCb (/usr/local/Cellar/rbenv/0.3.0/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/requirejs-rails-0.9.0/bin/r.js:1773:33)
at Object.Module.check (/usr/local/Cellar/rbenv/0.3.0/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/requirejs-rails-0.9.0/bin/r.js:1083:51)
at Object.Module.enable (/usr/local/Cellar/rbenv/0.3.0/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/requirejs-rails-0.9.0/bin/r.js:1324:22)
at Object.Module.init (/usr/local/Cellar/rbenv/0.3.0/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/requirejs-rails-0.9.0/bin
@4rn0
4rn0 / gist:3146246
Created July 19, 2012 19:34
Trigger fullscreen HTML5 video on iPad
<!DOCTYPE html>
<html>
<head>
<title>Trigger fullscreen HTML5 video on iPad</title>
<style>
#video { height: 1px; opacity: 0; position: absolute; width: 1px; }
#play { width: 100px; }
</style>
</head>
<body>
@marcinbunsch
marcinbunsch / codewall.badges.js
Created March 10, 2012 22:18
Coderwall - display missing badges
// How to use this:
// 1. Go to the desired profile page on coderwall, like http://coderwall.com/marcinbunsch
// 2. Paste this gist in the JS console
//
// You can also probably use this in greasemonkey and dot.js
//
// Also, it was tested in Chrome, Firefox and Safari, it probably will
// not work in IE, but I just don't care about it ;)
//
// UPDATE: Coderwall made changes to the site and I cannot retrieve the achievements, so they are hardcoded, taken from a cached version of the achievements page
@paulirish
paulirish / rAF.js
Last active March 22, 2024 00:00
requestAnimationFrame polyfill
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
@jdennes
jdennes / LICENSE
Last active March 7, 2024 04:40
Subscribing to a Campaign Monitor list using AJAX
The MIT License (MIT)
Copyright (c) James Dennes
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@stevenharman
stevenharman / _gradient.less
Created March 24, 2011 21:59
a gradient mix-in for LESS (tested with dotLESS, but may work with LESS.js)
.gradient(@from:#fff, @to:#fff, @fallback:@from) {
/* https://github.com/jamesfoster/dotless/commit/4004eff3cab321e31f43d052e35b5538f19443f7 */
@ffgradient: "-moz-linear-gradient(top, {0}, {1}) no-repeat scroll 0 0 transparent";
@wkgradient: "-webkit-gradient(linear,left top,left bottom,color-stop(0, {0}),color-stop(1, {1})) no-repeat scroll 0 0 transparent";
@iegradient: "progid:DXImageTransform.Microsoft.gradient(startColorstr='{0}', endColorstr='{1}')";
@ie8gradient: "\"progid:DXImageTransform.Microsoft.gradient(startColorstr='{0}', endColorstr='{1}')\"";
background: @fallback; /* for non-css3 browsers */
background: formatstring(@ffgradient, @from, @to); /* FF3.6+ */