Skip to content

Instantly share code, notes, and snippets.

View Sodaware's full-sized avatar

Phil Newton Sodaware

View GitHub Profile
Sodaware / grow_test.bmx
Last active April 2, 2019 11:58
ObjectBag _grow test
Framework brl.basic
Const ITERATIONS:Int = 10000
Const BAG_SIZE:Int = 10000
Local startTime:Int
Local totalTime:Int
Sodaware / array_copy_test.bmx
Created April 2, 2019 11:17
Compare performance of bmx-ng's `ArrayCopy` against manual copy
Framework brl.basic
Const ITERATIONS:Int = 1000000
Const ARRAY_SIZE:Int = 1000
Local startTime:Int
' ------------------------------------------------------------------------------
' -- Copying arrays of Int
Sodaware / phing-call.el
Created November 8, 2013 17:44
Call a phing build target from within Emacs. Will use the build.xml in the directory of the current file. If no build.xml is found, it will search in the directories above until one is found. Base on Ant Call:
(defun phing-call (target)
"Call Phing's build.xml"
;; Ask for target to execute
(interactive "MPhing Target: ")
;; Open a new *phing-compilation* buffer & kill the old one
(let ((oldbuf (get-buffer "*phing-compilation*")))
(if (not (null oldbuf))
(kill-buffer "*phing-compilation*")))
Sodaware / php-extract-function.el
Created March 7, 2013 01:05
A function for refactoring PHP code. Extracts the currently marked region and moves it to a new function.
(defun php-extract-function (start end name)
"Moves the currently marked text to a new function"
;; Prompt for new method name
(interactive "r\nsNew Function Name: ")
;; Kill selected region
(kill-region start end)
;; Insert call to new function