Skip to content

Instantly share code, notes, and snippets.

View tobiasoberrauch's full-sized avatar
😀
Working

Tobias Oberrauch tobiasoberrauch

😀
Working
View GitHub Profile
@tobiasoberrauch
tobiasoberrauch / gist:2942715
Created June 16, 2012 22:56 — forked from BenExile/gist:2923448
Parsing FTP LIST Command Responses
var response = '', // FTP LIST response as a string
lines = response.trim().split("\r\n"),
parsed = [],
regexp = new RegExp(
'^([\\-dbclps])' + // Directory flag [1]
'([\\-rwxs]{9})\\s+' + // Permissions [2]
'(\\d+)\\s+' + // Number of items [3]
'(\\w+)\\s+' + // File owner [4]
'(\\w+)\\s+' + // File group [5]
'(\\d+)\\s+' + // File size in bytes [6]
@tobiasoberrauch
tobiasoberrauch / gist:2942716
Created June 16, 2012 22:56 — forked from BenExile/gist:2923448
Parsing FTP LIST Command Responses
var response = '', // FTP LIST response as a string
lines = response.trim().split("\r\n"),
parsed = [],
regexp = new RegExp(
'^([\\-dbclps])' + // Directory flag [1]
'([\\-rwxs]{9})\\s+' + // Permissions [2]
'(\\d+)\\s+' + // Number of items [3]
'(\\w+)\\s+' + // File owner [4]
'(\\w+)\\s+' + // File group [5]
'(\\d+)\\s+' + // File size in bytes [6]
@tobiasoberrauch
tobiasoberrauch / robot.js
Created December 10, 2012 14:57
Zolmeister
var robots = new Array();
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.start = function( ev ){
Problem 1
- Conclusion: don't install symfony/symfony v2.1.9
- Conclusion: don't install symfony/symfony v2.1.8
- Conclusion: remove symfony/symfony v2.1.7
- Conclusion: don't install symfony/symfony v2.1.7
- Conclusion: don't install symfony/symfony v2.1.6
- Conclusion: don't install symfony/symfony v2.1.5
- Conclusion: don't install symfony/symfony v2.1.4
- Conclusion: don't install symfony/symfony v2.1.3
- Conclusion: don't install symfony/symfony v2.1.2
{
"name": "symfony/framework-standard-edition",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": {
"": "src/"
}
},
"require": {
"php": ">=5.3.3",
Whoops, looks like something went wrong.
1/1RuntimeException: An error occurred while executing the command '/usr/local/bin/bower' 'list' '--map'. The error was: "node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
TypeError: Object # has no method 'tmpDir'
at Object. (/usr/local/lib/node_modules/bower/node_modules/update-notifier/node_modules/configstore/configstore.js:13:53)
at Module._compile (module.js:441:26)
at Object..js (module.js:459:10)
at Module.load (module.js:348:32)
@tobiasoberrauch
tobiasoberrauch / gist:6920044
Created October 10, 2013 15:12
jquery registry
(function(){
var Cache = function() {
var data = [];
};
Cache.prototype = {
set: function(key, value) {
this.data[key] = value;
},
get: function(key) {
@tobiasoberrauch
tobiasoberrauch / gist:9271364
Created February 28, 2014 13:45
create-zip.php
<?php
function createZip($source, $destination)
{
if (!extension_loaded('zip') || !file_exists($source)) {
return false;
}
$zip = new ZipArchive();
if (!$zip->open($destination, ZIPARCHIVE::CREATE)) {
return false;
function namespace (ns) {
var parts = ns.split('.'),
root = window || this;
return (function walk (obj) {
if (!root[obj]) { root[obj] = {}; }
root = root[obj];
if (parts.length) { walk(parts.shift()); }
return root;
}(parts.shift()));
// Generated on <%= (new Date).toISOString().split('T')[0] %> using <%= pkg.name %> <%= pkg.version %>
'use strict';
var moment = require('moment');
var LIVERELOAD_PORT = 35729;
var lrSnippet = require('connect-livereload')({port: LIVERELOAD_PORT});
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};