Skip to content

Instantly share code, notes, and snippets.

Morgan Aldridge morgant

Block or report user

Report or block morgant

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Keybase proof

I hereby claim:

  • I am morgant on github.
  • I am morgant ( on keybase.
  • I have a public key ASBYIZBmTq0sdXPwOvb5jluT37dE3napZNsnO5rRq12i1Ao

To claim this, I am signing this object:

morgant /
Last active Jul 11, 2018 — forked from kirkegaard/
pipe a mysql dump through gzip and send it over ssh
# dump to another server
mysqldump -u MYSQL_USERNAME -p YOUR_DATABASE | gzip -c | ssh USERNAME@YOUR_TO_HOST 'cat > ~/dump.sql.gz'
# dump from another server
ssh USERNAME@YOUR_TO_HOST 'mysqldump -u MYSQL_USERNAME -pPASSWORD YOUR_DATABASE | gzip -c' > ~/dump.sql.gz
morgant / js-get-fn-name.js
Last active Jun 14, 2018 — forked from dfkaye/js-get-fn-name.js
get a javascript function name
View js-get-fn-name.js
function getFnName(fn) {
var f = typeof fn == 'function';
var s = f && (( && ['',]) || fn.toString().match(/function ([^\(]+)/));
return (!f && 'not a function') || (s && s[1] || 'anonymous');
function currentFnName() {
try {
return getFnName(arguments.caller);
} catch(e) {
morgant / 01.make
Created Jun 11, 2015
tigerbrew ld64 on 400MHz PowerBook G3 (Pismo) w/Mac OS X 10.4.11 Tiger
View 01.make
Wed Jun 10 08:43:17 EDT 2015
OTHER_CPPFLAGS=-I/usr/local/opt/libunwind-headers/include -I/usr/local/opt/dyld-headers/include -I/usr/local/opt/cctools-headers/include
OTHER_LDFLAGS=-L/usr/local/lib -Wl,-headerpad_max_install_names
touch src/ld/configure.h
morgant / gist:0d7c32c5520965a84292
Created Nov 24, 2014
Asterisk 12.7.0 crash on OS X 10.10.1 in app_voicemail's notify_new_message()
View gist:0d7c32c5520965a84292
Process: asterisk [42090]
Path: /usr/local/sbin/asterisk
Identifier: asterisk
Version: ???
Code Type: X86-64 (Native)
Parent Process: asterisk [42047]
Responsible: Terminal [315]
User ID: 0
Date/Time: 2014-11-24 16:01:41.259 -0500
morgant / gist:49ca14d05d8b5469e5d1
Last active Aug 29, 2015
Asterisk 12.7.0 successful build on OS X Yosemite 10.10.1
View gist:49ca14d05d8b5469e5d1
$ LDFLAGS=-L/opt/local/lib \
> CFLAGS=-I/opt/local/include \
> CPPFLAGS=-I/opt/local/include \
> ./configure \
> --without-netsnmp
checking build system type... x86_64-apple-darwin14.0.0
checking host system type... x86_64-apple-darwin14.0.0
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
morgant / gist:53b57c2eab7c74653eb2
Created Nov 20, 2014
Asterisk editline failure (Yosemite)
View gist:53b57c2eab7c74653eb2
cd editline && test -f config.h || CFLAGS="-D_THREAD_SAFE -I../..//include -I/opt/local/include -fno-strict-aliasing -I/Applications/ -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 -D__Darwin__ -mmacosx-version-min=10.6 -O3 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 " LDFLAGS="-L/opt/local/lib -L/usr/local/lib " ./configure --build=x86_64-apple-darwin14.0.0 --host=x86_64-apple-darwin14.0.0 --with-ncurses=/opt/local --with-curses= --with-termcap= --with-tinfo=
loading cache ./config.cache
checking for gcc... gcc
checking whether the C compiler (gcc -D_THREAD_SAFE -I../..//include -I/opt/local/include -fno-strict-aliasing -I/Applications/ -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 -D__Darwin__ -mmacosx-version-min=10.6 -O3 -U_FORTIFY_SOU
morgant / Mavericks
Last active Aug 29, 2015
MacPorts installed to build Asterisk (Yosemite & Mavericks)
View Mavericks
$ port installed
The following ports are currently installed:
cctools @855_1+llvm35 (active)
cctools-headers @855_0 (active)
cloog @0.18.2_2 (active)
expat @2.1.0_0 (active)
gcc48 @4.8.3_2 (active)
gcc_select @0.1_8 (active)
gdbm @1.11_1 (active)
gettext @0.19.3_1 (active)
morgant / gist:344b7880579d59389ee7
Created Nov 20, 2014
Asterisk 12.7.0 build failure on OS X Yosemite 10.10.1 with MacPorts prerequisites and manual build
View gist:344b7880579d59389ee7
sudo port sync
sudo port install gcc48
sudo port install glib2-devel
sudo port install jansson
curl -O
tar -xzf asterisk-12.7.0.tar.gz
cd asterisk-12.7.0
run port select --set gcc mp-gcc48
./configure —with-jansson=/opt/local
morgant / gist:77eac17bce413504bf71
Created Nov 19, 2014
Asterisk 12.2.0 build failure on OS X Yosemite 10.10.1 when manually building
View gist:77eac17bce413504bf71
# my attempted manual build process
tar xzf asterisk-12.6.1.tar.gz
cd asterisk-12.6.1
./configure --disable-option-checking --prefix=/usr/local --without-netsnmp --without-gtk2 --with-ssl=/usr/local/opt/openssl --with-sqlite3=/usr/local/opt/sqlite --with-unixodbc=/usr/local/opt/unixodbc CC=/usr/local/bin/gcc-4.8 CXX=/usr/local/bin/g++-4.8 CPP=/usr/local/bin/cpp-4.8 CFLAGS=-fno-strict-aliasing
CC=/usr/local/bin/gcc-4.8 ; CXX=CC=/usr/local/bin/g++-4.8 ; CPP=/usr/local/bin/cpp-4.8 ; CFLAGS=-fno-strict-aliasing ; make menuselect/cmenuselect menuselect/nmenuselect menuselect/gmenuselect menuselect/menuselect menuselect-tree menuselect.makeopts
menuselect/menuselect --enable DISABLE_INLINE menuselect.makeopts
menuselect/menuselect --disable BUILD_NATIVE menuselect.makeopts
CC=/usr/local/bin/gcc-4.8 ; CXX=CC=/usr/local/bin/g++-4.8 ; CPP=/usr/local/bin/cpp-4.8 ; CFLAGS=-fno-strict-aliasing ; make all NOISY_BUILD=1
You can’t perform that action at this time.