zerodeviation.net - musings of an engineer, web developer, and picky theologian

Theology

August 25, 2009

When you stand over your child’s dead body

Tags:

Got this in today’s Grace Gem. The quote is by C.H. Spurgeon.

May you so live, that when you stand over your child’s dead body, you may never hear a voice coming up from that clay, ”Father, your negligence was my destruction! Mother, your prayerlessness was the instrument of my damnation!

Impress these words of Mine on your hearts and minds . . . Teach them to your children, talking about them when you sit at home and when you walk along the road, when you lie down and when you get up.” Deuteronomy 11:18-19

Ouch. Christian parent, are you praying for your children and training them in the way they should go? (Proverbs 22:6)

Theology

August 10, 2009

Be filled with the Spirit

Tags: , ,

Ever wonder what it means to be filled with the Spirit? In Ephesians 5, Paul explains the symptoms of a Spirit-filled Christian and even commands it. So what does that look like? I am indebted to John MacArthur for pointing the following out.

Let’s read the text first, starting in verse 18:

And do not get drunk with wine, for that is dissipation, but be filled with the Spirit, speaking to one another in psalms and hymns and spiritual songs, singing and making melody with your heart to the Lord; always giving thanks for all things in the name of our Lord Jesus Christ to God, even the Father; and be subject to one another in the fear of Christ. Wives [...]. Husbands [...]. Children [...]. Fathers [...]. (NASB)

Alright, here’s the command and the symptom of what it means to be Spirit filled. Now compare the parallel passage in Colossians 3, starting in verse 16:

Let the word of Christ richly dwell within you, with all wisdom teaching and admonishing one another with psalms and hymns and spiritual songs, singing with thankfulness in your hearts to God. Whatever you do in word or deed, do all in the name of the Lord Jesus, giving thanks through Him to God the Father. Wives [...]. Husbands [...]. Children [...]. Fathers [...]. (NASB)

Now compare the two. Look pretty similar, don’t they. Notice the first part of the first verse. In Ephesians, Paul says “be filled with the Spirit”, but in Colossians, he commands us to “[l]et the word of Christ richly dwell within you.” Both commands yield the same result, so being filled with the Spirit means to let the word of Christ richly dwell within us.

What’s the word of Christ? Follow your cross references to get an example of what that means. At the very least it means the Gospel message, but we can understand it to mean the whole revelation of God to us, i.e. the Bible. So if you never thought that reading the Bible was necessary, consider these passages. I’d also make sure to read 1 John and supplement it with my Good Person Test to test whether you are even truly saved because there is no Christian who does not desire to read God’s complete, inerrant, infallible, sufficient revelation to man. What do you think?

Technology

June 8, 2009

SSH config for non-standard ports

Tags:

This is the coolest thing I have seen in a while. I frequently spend time on remote hosts via SSH, some, if not most, of which run sshd on a port other than 22. This resulted in me adding “-p 1234″ to every single ssh command I executed.

Well, no more. Today I stumbled upon SSH config. Just edit your ~/.ssh/config file and add the following to get rid of all those -p’s:

Host myserver.com
    Port 1234

Do that for all your frequently visited hosts, and you will have saved your fingers a lot of typing.

Engineering

May 25, 2009

Audio Amplifier

Tags: ,

Just wanted to get this out there before I forget about it, so I won’t have the schematics up.

This is your basic audio amplifier without any filters or fancy stuff. The little breadboard on the right has the pre-amp stage, a simple inverting op-amp amplifier with a gain of 4 V/V or so to get the voltage up. The one on the big breadboard on the left is the Class AB stage amp that provides the current to drive the speakers.

All that is plugged into my iPhone on one side and some computer speakers (without internal amplifier, that would be cheating) on the other. David Crowder Band – Wholly Yours is playing! You can see the waveform on the scope in the background, too!

Here’s the video, enjoy!

[FLOWPLAYER=audioamp.mp4,500,360]

Technology

May 8, 2009

Mouse gestures in Safari

Tags: , , , , ,

Recently I switched from Opera to Safari, more precisely the Webkit nightlies. The main reason is the great 1Password password manager and form filler that takes care of all my logins and more so that I can be more secure on the web.

One of the main things I missed in Safari that I came to love in Opera are mouse gestures. I checked out the programs most often recommended, but they either didn’t work anymore or cost money now. Until I stumbled upon SafariGestures. It’s a SIMBL plugin (I use PlugSuite instead, either should work) and adds a menu item to your toolbar. From there you can set a plethora of preferences and customize it to your needs.

