Skip to content

Instantly share code, notes, and snippets.

View Drarok's full-sized avatar

Mat Gadd Drarok

View GitHub Profile
/usr/share/saffire/modules
/usr/share/saffire/modules/sfl
/usr/share/saffire/modules/sfl/io.sf
/usr/share/saffire/modules/sfl/saffire.sf
/usr/share/saffire/modules/Framework.sf
/usr/share/saffire/modules/Framework
/usr/share/saffire/modules/Framework/View.sf
/usr/share/saffire/modules/Framework/Http.sf
vagrant@vagrant:/var/www$ cat index.sf
import io;
io.print("Hello, world!\n");
vagrant@vagrant:/var/www$ saffire exec index.sf
vagrant@vagrant:/var/www$
@Drarok
Drarok / TS3Radio.php
Last active December 18, 2015 00:48 — forked from JMatthewman/TS3Radio.php
<?php
// Require authentication password
require_once("auth.php");
class TS3Radio
{
protected $_clientHost;
protected $_clientPort;
@Drarok
Drarok / EventManagerAwareTrait.php
Created October 18, 2012 15:50 — forked from Mezzle/EventManagerAwareTrait.php
ServiceLocator/EventManager Traits
<?php
namespace Protec\Stdlib;
use \Zend\EventManager\EventManagerInterface;
use \Zend\ServiceManager\ServiceLocatorAwareInterface;
trait EventManagerAwareTrait
{
protected $event_manager;
Function Explode(Separator, S : String) : TStringList;
Var
PrevPos, x : Integer;
strLen,
delimLen : Integer;
Begin
If (Separator = '') Then
Raise Exception.Create('Empty separator');
Result := TStringList.Create();
<HTML>
<HEAD>
<TITLE>Volume Discount</TITLE>
<SCRIPT LANGUAGE = "JavaScript">
// A program to tell a customer what volume discount they can expect.
var numberOfGiftBoxes = window.prompt('Please enter now many boxes you are purchasing.', '');
var boxes = parseFloat(numberOfGiftBoxes);
if (isNaN(boxes))