Skip to content

Instantly share code, notes, and snippets.

@bastman
bastman / MySQLIDB Example
Created Nov 6, 2011
MySQLi simple dbclient standalone php
View MySQLIDB Example
//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 Nov 7, 2011
simple jsonrpc server howto php
View gist:1344759
the request ...
================
{
"method":"foobar",
"params":["foo", "bar", "baz"]
}
@bastman
bastman / JsonRpc Client (js)
Created Nov 10, 2011
advanced json-rpc server (php)
View JsonRpc Client (js)
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 Nov 16, 2011
jsonrpc client (as3)
View CallbackVO.as
package com.application.rpc
{
/**
* ...
* @author seb
*/
public dynamic class CallbackVO extends Object
{
@bastman
bastman / gist:1372905
Created Nov 17, 2011
as3 firelog - firebug logger
View gist:1372905
package com.basilicom.utils
{
import flash.external.ExternalInterface;
public class FireLog
{
public static function log(msg:String = null, data:* = null):void
{
try
View Lib_Utils_Array_List_Values.php
/**
* 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
{
View Lib_Utils_Vector_UnsignedInt.php
<?php
/**
* Lib_Utils_Vector_UnsignedInt
*/
class Lib_Utils_Vector_UnsignedInt
{
@bastman
bastman / Lib_Utils_Vector_UnsignedBigIntString.php
Created Dec 3, 2011
Lib_Utils_Vector_UnsignedBigIntString
View Lib_Utils_Vector_UnsignedBigIntString.php
<?php
/**
* Lib_Utils_Vector_UnsignedBigIntString
*
*/
class Lib_Utils_Vector_UnsignedBigIntString
{
View Basilicom.console.js
try {
if (!Basilicom) {
Basilicom = {};
}
}catch(e) {
Basilicom = {};
}
// +++++ Basilicom.console ++++++++++++
@bastman
bastman / Lib_Utils_Array_Dictionary.php
Created Jan 8, 2012
Lib_Utils_Array_Dictionary (php)
View 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