Skip to content

Instantly share code, notes, and snippets.

Avatar

Phil Newton Sodaware

View GitHub Profile
@Sodaware
Sodaware / grow_test.bmx
Last active Apr 2, 2019
ObjectBag _grow test
View grow_test.bmx
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 Apr 2, 2019
Compare performance of bmx-ng's `ArrayCopy` against manual copy
View array_copy_test.bmx
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 Nov 8, 2013
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
View phing-call.el
(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 Mar 7, 2013
A function for refactoring PHP code. Extracts the currently marked region and moves it to a new function.
View php-extract-function.el
(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