Skip to content

Instantly share code, notes, and snippets.

@bastman
bastman / MySQLIDB Example
Created November 6, 2011 20:06
MySQLi simple dbclient standalone php
//Example
//=======
ini_set("display_errors", true);
error_reporting(E_ALL|E_STRICT & ~E_NOTICE);
set_error_handler(function($errno, $errstr, $errfile, $errline){
throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
});
$db = MySQLiDB::getInstance();
@bastman
bastman / gist:1344759
Created November 7, 2011 11:46
simple jsonrpc server howto php
the request ...
================
{
"method":"foobar",
"params":["foo", "bar", "baz"]
}
@bastman
bastman / JsonRpc Client (js)
Created November 10, 2011 12:57
advanced json-rpc server (php)
JS Client using jquery ajax and json2.js
========================================
App.invokeRpc = function(method, params, callback)
{
var rpc = {
method:method,
params:params
};
@bastman
bastman / CallbackVO.as
Created November 16, 2011 19:09
jsonrpc client (as3)
package com.application.rpc
{
/**
* ...
* @author seb
*/
public dynamic class CallbackVO extends Object
{
@bastman
bastman / gist:1372905
Created November 17, 2011 10:56
as3 firelog - firebug logger
package com.basilicom.utils
{
import flash.external.ExternalInterface;
public class FireLog
{
public static function log(msg:String = null, data:* = null):void
{
try
@bastman
bastman / Lib_Utils_Array_List_Values.php
Created December 2, 2011 18:00
Lib_Utils_Array_List_Values
/**
* Created by JetBrains PhpStorm.
* User: seb
* Date: 02.11.11
* Time: 09:55
* To change this template use File | Settings | File Templates.
*/
class Lib_Utils_Array_List_Values
{
@bastman
bastman / Lib_Utils_Vector_UnsignedInt.php
Created December 3, 2011 14:09
Lib_Utils_Vector_UnsignedInt
<?php
/**
* Lib_Utils_Vector_UnsignedInt
*/
class Lib_Utils_Vector_UnsignedInt
{
@bastman
bastman / Lib_Utils_Vector_UnsignedBigIntString.php
Created December 3, 2011 14:10
Lib_Utils_Vector_UnsignedBigIntString
<?php
/**
* Lib_Utils_Vector_UnsignedBigIntString
*
*/
class Lib_Utils_Vector_UnsignedBigIntString
{
@bastman
bastman / Basilicom.console.js
Created January 6, 2012 18:18
Basilicom.console.js
try {
if (!Basilicom) {
Basilicom = {};
}
}catch(e) {
Basilicom = {};
}
// +++++ Basilicom.console ++++++++++++
@bastman
bastman / Lib_Utils_Array_Dictionary.php
Created January 8, 2012 10:19
Lib_Utils_Array_Dictionary (php)
<?php
/**
* Created by JetBrains PhpStorm.
* User: VAIO
* Date: 02.11.11
* Time: 09:55
* To change this template use File | Settings | File Templates.
*/
class Lib_Utils_Array_Dictionary