Skip to content

Instantly share code, notes, and snippets.

View FrancisVarga's full-sized avatar
🌴
On vacation

Francis Varga FrancisVarga

🌴
On vacation
  • Phili-Tech
  • Berlin, Germany
View GitHub Profile
@FrancisVarga
FrancisVarga / benchmark.php
Created October 26, 2012 00:19
Benchmark Couchbase-1723
<?php
/**
* Created by JetBrains PhpStorm.
* User: hippsterkiller
* Date: 10/26/12
* Time: 1:38 AM
* To change this template use File | Settings | File Templates.
*/
require __DIR__ . "/../src/Processus/Interfaces/NoSQLInterface.php";
@ThomasBurleson
ThomasBurleson / gist:2432662
Created April 20, 2012 23:36
REST services with function currying and promises.
//
// Support API currying...
//
// e.g. var builder = buildCRUDService($rootScope, $http, $log);
//
// API url == http://services.mysite.com/classes/Book/
//
// var Book = builder.serviceFor("Book");
// var book = Book.get(123);
//
@masaki
masaki / mqh_install.sh
Created December 11, 2011 15:09 — forked from xaicron/mqh_install.sh
Installing MySQL5.1 / Q4M / HandlerSocket
#!/bin/sh
if [ `which perl` = "/usr/bin/perl" ]; then
echo -n -e "\e[1;31mUSING SYSTEM PERL OK? [y/n]\e[m: "
read ANSWER
if [ "$ANSWER" != "y" ]; then
exit 255
fi
PERL_CPANM_OPT="$PERL_CPANM_OPT --sudo"
fi
@FrancisVarga
FrancisVarga / setup_ubuntu.sh
Created May 23, 2011 21:58
setup a virgin ubuntu thx to -> https://github.com/chluehr
#!/bin/bash
#-----------------------------------------------------------
#
# Purpose: Just run this script to install the required
# ubuntu/pear packages for php development.
#
# Tested on Ubuntu 10.04
#-----------------------------------------------------------
echo "Installing basic packages for development."
@FrancisVarga
FrancisVarga / highscore.sql
Created March 25, 2011 11:48
Generate User highscore
SET @rownum =0;
SET @rank =0;
SET @prev_val=0;
SELECT @rownum := @rownum + 1 AS row
, @rank := IF(@prev_val!=uxp,@rownum,@rank) AS rank
, @prev_val := uxp AS uxp,
userId
FROM
(
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://ns.adobe.com/air/application/2.6">
<id>com.johnlindquist.ipad</id>
<filename>MyApp</filename>
<name>MyApp</name>
<versionNumber>1</versionNumber>
<initialWindow>
<renderMode>gpu</renderMode>
<content>deploy/MyApp.swf</content>
<fullScreen>true</fullScreen>
@fdmanana
fdmanana / gist:832610
Created February 17, 2011 20:27
The CouchDB replicator database

1. Introduction to the replicator database

A database where you PUT/POST documents to trigger replications and you DELETE to cancel ongoing replications. These documents have exactly the same content as the JSON objects we used to POST to /_replicate/ (fields "source", "target", "create_target", "continuous", "doc_ids", "filter", "query_params".

Replication documents can have a user defined "_id". Design documents (and _local documents) added to the replicator database are ignored.

The default name of this database is _replicator. The name can be changed in the .ini configuration, section [replicator], parameter db.

2. Basics

package com.destroytoday.example
{
public class AccountController
{
[Inject]
public var signalBus:SignalBus;
[Inject]
public var twitterService:TwitterService;
@FrancisVarga
FrancisVarga / flex4HeroCompilerConfig
Created September 24, 2010 23:59
remove unused rsls compiler argument flex 4
-remove-unused-rsls=true
@chluehr
chluehr / h264 mp3
Created September 1, 2010 17:29
encode flv/h264/mp3
mencoder -mc 0 -noskip -o /tmp/test.flv test.mov -ovc x264 -x264encopts bitrate=300 -vf scale=248:204 -oac mp3lame -lavcopts acodec=mp3:abitrate=56