"The best advice I can give to anyone is to just stop taking supplements."
Tuesday, September 24, 2013
Monday, September 16, 2013
Gnuplot, Mountain Lion, and Malloc errors
A quick tip for google searchers:
If your Mac crashes when exiting gnuplot, or you can't interact with your X11/XQuartz plots, make sure you have Xcode updated, then try installing from sources with this command:
... instead of the usual "sudo ./configure".
If your Mac crashes when exiting gnuplot, or you can't interact with your X11/XQuartz plots, make sure you have Xcode updated, then try installing from sources with this command:
sudo ./configure --with-readline=builtin
... instead of the usual "sudo ./configure".
Thursday, August 22, 2013
Mac idle flash killer
My kids are always playing flash games on our Mac. I have nothing against flash games, of course, but when the kids want to do something else, they always go, leaving the game running on the computer.
Flash is a processor-hog, which means my computer works like crazy to keep up with it all (especially if they leave 8 tabs of Barbie karaoke going), which means the computer gets really hot and I'm sure runs like that for hours, which can't be good for it...
So -- a solution!
I've written a small perl script that checks to see if the Mac's been idle more than 10 minutes, and if so, kills all flash processes owned by the current user. Firefox then shows a message where the flash process was that the flash process crashed and you can reload it any time.
Then I set up a launchd ("launch daemon") process to run my script every 10 minutes. So those processes will now run at most 20 minutes unattended before the script kills them.
Interested?
Only do this if you trust me and accept that there's no guarantee of anything. And if anyone you don't trust asks you to download files and install them on your machine like this, don't do it.
Okay, that all said, here are the two files you need.
The scripts are so tiny you can round their sizes down to zero. The commands they issue are super simple (ps, perl, and ioreg), so the odds of anything awful happening are miniscule. Still, if for some reason you want to uninstall the scripts, here's how you do it:
Flash is a processor-hog, which means my computer works like crazy to keep up with it all (especially if they leave 8 tabs of Barbie karaoke going), which means the computer gets really hot and I'm sure runs like that for hours, which can't be good for it...
So -- a solution!
I've written a small perl script that checks to see if the Mac's been idle more than 10 minutes, and if so, kills all flash processes owned by the current user. Firefox then shows a message where the flash process was that the flash process crashed and you can reload it any time.
Then I set up a launchd ("launch daemon") process to run my script every 10 minutes. So those processes will now run at most 20 minutes unattended before the script kills them.
Interested?
Only do this if you trust me and accept that there's no guarantee of anything. And if anyone you don't trust asks you to download files and install them on your machine like this, don't do it.
Okay, that all said, here are the two files you need.
Setup:
- Unzip those two files to your desktop.
- Open Terminal (Finder: Go -> Utilities, Terminal)
- Copy/paste this command into the terminal, and press enter:
mv ~/Desktop/killFlashIfIdle.plist ~/Library/LaunchAgents; chmod a+x ~/Desktop/killFlashIfIdle; sudo mv ~/Desktop/killFlashIfIdle /usr/local/bin/ ; launchctl load ~/Library/LaunchAgents/killFlashIfIdle.plist; launchctl start local.killFlashIfIdle - Enter your password when it asks for it.
The scripts are so tiny you can round their sizes down to zero. The commands they issue are super simple (ps, perl, and ioreg), so the odds of anything awful happening are miniscule. Still, if for some reason you want to uninstall the scripts, here's how you do it:
Uninstall:
- Open Terminal (Finder: Go -> Utilities, Terminal)
- Copy/paste this command into the terminal, and press enter:
launchctl unload ~/Library/LaunchAgents/killFlashIfIdle.plist; rm ~/Library/LaunchAgents/killFlashIfIdle.plist; sudo rm /usr/local/bin/killFlashIfIdle - Enter your password when it asks for it.
Sunday, August 18, 2013
Ashton Kutcher's advice for young people
... is surprisingly wise:
His "smart is sexy" comment probably rang an odd chord with some of the youth, probably because that's not the experience most of us have -- at least the way we usually define "smart".
I'm guessing he meant something more like "confident", but thankfully the best kind of confidence comes from wisdom, which comes from knowledge paired with experience, so "smart" is a good word for this audience.
Nice job, Chris.
His "smart is sexy" comment probably rang an odd chord with some of the youth, probably because that's not the experience most of us have -- at least the way we usually define "smart".
I'm guessing he meant something more like "confident", but thankfully the best kind of confidence comes from wisdom, which comes from knowledge paired with experience, so "smart" is a good word for this audience.
Nice job, Chris.
Friday, July 19, 2013
AppleScript, the Finder, Mac OS 10.8, and "get selection"
Regular readers, skip this one -- only Googlers with very specific problems are going to be interested in this one...
I use Keyboard Maestro often in conjunction with AppleScripts to make my life easier. One of my favorites is the keystroke <cmd-b> to open files with BBEdit.
Under 10.8, AppleScript and the Finder are ridiculously slow -- "get selection" takes about 5 seconds per item selected to return a list of items selected.
The solution? Change it to "get selection as alias list". That returns the list instantaneously, and seems to work about the same in most cases.
Here's the script if you're curious (view on blogger, not feedly, to see the script correctly):
Enjoy.
I use Keyboard Maestro often in conjunction with AppleScripts to make my life easier. One of my favorites is the keystroke <cmd-b> to open files with BBEdit.
Under 10.8, AppleScript and the Finder are ridiculously slow -- "get selection" takes about 5 seconds per item selected to return a list of items selected.
The solution? Change it to "get selection as alias list". That returns the list instantaneously, and seems to work about the same in most cases.
Here's the script if you're curious (view on blogger, not feedly, to see the script correctly):
tell application "Finder"
set theApp to application file id "R*ch"
set theFiles to (get selection as alias list)
if (count of theFiles) > 0 then
open theFiles using theApp
else
open theApp
end if
end tell
Enjoy.
Sunday, June 30, 2013
Moderated posts???
Haha, I just logged into the web interface for the blog and see that I have comments on my posts going back 3 years!! Apparently they're moderated but blogspot wasn't notifying me. Sorry all! I even have my own trolls, apparently.
I'll fix it.
I'll fix it.
Google Reader: The shout heard round the internet, and what to do
For everyone who uses Google Reader, you've surely heard that Google is discontinuing it tomorrow. It will be the shout heard round the internet...
Anyway, the most important thing is that you go to this Google Takeout page, log in, then click "Create" archive. After a minute or so you'll be able to download the archive as a .zip file. Supposedly other products will let you import those files.
In the meantime, most people suggest Feedly. I've been using it for a day and it's pretty much the same, with a slightly confusing interface.
Interestingly you authenticate via Google -- basically Feedly asks Google to figure out who you are, then they trust what Google tells them), then it imports all your feeds and read/unread status. More info from Feedly on the whole transition here.
Hope that helps someone.
Anyway, the most important thing is that you go to this Google Takeout page, log in, then click "Create" archive. After a minute or so you'll be able to download the archive as a .zip file. Supposedly other products will let you import those files.
In the meantime, most people suggest Feedly. I've been using it for a day and it's pretty much the same, with a slightly confusing interface.
Interestingly you authenticate via Google -- basically Feedly asks Google to figure out who you are, then they trust what Google tells them), then it imports all your feeds and read/unread status. More info from Feedly on the whole transition here.
Hope that helps someone.
Monday, June 24, 2013
Food survey
Click here to take a quick (8-question) anonymous food survey.
Why? My dad and I were talking the other day, theorizing about the effects of controlling the food supply for your kids, so I thought I'd put out a quick survey to see if there's any obvious correlations so I don't inadvertently make life harder on my kids.
It'll give you a link so you can see the results at the end if you're interested.
Why? My dad and I were talking the other day, theorizing about the effects of controlling the food supply for your kids, so I thought I'd put out a quick survey to see if there's any obvious correlations so I don't inadvertently make life harder on my kids.
It'll give you a link so you can see the results at the end if you're interested.
Tuesday, June 4, 2013
The Four Stages of Committed Relationships
I have referred to this dozens of times in the last couple years, so I wanted to share it here.
Wendy Ulrich, Ph.D.:
The long road to maturity.
Wendy Ulrich, Ph.D.:
Psychologist Allen Bergin proposes that [the stages below] are equally applicable in all long-term, committed relationships, including relationships with children, parents, the Church, and God.
The first of these stages is a honeymoon stage of blinding idealism, in which we delight in our new partner and are sure that the problems faced by other couples, other parents, other believers will not bother us. We are in love, full of hope, enthusiastic about our new relationship. We relish being loved and cherished, but even more we relish being someone who is easily loving and good. We are sure we have found a wonderful spouse, child, church, relationship with God, and we are also sure that this will last. We finally know how to be in a relationship, or how to get answers to prayers, or how to be part of a community. We are happy, sure that little problems that come up will be readily resolved. This stage lasts weeks and sometimes years, but it intermittently gives way to the second stage of committed relationships, the power struggle.
As the power struggle gradually takes over more and more of the relationship we begin to wrestle for control. We may try any of a number of old or new tactics to try to coerce, cajole, reason, manipulate, blackmail, convince, bribe, punish, or flatter our partner in the relationship into changing to give us what we want, whether what we want is a spouse who does the laundry or a God who explains Himself to our satisfaction. While some of these tactics may work with spouses or children or parents, they do not work with God. He invites us to change instead, and this is often very painful. We want the world back the way it was when we were innocent and full of hope and before we had discovered the snakes in the grass, but He evicts us from the garden and tells us to keep walking. Much of our behavior is about trying to get safe, and much of His is about trying to help us see that our safety lies in our submission to and trust in Him despite pain and struggle, not in our freedom from physical or emotional discomfort. We keep thinking that there are answers and solutions to all difficulties if we can just get someone else to see our point of view and give us what we know we need. And that someone else keeps holding out on us, keeping us guessing as to what to try next. We are sure that if we could just change them we could get things back to the honeymoon, not realizing that this is not only impossible, but unhelpful.
The third stage of committed relationships, which usually comes after years of vacillating between lingering idealism and the increasing futility of the power struggle, is withdrawal. At this stage we essentially give up, although we may not leave. We resign ourselves to not really getting what we want, not really changing the other party, and not really being happy. We are tired of fighting, but we can’t recoup our lost idealism. We go through the motions of relationship but we are frustrated and we feel more or less betrayed and misunderstood. This period of withdrawal allows us to regain some independence, pursue other sources of satisfaction, and develop other talents and interests. If we are lucky we begin to work on ourselves–whom we can change–instead of working on our partner whom we cannot change. With the Church or with God, this means we begin to face that there are some questions we will not get answered, some differences that will not be worked out, some losses that will not be prevented. This is a risky stage, a stage when some people decide there is nothing to hold onto because they are no longer in love (stage 1) and no longer have hope for change (stage 2). But as we continue to work on ourselves, see reality more clearly, and resolve our own issues we have a chance of moving toward stage 4.
The fourth and final stage of committed relationships is about renewal. Not exactly a renewal of the honeymoon, but a more mature, realistic, and truly loving renewal. We come to accept our spouse or our parents or the Church, and we come to accept ourselves. We allow God to run the universe, and we become more content to let go of things we cannot change. A deeper, more mature love begins to emerge, with fewer power struggles and less disengagement. We do not need to see all the answers, and we do not need perfection by our standards in order to not be embarrassed or ashamed of our Church, our partner, or our God. We reinvest in the relationship, not because we have decided to risk yet one more time that we will not get hurt only to have the rug pulled out yet one more time from under us, but because we have learned that hurt can be survived, that this is a risk worth taking, and that it does not mean we cannot be happy or that we are irrational suckers or that we are doomed to failure because we take another chance on trust or because we fail or are failed again. We see ourselves and our partner more realistically, and we do not run from either vision. We recognize that we can be hurt by being betrayed or we can be hurt by not trusting, but we don’t get the no-hurt choice because there isn’t one, at least not until we simply choose not to read betrayal into every ecclesiastical failure, or abandonment into every unanswered prayer.
The long road to maturity.
Sunday, May 26, 2013
Parables of Jesus
Ever wonder how many parables Jesus gave? (The answer is 37.)
With the data courtesy of Wikipedia, with a little formatting from me, here's a PDF of all the parables and where to find them.
Enjoy.
With the data courtesy of Wikipedia, with a little formatting from me, here's a PDF of all the parables and where to find them.
Enjoy.
Sunday, May 19, 2013
DropScript for Mac OS X 10.8 (Mountain Lion)
Anyone remember and love the old DropScript app by Wilfredo Sánchez?
Well, I found the source code, but it wouldn't compile on my machine, so I played around with it for awhile and got it to work under Mountain Lion.
At this point I'll note that I am *not* a software developer or Obj. C programmer, and only got it to work because I've hung around the platform long enough to know the terms and am able to use Google. There might be stupid stuff in the binary and I wouldn't know it (e.g. artificially limiting it to certain OSes or architectures -- though I did check the source code for URLs, email and IP addresses making sure it isn't overtly doing anything dangerous...).
Anyway, if you're interested in a binary, leave a comment and I'll see if I can help you.
In the meantime, for those who got DropConvert and DropResize scripts from me ages ago that have now broke under Mountain Lion, try these. ;)
Well, I found the source code, but it wouldn't compile on my machine, so I played around with it for awhile and got it to work under Mountain Lion.
At this point I'll note that I am *not* a software developer or Obj. C programmer, and only got it to work because I've hung around the platform long enough to know the terms and am able to use Google. There might be stupid stuff in the binary and I wouldn't know it (e.g. artificially limiting it to certain OSes or architectures -- though I did check the source code for URLs, email and IP addresses making sure it isn't overtly doing anything dangerous...).
Anyway, if you're interested in a binary, leave a comment and I'll see if I can help you.
In the meantime, for those who got DropConvert and DropResize scripts from me ages ago that have now broke under Mountain Lion, try these. ;)
Tuesday, February 26, 2013
Resolutions
Now that my New Years resolutions have mostly disappeared into the rear-view mirror, maybe it's time for me to make some more --
Elder Joe J. Christensen:
The last two remind me of Luke 2:52: "And Jesus increased in wisdom and stature, and in favour with God and man." Mind & body, sociality & spirituality. I know *what* to improve, I think I just need more motivation (energy?) to *do* it.
Elder Joe J. Christensen:
"To a degree, we all understand the gospel and know what we should be doing in our lives. Very likely, we know more than we apply. It may be a little like the young county farm agent who wanted to put his college training to use and said to the farmer, 'Sam, you know that now we use something called contour plowing.' He went on to also expound on the benefits of hybrid strains of grain and crop rotation. About the time he got to the benefits of milking the cows three times a day rather than two, the old farmer said, 'Hey, sonny, just a minute. I'm not farming half as well as I know how already.'
"Isn't that the way life is? We seldom perform to the level of our knowledge. This brings me to the subject of resolutions -- resolutions to conform our lives more closely to what we already know about the gospel. While many of us take seriously our New Year's resolutions, some of us may not have made any because of our prior problems in keeping them. We must not overlook the power that making good resolutions can have in helping make our lives happier and more successful -- regardless of our past performance....
"I am convinced that if we make and keep resolutions in those four areas, we will have a happier and more successful new year this coming year and every year for the rest of our lives. Let's consider the nature of such resolutions and the benefits that can be ours if our resolve to improve ourselves is firm.
"Resolution number one: I resolve to expand my intellectual horizons, to increase in wisdom....
"Resolution number two: I will be resolute in preserving and strengthening my physical health....
"The third major resolution: I resolve to be a truer friend and to become more socially acceptable to people of high standards....
"The fourth resolve: I will grow spiritually -- I will increase in favor with God."
("Resolutions," BYU devotional, January 9, 1994)
The last two remind me of Luke 2:52: "And Jesus increased in wisdom and stature, and in favour with God and man." Mind & body, sociality & spirituality. I know *what* to improve, I think I just need more motivation (energy?) to *do* it.
Sunday, February 17, 2013
Lie and try.
"Lie and try" on gun background checks?
If 80,000 were caught, I wonder how many weren't?
I remember the feeling at school when I was very young -- at any time somebody could come up and smack you, kick you, throw something at you, etc. Now I don't think these kids were singling me out, they did it to everybody, and it was more playful than malicious. But it still made me very nervous, and I spent much of my time in those environments establishing my defenses -- keeping my legs stretched out and backpack in the aisle (limited their ability to walk close by), held pencils/pens pointed toward the approacher (forcing them to be a little more careful in their swings), learning the particular weaknesses of each aggressor, etc.
(I remember one time in 7th grade after school, I was waiting for my dad in the library, reading on the floor. A kid I knew came over being a jerk, and started stepping on my shoes. Without thinking I hooked my foot around the back of his heel and put my other foot on his shin and pushed. He went over backwards, backpack and books going everywhere. Take that! He stood back up, smiled, and said genuinely, "Nice move!" Curiously we were friends after that.)
Anyway, one of my favorite parts of the higher grades was that the kids stopped doing that stuff.
*Everybody* having guns kind-of makes me feel the same way -- we all know people who aren't quite stable mentally, and we're all vulnerable to gunshots. So how do we get to the "higher grades" with people like this around?
I wish we had a way to "vote" on people's ability to carry guns. We could go into a system and indicate our levels of confidence in them carrying guns. The system would weight my inputs with my overall credibility, and apply that with all the other inputs on that person, and if there was enough concern, the person would have to go in for a professional evaluation before they could get a gun license, which would be a tag on your drivers license/id. Possessing a gun without the license annotation would be a separate and serious crime.
Obviously you'd only put in inputs for people you had strong opinions about: crazies - no, friends - yes. But that's exactly the inputs you'd want. And if a person is ganged up on, a high rating on the professional evaluation would negatively affect the credibility of the raters.
As a society we're a long ways from being able to accept something like this, but certainly getting closer (thanks to things like eBay).
If 80,000 were caught, I wonder how many weren't?
I remember the feeling at school when I was very young -- at any time somebody could come up and smack you, kick you, throw something at you, etc. Now I don't think these kids were singling me out, they did it to everybody, and it was more playful than malicious. But it still made me very nervous, and I spent much of my time in those environments establishing my defenses -- keeping my legs stretched out and backpack in the aisle (limited their ability to walk close by), held pencils/pens pointed toward the approacher (forcing them to be a little more careful in their swings), learning the particular weaknesses of each aggressor, etc.
(I remember one time in 7th grade after school, I was waiting for my dad in the library, reading on the floor. A kid I knew came over being a jerk, and started stepping on my shoes. Without thinking I hooked my foot around the back of his heel and put my other foot on his shin and pushed. He went over backwards, backpack and books going everywhere. Take that! He stood back up, smiled, and said genuinely, "Nice move!" Curiously we were friends after that.)
Anyway, one of my favorite parts of the higher grades was that the kids stopped doing that stuff.
*Everybody* having guns kind-of makes me feel the same way -- we all know people who aren't quite stable mentally, and we're all vulnerable to gunshots. So how do we get to the "higher grades" with people like this around?
I wish we had a way to "vote" on people's ability to carry guns. We could go into a system and indicate our levels of confidence in them carrying guns. The system would weight my inputs with my overall credibility, and apply that with all the other inputs on that person, and if there was enough concern, the person would have to go in for a professional evaluation before they could get a gun license, which would be a tag on your drivers license/id. Possessing a gun without the license annotation would be a separate and serious crime.
Obviously you'd only put in inputs for people you had strong opinions about: crazies - no, friends - yes. But that's exactly the inputs you'd want. And if a person is ganged up on, a high rating on the professional evaluation would negatively affect the credibility of the raters.
As a society we're a long ways from being able to accept something like this, but certainly getting closer (thanks to things like eBay).
Thursday, January 24, 2013
Mystery of the unknown songs is solved!
Okay, none of you are going to remember this, but in the interest of closure --
Many years ago I asked on a blog post to help me identify 7 songs that I got in 1995 in Portoviejo, Ecuador, on a copy of a tape from E. Nielsen, who got it from E. Brinegar. Nobody knew where the songs came from (and I'm pretty sure nobody cared). A couple are elevator music, the others are cheesy new age songs. But they bring back a lot of memories so I wanted to find and own them.
Well, the first few were identified a few years ago, but the remaining 4 were a mystery until today. The latest version of Shazam (iOS app) on my iPhone picked the correct album in < 5 seconds. Previous versions hadn't worked, so something recently has changed. Hooray!
If you're interested:
Enjoy!
Many years ago I asked on a blog post to help me identify 7 songs that I got in 1995 in Portoviejo, Ecuador, on a copy of a tape from E. Nielsen, who got it from E. Brinegar. Nobody knew where the songs came from (and I'm pretty sure nobody cared). A couple are elevator music, the others are cheesy new age songs. But they bring back a lot of memories so I wanted to find and own them.
Well, the first few were identified a few years ago, but the remaining 4 were a mystery until today. The latest version of Shazam (iOS app) on my iPhone picked the correct album in < 5 seconds. Previous versions hadn't worked, so something recently has changed. Hooray!
If you're interested:
Before | Song Title | Album (click to view in iTunes) |
---|---|---|
Unknown_1 | Through the Wall | Enchantment - Chris Spheeris and Paul Voudouris - 1991 |
Unknown_2 | Pura Vida | |
Unknown_3 | Golden Days | |
Unknown_4 | Victory | Inside the Sky - Steve Haun - 1988 |
Unknown_5 | Beginning Again | |
Unknown_6 | Can't Look Back | |
Unknown_7 | Inside the Sky |
Enjoy!
Sunday, January 13, 2013
Dear Google
Today I realized how much I use Google Docs, and started to get scared. Your servers might crash, or corrupt my documents, or you might shut down your service. So I decided to download copies of all my documents off of Google Docs so I'll at least have something should that day come.
So I went to docs.google.com, and clicked the box above my list of documents, then I looked for something like a "Download" option. I quickly found it under the "More" menu, and immediately it offered to convert all of my documents to the new Office format, and .zip them all up and download them to my computer. It also gave me the option of converting them to PDF files.
The .zip file is 3 MB, and contains 88 files. The ones I opened look fine. Suddenly I love Google Docs way more than ever before. Flexibility of formats? No lock in? Ease of use? You are amazing.
Thank you for a terrific service. I hope the relatively few times I click on your ads is somehow worth all the value you give to me.
Warmest regards,
Bryan
So I went to docs.google.com, and clicked the box above my list of documents, then I looked for something like a "Download" option. I quickly found it under the "More" menu, and immediately it offered to convert all of my documents to the new Office format, and .zip them all up and download them to my computer. It also gave me the option of converting them to PDF files.
The .zip file is 3 MB, and contains 88 files. The ones I opened look fine. Suddenly I love Google Docs way more than ever before. Flexibility of formats? No lock in? Ease of use? You are amazing.
Thank you for a terrific service. I hope the relatively few times I click on your ads is somehow worth all the value you give to me.
Warmest regards,
Bryan
Subscribe to:
Posts (Atom)
Does anyone read this thing?
views since Feb. 9, 2008