Skip to content

Instantly share code, notes, and snippets.

Install Redcar (http://github.com/danlucraft/redcar) on Ubuntu:
$ sudo gem install redcar
$ sudo /var/lib/gems/1.8/bin/redcar install
$ export PATH=/var/lib/gems/1.8/bin:$PATH
$ redcar
<?php
session_start();
require_once('lib/oauth/OAuthStore.php');
require_once('lib/oauth/OAuthRequester.php');
$options = array(
'server' => 'localhost',
'username' => 'xxxxxx',
/*
* Copyright (c) 2010 Tobias Schneider
* This script is freely distributable under the terms of the MIT license.
*/
(function(){
var UPC_SET = {
"3211": '0',
"2221": '1',
"2122": '2',
.fan_box * { color: #3378CC !important; font-family: "DroidSans", "Trebuchet MS", Arial, Helvetica, sans-serif; }
.fan_box a:hover { text-decoration: none; }
.fan_box .full_widget { height: 170px; border: 0 !important; background: none !important; position: relative; }
.fan_box .connect_top { background: none !important; padding: 0 !important; }
.fan_box .profileimage, .fan_box .name_block { display: none; }
.fan_box .connect_action { padding: 0 !important; }
.fan_box .connect_widget {
position: absolute;
bottom: 0;
right: 10px;
<?php
$bildUrl = '';
if(isset($_POST['submit_button'])){ // Formular wurde verschickt
// Texte
$ort = isset($_POST['ort']) ? $_POST['Ort'] : '';
$landkreis = isset($_POST['landkreis']) ? $_POST['landkreis'] : '';
@SunboX
SunboX / gist:3463019
Created August 25, 2012 09:40
C9 IDE Error
[sunbox@cloud9]:/workspace$ git merge gh-pages
fatal: Unable to create '/var/lib/stickshift/0679971f6656475dbad434b407a9ecb6/app-root/data/263337/.git/index.lock': File exists.
If no other git process is currently running, this probably means a
git process crashed in this repository earlier. Make sure no other git
process is running and remove the file manually to continue.
Updating 126d94f..6200ff9
@SunboX
SunboX / gist:3644626
Created September 5, 2012 20:57
PhoneGap/Cordova Test Case
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<script>
var src = '<!DOCTYPE HTML><html><head><meta charset="utf-8">';
src += '</head><body>';
src += '</body></html>';
@SunboX
SunboX / gist:3948274
Created October 24, 2012 19:29
Pixastic blurfast deaktivieren
Pixastic.process = function(img, actionName, options, callback) {
// guckst du hier ;o)
console.log(img.getAttribute('src'));
// org. pixastic code
if (img.tagName.toLowerCase() == "img") {
var dataImg = new Image();
dataImg.src = img.src;
@SunboX
SunboX / ab2str.js
Created November 3, 2012 13:45
ArrayBuffer to String conversion
function ab2str(buf) {
var result = '';
if (buf) {
var bytes = new Uint8Array(buf);
for (var i = 0; i < bytes.byteLength; i++) {
result = result + String.fromCharCode(bytes[i]);
}
}
return result;
}

Getting your Firefox app on Heroku

Assuming you already have your app working locally

Get heroku working