Skip to content

Instantly share code, notes, and snippets.

Michael Nitschinger daschl

Block or report user

Report or block daschl

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 llvm
Package: llvm
Priority: optional
Section: devel
Installed-Size: 2568
Maintainer: Ubuntu Core developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: LLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Architecture: i386
Version: 2.7-0ubuntu1
Depends: binfmt-support, libc6 (>= 2.4), libffi5 (>= 3.0.4), libgcc1 (>= 1:4.1.1), libllvm2.7 (>= 2.7-0ubuntu1), libstdc++6 (>= 4.2.1)
Recommends: llvm-dev
View server.js
var g = require('./garcon/lib/garcon'), server, myApp;
// create a server which will listen on port 8000 by default
server = new g.Server();
// adding an application named 'myApp' tells the server to respond to
// the /myApp url and to create a myApp.html file when saving
myApp = server.addApp({
name: 'testing',
theme: 'sc-theme',
View errorlog
Server started on http://localhost:8000
WARNING: 1279959395609/sproutcore/desktop/icons/mini_222222.png referenced in frameworks/sproutcore/frameworks/desktop.css but was not found.
WARNING: 1279959395609/sproutcore/desktop/icons/mini_454545 referenced in frameworks/sproutcore/frameworks/desktop.css but was not found.
WARNING: 1279959395609/sproutcore/desktop/blank.gif referenced in frameworks/sproutcore/frameworks/desktop.css but was not found.
WARNING: 1279959395609/sproutcore/desktop/icons/shared referenced in frameworks/sproutcore/frameworks/desktop.css but was not found.
WARNING: 1279959395609/sproutcore/desktop/icons/shared referenced in frameworks/sproutcore/frameworks/desktop.css but was not found.
WARNING: 1279959395609/sproutcore/desktop/icons/shared referenced in frameworks/sproutcore/frameworks/desktop.css but was not found.
WARNING: 1279959395609/sproutcore/desktop/icons/shared referenced in frameworks/sproutcore/frameworks/desktop.css but was not found.
WARNING: 1279959395609/sproutcore/desktop/
@daschl
daschl / couchbase-php-handler.php
Created Jun 25, 2012
A reference implementation of a Couchbase Session Handler with PHP
View couchbase-php-handler.php
<?php
/**
* A reference implementation of a custom Couchbase session handler.
*/
class CouchbaseSessionHandler implements SessionHandlerInterface {
/**
* Holds the Couchbase connection.
*/
@daschl
daschl / php-ext-couchbase-segfault
Created Jun 25, 2012
Segfaulting PHP-Ext-Couchbase
View php-ext-couchbase-segfault
Problem Description:
--------------------
The given PHP script was expected to run perfectly fine, instead segfaults.
Version in Use:
---------------
Couchbase Server 2.0 (You are running version 2.0.0 community edition (build-722)) - latest DP release
php-ext-couchbase 1.1.0-dp2
libcouchbase 1.1.0dp6-85 throgh deb repo
@daschl
daschl / couchbase-php-2pc-simple.php
Created Jul 21, 2012
Simple Couchbase PHP 2PC Implementation
View couchbase-php-2pc-simple.php
<?php
/**
* Simple two-phase commit for PHP couchbase.
*
* Michael Nitschinger (@daschl, 2012)
*
* Additional Remarks
* ------------------
* - The Couchbase extension makes it currently pretty hard to write easy readable code when dealing with
* CAS (compared to the ruby adapter). This could certainly be improved with closures. I also found that
@daschl
daschl / couchbase-php-2pc-advanced.php
Created Jul 21, 2012
Advanced Couchbase 2PC PHP Implementation
View couchbase-php-2pc-advanced.php
<?php
/**
* A more general PHP two-phase commit implementation.
*
* This assumes that we run on 5.3 or later.
*/
class TransactionException extends Exception {}
/**
@daschl
daschl / run.java
Created Jul 22, 2012
exception handling and reopen
View run.java
/**
* Infinitely loop processing IO.
*/
@Override
public void run() {
while (running) {
try {
handleIO();
} catch (IOException e) {
logRunException(e);
@daschl
daschl / gist:5168856
Created Mar 15, 2013
quick replace with check.
View gist:5168856
<?php
if(!isset($argv[1]) || !isset($argv[2])) {
echo "Not enough arguments\n";
exit(-1);
}
$infile = $argv[1];
$outfile = $argv[2];
View gist:5655535
exec { "couchbase-server-source":
command => "/usr/bin/wget http://packages.couchbase.com/releases/2.0.1/couchbase-server-enterprise_x86_64_2.0.1.deb",
cwd => "/home/vagrant/",
creates => "/home/vagrant/couchbase-server-enterprise_x86_64_2.0.1.deb",
before => Package['couchbase-server']
}
exec { "install-deps":
command => "/usr/bin/apt-get install libssl0.9.8",
before => Package['couchbase-server']
You can’t perform that action at this time.