Skip to content

Instantly share code, notes, and snippets.

View joar's full-sized avatar
:bowtie:
Not wearing a bowtie

Joar Wandborg joar

:bowtie:
Not wearing a bowtie
View GitHub Profile
# Response #
<br />
<b>Warning</b>: disk_free_space() [<a href='function.disk-free-space'>function.disk-free-space</a>]: Value too large for defined data type in <b>/homez.87/meaxuuxr/www/cloud2/lib/filestorage/local.php</b> on line <b>226</b><br />
{"data":{"message":"Not enough space available"},"status":"error"}
# END Response #
# Request & Response data #
Request URL:http://me310.fr/cloud2/files/ajax/upload.php
Request Method:POST
Status Code:200 OK
From 0d112b9076c71aa223a60f0faa8d63b1ae9dab18 Mon Sep 17 00:00:00 2001
From: Joar Wandborg <[email protected]>
Date: Tue, 11 Oct 2011 21:26:35 +0200
Subject: [PATCH] Fixed a bug in checkWebserverUser where it would return the owner of the document root instead of the owner of the web server process.
---
lib/util.php | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/lib/util.php b/lib/util.php
From 6241d8f5b5841f56eb924ab474011d3d101e07b0 Mon Sep 17 00:00:00 2001
From: Joar Wandborg <[email protected]>
Date: Tue, 11 Oct 2011 21:26:35 +0200
Subject: [PATCH] Fixed a bug in checkWebserverUser
checkWebserverUser would return the owner of the document
root instead of the owner of the web server process.
---
lib/util.php | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
@joar
joar / fix_mongodb.sh
Created November 13, 2011 19:20
MongoDB repair - Recover from faulty MongoDB shutdown
#!/usr/bin/env bash
# MongoDB repair - Recover from faulty MongoDB shutdown
# By Joar Wandborg <http://wandborg.se>
#
# Tested on Ubuntu Oneiric 11.10
sudo rm /var/lib/mongodb/mongod.lock
sudo mongod --repair
sudo service mongodb start
sleep 1
'''
Copyright (c) 2011 Joar Wandborg <http://wandborg.se>
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:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH T
@joar
joar / gist:3759922
Created September 21, 2012 05:45 — forked from phpnode/gist:3758590
from pygments.formatter import Formatter
import json
class Formatter(Formatter):
name = 'JSON'
aliases = ['json']
filenames = []
def format(self, tokensource, outfile):
arr = []
@joar
joar / _config.yml
Created September 23, 2012 20:01
jekyll + talkatv non-js setup
pygments: true
base_url: "http://wandborg.se"
@joar
joar / modify_entries.py
Last active December 10, 2015 04:28
modifying mediagoblin MediaEntries
# (c) 2012 Joar Wandborg <http://wandborg.se>
# Licensed under CC0 (http://creativecommons.org/publicdomain/zero/1.0/)
#
# This is an interactive session from `gmg shell`
# Query the database for some MediaEntries
m = db.MediaEntry.query.filter(db.MediaEntry.id > 2, db.MediaEntry.id <= 4).all()
for entry in m:
From 7bbd7c5eb636673337f43ce3c9a9f3df58c9dfb7 Mon Sep 17 00:00:00 2001
From: Joar Wandborg <[email protected]>
Date: Sat, 5 Jan 2013 00:58:18 +0100
Subject: [PATCH] Tornado test
---
mediagoblin/app.py | 5 +++--
run_tornado.py | 26 ++++++++++++++++++++++++++
2 files changed, 29 insertions(+), 2 deletions(-)
create mode 100644 run_tornado.py
#!/bin/zsh
#
# Outputs the diff between the git logs for two branches
#
### USAGE
# log-diff.sh branch1 branch2
#
# Written by Elvenlord Elrond from Samba-TNG <http://samba-tng.org> / GNU MediaGoblin <http://mediagoblin.org>
# No warranty what so ever.
#