Skip to content

Instantly share code, notes, and snippets.

View Sodaware's full-sized avatar

Phil Newton Sodaware

View GitHub Profile
@Sodaware
Sodaware / grow_test.bmx
Last active April 2, 2019 11:58
ObjectBag _grow test
SuperStrict
Framework brl.basic
Const ITERATIONS:Int = 10000
Const BAG_SIZE:Int = 10000
Local startTime:Int
Local totalTime:Int
@Sodaware
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
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: http://www.emacswiki.org/emacs-en/AntCall
(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
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