I actually prefer it over Opera’s mouse gestures; so far it’s been a good switch!

Theology

April 24, 2009

Not just doing, but attitude

Tags: , , ,

I am reading in 1 Chronicles right now and just finished the last chapter. David’s prayer in 1 Chronicles 29:10ff reminded me of Jesus’ Sermon on the Mount, where he raised the bar from simply doing to the intentions of the heart. Don’t just not commit adultery, don’t lust in your heart, either. Don’t just not murder, but don’t be angry with your brother, either.

Of course this wasn’t a new concept in the NT, it was supposed to have been like that all along, even under the Law, and the passage in Chronicles makes that clear. Starting in v.17 (emphasize mine):

17 “Since I know, O my God, that You try the heart and delight in uprightness, I, in the integrity of my heart, have willingly offered all these things; so now with joy I have seen Your people, who are present here, make their offerings willingly to You. 18 “O Lord , the God of Abraham, Isaac and Israel, our fathers, preserve this forever in the intentions of the heart of Your people, and direct their heart to You;

19 and give to my son Solomon a perfect heart to keep Your commandments, Your testimonies and Your statutes, and to do them all, and to build the temple, for which I have made provision.”

Notice the focus on the heart, and deeds coming from it. Especially in v19, David asks God to give his son a perfect heart to keep God’s commandments, or in other words, in order that he would keep God’s commandments. Of course God judges our actions, but He also judges our intentions and thoughts.

If you’re not a Christian, how would you stand up to a test like that?

Politics

April 8, 2009

Poll oddities

Tags:

It seems like over 61% of Americans feel like this country is headed in the wrong direction, but at the same time, 60% approve of Obama’s performance.

I realize that Obama isn’t the only one running this country, but it appears to me that he has the most influence on what’s happening right now and what will happen in the future. I don’t believe the majority of people spend too much time thinking…

Engineering

April 2, 2009

Matlab Goodness for System Analysis

Tags: , ,

This is mostly for my own reference, but I hope someone else will benefit from it. It’s mainly to play with transfer functions.

First, generate the transfer function:

% numerator coefficients for s^2 + 2s + 4
num = [1 2 4]
% denominator coefficients for s + 6
den = [ 1 6 ]
% build the transfer function
H = tf(num, den)
% now we can do fun stuff like get a bode plot
bode(H)
% or plot it over a range of frequencies, 100 to 200 radians/s
bode(H,{100,200})
% or we could get the gain and phase shift for a certain frequency, 4*pi here
[gain, phase] = bode(H, 4*pi)
% how about zeroes and poles? Okay...
tzero(H)
poles(H)

To add some more stuff, the transfer function can also be generated when you have the factored form of it to begin with:

% if the denominator looks like (s-1)(s-2)(s-3)
poles = [1 2 3]
% same for zeros: (s+1)(s+2)(s+3)
zeros = [-1 -2 -3]
% and finally, gain K
k = 1
% now we can get the system like so:
H = zpk(zeros, poles, k)

I may add more at a later point. Not too fancy stuff here, but pretty helpful to what I needed done.

Technology

March 21, 2009

DTrace with Entropy PHP on OSX Leopard

Tags: , , , ,

Similar to Xdebug, DTrace also didn’t want to work and failed with the same error, so I tried the same trick, and it worked.

Follow the instructions from Lee Packham’s blog but configure it as a 64-bit application:

  1. tar xzf dtrace-1.0.3fixtar.gz
  2. cd dtrace-1.0.3+fix
  3. phpize
  4. CFLAGS=’-arch x86_64′ ./configure –with-dtrace
  5. make
  6. make install

So far so good, the module is loaded. Now let’s see if Instruments will do its thing.

Technology

Xdebug on OSX Leopard with Entropy PHP5

Tags: , , , ,

Since I have been struggling with this for forever and finally found an answer, here’s an attempt to spread the wealth knowledge around.

Blog: Compiling & installing Xdebug for PHP 5.2.5 (Entropy.ch build) on OS X 10.5

Just to give the web crawlers some more info, the error message was:

PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so’ – (null) in Unknown on line 0

The solution is to compile it manually as a 64-bit application like so:

CFLAGS=’-arch x86_64′ ./configure –enable-xdebug

Hope this helps someone out there.