Skip to content

Instantly share code, notes, and snippets.

View jmlane's full-sized avatar

Jonathan M. Lane jmlane

  • Fredericton, NB, Canada
  • X @jmlane
View GitHub Profile
@jmlane
jmlane / Makefile.global.diff
Created December 6, 2012 08:08
PHP 5.x OSX 10.5 Leopard Makefile.global patch
diff --git a/Makefile.global b/Makefile.global
index b30c318..e8dd419 100644
--- a/Makefile.global
+++ b/Makefile.global
@@ -20,7 +20,7 @@ libphp$(PHP_MAJOR_VERSION).la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
-@$(LIBTOOL) --silent --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1
libs/libphp$(PHP_MAJOR_VERSION).bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
- $(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp$(PHP_MAJOR_VERSION).so
+ $(CC) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(MH_BUNDLE_FLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp$(PHP_MAJOR_VERSION).so
@jmlane
jmlane / tb-puzzle.js
Created March 25, 2013 14:22
Thinking Big's puzzle for job seekers during the February 2013 ITAP PEI IT Job Fair (Charlottetown, Prince Edward Island, Canada).
var encoded = "72 6f 6e 2b 64 65 63 6f 64 65 64 40 74 68 69 6e 6b 69 6e 67 62 69 67 2e 6e 65 74";
(function(encodedString) {
// TODO: Figure out what to do here.
})(encoded);
@jmlane
jmlane / .gitconfig
Last active January 27, 2023 08:11 — forked from jvandyke/.gitconfig
Git config for PHP/WebStorm as diff and merge tool on Windows. See http://www.jetbrains.com/webstorm/webhelp/running-webstorm-as-a-diff-or-merge-command-line-tool.html for information on using the diff/merge functionality in the IDE on the command line.
# ~/.gitconfig
# Add this to your global git configuration file
# Change webstorm to phpstorm, if you use that.
# Diff and merge tool changes
# Run `git difftool <directory/file>...` or `git mergetool <directory/file>...`
[merge]
tool = phpstorm
[diff]
tool = phpstorm
@jmlane
jmlane / keybase.md
Created September 18, 2014 14:36
Keybase Proof

Keybase proof

I hereby claim:

  • I am jmlane on github.
  • I am jmlane (https://keybase.io/jmlane) on keybase.
  • I have a public key whose fingerprint is DA5D 5B34 5A7B 77EB E5B4 7F37 15FB 56C2 C319 7379

To claim this, I am signing this object:

@jmlane
jmlane / sandbox.Arma3Profile
Last active December 27, 2015 03:05
Attempting to override a limited subset of Arma 3 difficulty settings
class Difficulties
{
class Veteran
{
class Flags
{
extendetInfoType = 0;
hudWp = 0;
hudWpPerm = 0;
weaponCursor = 1;
@jmlane
jmlane / commItem_earplugsToggle.sqf
Last active February 26, 2016 18:35
Implementing ASG-style support menu earplugs in Arma 3.
if (earPlugIn) then {
.1 fadeSound 1;
earPlugIn = false;
} else {
1 fadeSound .04;
earPlugIn = true;
};
@jmlane
jmlane / keyword-plain-text.cs
Created June 13, 2018 20:36
Pidgin Parsers that parse keywords from surrounding text, but also keep the consumed text input.
var output = new System.Text.StringBuilder();
var parser = Map((text, keyword) =>
{
if (text.HasValue)
output.Append(text.GetValueOrDefault());
if (keyword.HasValue)
output.Append(GetStringFromKeyword(keyword.GetValueOrDefault()));