My thoughts on food, technology, politics, running and... nope, those are the only thoughts I've got!
Wednesday, July 31, 2019
EXIF metadata with a Promise
This is what I came up with:
const exif = require('exiftool');
const util = require('util');
const exif_metadata = function (data) {
return new Promise((resolve, reject) => {
exif.metadata(data, (err, metadata) => {
if (err) {
reject(new Error(err));
} else {
resolve(metadata);
}
});
});
};
Worked great!
const fs_readFile = util.promisify(fs.readFile);
Promise.resolve()
.then(() => {
return fs_readFile(path);
})
.then(data => {
return exif_metadata(data);
})
.then(metadata => {
console.log('metadata: %O', metadata);
})
.catch(error => {
res.send(error.toString());
});
Saturday, July 27, 2019
Add Port to UFW
And while being super restrictive is generally a good thing, there are times when you have to poke a new hole and connect from another system inside the house.
Usually it's a new app running on a new port and since I never remember the command to allow this, here it is:
$ sudo ufw allow from 192.168.1.0/24 to any port 3100
You're welcome, future self!
Saturday, July 20, 2019
The DX-M04 Shelving System
I don't think a nicer set of shelves can be had at any price. And do you see the little screwdriver pictured in the instructions? YES, the DX-M04 really does come with a screwdriver!! And the bottom panel (part #3) has feet. Yes, they really did think of everything.
If I could make one suggestion:
At step three, you might want to leave the bottom a little loose, so when, in step four, you insert the back, you can wiggle it into the groove in the bottom. Then after you've installed the top in step five, you can go back and tighten the bottom.
If you need some shelves, you can't go wrong with the DX-M04. No, no idea where you'd buy them, but for the right price, I can put my hands on a really well assembled set.
Friday, July 19, 2019
MySQL CRAZIES
WHAT?? ME TOO!!
In this case, I'm inserting just a few columns, and there are non-specified columns without default values.
In my other database it just works - I know, not correct behavior, but it's what I'm used to.
In my new database I get this error:
ERROR 1364 (HY000): Field 'xxx' doesn't have a default value
So what's the difference?
STRICT MODE
Thanks, documentation!!
Before, strict mode. Giving me an error...
mysql> select @@GLOBAL.sql_mode;
+-------------------------------------------------------------------------------------------------------------------------------------------+
| @@GLOBAL.sql_mode |
+-------------------------------------------------------------------------------------------------------------------------------------------+
| ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+-------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
After, non-strict mode. Working like my other database!
mysql> SET GLOBAL sql_mode = '';
Query OK, 0 rows affected, 1 warning (0.00 sec)
Tuesday, May 14, 2019
MySQL Passwords
Problem:
- MySQL version 8+
- github.com/go-sql-driver/mysql
- db, err = sql.Open("mysql", "username:password@/database")
(no error) - query, err := db.Query("SELECT * FROM TABLE")
this authentication plugin is not supported
Solution:
mysql> alter user 'username'@'localhost' identified with mysql_native_password by 'password';
See also: https://github.com/go-sql-driver/mysql/issues/785
Friday, March 08, 2019
How to Cook Chicken
375 degrees for 20 minutes, was it?
WIP: I'll note more detail next time.
How to Cook Salmon
- 1 lb salmon
- couple TBS oil
- Fish seasoning (salt, etc)
425 deg, 25 min
WIP: I'll write down more about this when I get a chance
Wednesday, February 06, 2019
My Very Own Burrito Recipe
His recipe has been lost to the fog of time, but here's one I think he would like:
Makes two good-sized burritos
Ingredients
- 1/4 lb., your choice of meat, cooked (alternatively 1/2 cup of cooked beans)
- 1/2 cup, cooked rice
- 1/2 cup, grated cheese - I used cheddar
- 1/4 cup, salsa
- two 10-inch flour (or gluten-free) tortillas
Steps
- Mix it all up (everything but the tortillas, of course) in a microwave-safe dish (or fire-safe, if you're into that kind of thing).
- Heat (microwave, fire, etc) the mixture until the cheese is melted
- Give it all a good stir
- Divide the melty mixture between the two tortillas, flattening and shaping it so as to create proper burrito-shaped innards
- Fold the two sides toward the middle, then the near end over the center; finally flop the middle part onto the other end of the tortilla - please don't make me draw a diagram
Serve with a little more salsa, some Spanish rice, maybe some refried beans.
Monday, December 31, 2018
Onion Dip Experiment #2
Here are my notes from last time.
Here's what I'm doing this time...
Ingredients
- 2-3 small-medium onions (2 cups finely chopped)
- 2 TBS unsalted butter
- 3/4 tsp Kosher salt
- 1/8 tsp pepper
- 2 cups, plain yogurt
- 2 TBS chives
Melt the butter. Add the onions and 1/2 tsp salt. Cook until golden brown. You'll know they're golden brown when a spouse or other responsible adult tells you you're golden brown. It should take about 30-35 minutes.
Put the cooked onions in a tightly covered dish and refrigerate until cool. While you wait, you can tweet or write a blog post about the experience.
Once the onions are cool, mix them in a medium bowl with the yogurt, 1/4 tsp salt, the pepper, and the chives.
So as promised, the sodium content. The TOTAL sodium in the whole recipe is just about 1000 mg:
- onions: 8 mg
- unsalted butter: 0 mg
- 3/4 tsp kosher salt: 840 mg
- pepper: <1 mg
- yogurt: 150 mg
- chives: 0 mg
Let's compare this with Lipton's onion soup mix. The mix itself has 610 mg. The sour cream adds another 40-something.
This recipe reduces the sodium by more than 80%. That's quite a savings!!
Can we get that number up to 96%? Stay tuned, I'll try that in a couple weeks!
Tuesday, December 25, 2018
Sausage Bread
Sausage Bread
- 1 box of hot roll mix
- 1/4 cup Parmesan cheese
- 1/2 cup grated Swiss cheese
- 2 eggs beaten
- 1/4 tsp Tabasco
- 1/2 tsp salt
- 2 tbsp parsley
- 1 onion chopped
- 1 lb sausage, hot or sweet
Mix dough according to directions on box. Let rise 45 min. Roll out 1/4" thick oval. Cook onions wish sausage (not brown). Drain excess fat. Add all other ingredients. Stir until cheese has melted. Let cool. Don't spread to edges. Roll up and pinch ends together. Shape into crescent. Place on greased cookie sheet (with edges). Bake 20 min at 400 degrees until brown and toothpick comes out fairly clean.
I'm going to try and make this with gluten free bread dough sometime soon. I'll report back.
Sunday, December 23, 2018
Italian Wedding Soup
I used a one-pound box of baby spinach for the greens.
Instead of the three kinds of meat, I just used a pound of ground turkey.
Gillian's (unseasoned) gluten free bread crumbs worked very nicely.
I made the meatballs smaller - about 3/4 inch - which I find much nicer for soup.
And when you put them into the broth, it's a good idea to count them, so you know just how many you have if you're divvying them up for a large crowd. This batch served thirteen people as a soup course with a couple cups left over.
The spinach and puffed-up meatballs insisted on floating to the top, so swirling in the egg and cheese mixture was a bit difficult. I actually removed a bunch of it to perform this step!
Garnish means "don't eat me" in Italian. Next time I'd use whole leaves of parsley and more coarsely grated cheese. (yes, eat the cheese)
Here's a pantry/fridge/freezer/shopping list for your convenience:
3 quarts homemade chicken stock (I might have used four? sorry, not sure)
1 lb. ground turkey
1 cup unseasoned (gluten free for my needs) bread crumbs
1/8 lb. Parmigiano-Reggiano (sorry, not sure how much I actually used)
3 large eggs
a medium onion
a bunch of fresh parsley
two cloves of garlic
kosher salt
black pepper grinder
Tuesday, December 11, 2018
Onion Dip Experiment #1
So I went looking for an onion soup recipe to play with, and I found this one. My plan was to make it the first time exactly as written, but since I had some sour cream left over from Hanukkah, I combined that with some plain yogurt (Siggi's). And instead of unsalted butter and salt, I used the Land O' Lakes spread we had in the fridge. The rest of the salt I figured I would leave out.
The mixture is way too thick for my taste, so I think instead of the cream cheese, I'll stick with all yogurt next time - Greek or Icelandic.
My dip seemed a little bland, so I added some garlic powder. I guess I wish I'd read the original recipe's comments section, because somebody suggested adding a little cayenne pepper. That seems like a better idea.
Another commenter suggested getting a better texture by putting the cooked onions through a food processor. That seems like a lot of work, so I think next time I'll chop the onions instead of just slicing them before cooking them.
Now as for the salt, the recipe calls for cooking with a half teaspoon of salt, which I left out, though I did use a buttery spread containing about 25 mg of sodium per serving of dip. The additional quarter teaspoon of salt the recipe calls for only adds another 30 mg of sodium per serving, so I think next time, I'll leave it in. The overall sodium savings compared with processed soup mix has to be at least 500 mg. Once I have the recipe
One more thing, I put a small container in the freezer. I'll thaw it out next week and see if it's any good. Update: I froze a 5 oz yogurt container of the original unsalted recipe. It was in there for about a week and then I put it in the refrigerator for about a day to thaw. The texture was just as it was, still too thick for my taste. And taste, just the same. I would have added some cayenne, but dang it, there wasn't any in the cupboard. That will have to wait for experiment #2.
UPDATE: read all about Onion Dip Experiment #2!
Monday, November 26, 2018
Soup: Split Pea with Turkey
Enter this recipe. I used turkey broth instead of chicken. And instead of ham, I used the turkey that boiled off the bones during the broth-making. And I left out the salt (and forgot about the pepper).
It's really good!
There's still plenty of broth left over, some of which will turn into Sherry Noodle Soup. But I also plan to make a batch (or half batch) of split pea with a cup of water swapped out for sherry. UPDATE: I swapped 1/2 cup water for sherry, which really helps when you cook without salt. It was a great addition!
Saturday, November 17, 2018
Apache Reverse Proxy for Microservice Subdomain
Now you want to add a microservice, but you don't want to add more hosting. Can you add it to this existing host? Yes you can!
Here's how to add a subdomain - tictactoe.example.com - that will send requests to your microservice that's listening on port 8888.
Put the following in /etc/apache2/sites-available/tictactoe.com.conf
<VirtualHost *:80>
ServerName tictactoe.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ProxyPass "/" "http://example.com:8888/"
ProxyPassReverse "/" "http://example.com:8888/"
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Then add your site:
sudo a2ensite tictactoe.com
The best part is your Go code (or Rust, Ruby, Python, whatever) can just handle HTTP. You can use Let's Encrypt/certbot to add the HTTPS virtual host that will proxy secure traffic to your microservice as well.
UPDATE: Nothing like getting an invalid command error trying to do this on an Apache without proxy enabled. So...
sudo a2enmod proxy_http
Sunday, November 11, 2018
All kinds of Ubuntu troubles (fixed)
1. Can't get Ubuntu to start up without using recovery mode? Try making this change in /etc/defaults/grub
GRUB_CMDLINE_LINUX_DEFAULT="nomodeset"
But then don't forget to
$ sudo update-grub
I've lost track of all the sites I looked at that steered me in the right direction, but I was still having trouble because I'd forgotten the update-grub step!
2a. Trouble getting VNC to install and start up? Look no further than Ubuntu's own Screen Sharing feature!
2b. Once I got that working, I discovered that I could not connect using:
- the RealVNC viewer (error: "Unable to connect to VNC Server using your chosen security setting. Either upgrade VNC Server to a more recent version from RealVNC, or select a weaker level of encryption.")
- MacOS Screen Sharing (error: "The software on the remote computer appears to be incompatible with this version of Screen Sharing.")
Thursday, November 01, 2018
Git won't Pull
$ git pull
nc: getaddrinfo: nodename nor servname provided, or not known
ssh_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository.
origin git@github.com:blah/blah (fetch)
origin git@github.com:blah/blah (push)
...
sshCommand = ssh -o 'ProxyCommand=nc -X connect -x blah:80 %h %p'
...
Aha!
Possible solution: remove sshCommand line from .git/config unless you are ALWAYS connecting through the proxy server.
Friday, October 26, 2018
Sherry Noodle Soup (v2!)
But I found it on a hard drive and decided to cook up a batch. But nah, that recipe needed a little tweak here and there. So without further ado, here's version two...
- A couple chicken bodies or one turkey frame, with a little meat left on (you'll want about two cups of meat off the bones later)
- 3 quarts, water
- 1 medium-large onion (half quartered, half chopped)
- 2 tsp, salt (if you really must)
- 1 cup, dry sherry
- 1½ tsp, oregano
- 1 tsp, thyme
- 1/8 tsp, ground black pepper
- 2 cups, chopped carrots
- 2 cups, chopped celery
- 2 cups, raw mushrooms (optional)
- 1 lb, cooked pasta (or dry + ??? cups, water TBD)
Update (12/11/18): I made this with mushrooms for the first time the other day, and I really liked how it turned out!
Saturday, June 16, 2018
Fix your iTunes names (and numbers!)
https://github.com/dldnh/fix-itunes-names
Fix_iTunes_names.scpt) that will go through all of the songs and rename them from 'dd-tt- Title of the Song' to just 'Title of the Song' - but ONLY IF dd matches the disc number and tt matches the track number. So totally safe!Fix_itunes_names_and_numbers.scpt) for more adventurous folks that will also rename songs from 'dd-tt- Title of the Song' to just 'Title of the Song' and ALSO set the disc number and tarck number to dd and tt - but ONLY IF either number was blank to start with.Sunday, February 11, 2018
Use curl to test nginx rewrite rules
The answer author wrote this correct rewrite rule:
location /foo {
rewrite /foo/(.*) /$1 break;
proxy_pass http://localhost:3200;
proxy_redirect off;
proxy_set_header Host $host;
}
Which was later edited erroneously:location /foo {
rewrite /foo(.*) /$1 break;
proxy_pass http://localhost:3200;
proxy_redirect off;
proxy_set_header Host $host;
}
That very subtle change causes nginx to redirect, which is undesirable.This can easily go unnoticed without curl testing:
$ curl -i http://localhost:8080/foo/bar HTTP/1.1 301 Moved Permanently Server: nginx/1.13.8 Date: Sun, 11 Feb 2018 14:18:12 GMT Content-Type: text/html; charset=utf-8 Content-Length: 40 Connection: keep-alive Location: /bar <a href="/bar">Moved Permanently</a>.I've edited the answer back to the original.
Here's a great article about setting up nginx for serving Go apps.
NOTE: you'll need the GVM readme for an up-to-date command to install GVM.
Friday, December 15, 2017
ISP's and Markets
Just wait until Disney starts telling Time Warner to pony up for all the Toy Story they've been carrying. The real problem is that consumers have little or no choice of ISP. Each ISP has a practical monopoly in the markets where they operate.
In order for a free market to be a solution to some problem, there has to be a choice. I may choose from a variety of content providers, but I don't get to choose my cable company.
If a consumer doesn't like the way their ISP is regulating content, they should be able to choose a different ISP. But they can't. Maybe it's time we start regulating ISP's like the monopolies they really are.
Sunday, July 09, 2017
When resources unavail
|
$ ps -fewww | grep -v grep | grep firefox bash: fork: retry: Resource temporarily unavailable bash: fork: retry: Resource temporarily unavailable bash: fork: retry: Resource temporarily unavailable bash: fork: retry: Resource temporarily unavailable bash: fork: Resource temporarily unavailable |
When this first happened, I figured I would reboot and that, of course, would fix it. But I couldn't even run shutdown! That's when I thought of this extremely inelegant but useful solution:
|
$ cd /proc $ kill * |
And that freed up enough of whatever that I could get on with the reboot and then with my life.
When it happened today, I googled around and saw saw solutions suggesting...
- su root and (WRONG: can't su)
- ps blah blah and (WRONG: can't ps)
- ulimit (hmmm... OK I'll try that.)
|
$ ulimit -a ... max user processes (-u) 2047 ... $ ulimit -u 2100 |
Upping that value allowed me to kill and restart Firefox without rebooting!!
Thanks, IBM!!
Friday, March 24, 2017
Mac + Virtualbox/Linux ALT=CMD
It's much more natural to swap these, i.e. to map ALT to CMD.
And here's how you do it:
Create ~/.Xmodmap containing...
clear mod1
clear mod4
keycode 133 = Alt_L NoSymbol Alt_L
keycode 64 = Super_L NoSymbol Super_L
add mod1 = Alt_L
add mod4 = Super_L
And then
$ xmodmap ~/.Xmodmap
Enjoy!
Monday, January 23, 2017
VNC + Mac OS + Option Key = WINNING!!
Take the Option Key. Very helpful if you're using the Finder.
Ever try using the Option Key when you're connected remotely to your Mac Desktop using VNC? It just doesn't work. VNC settings, nothing.
But I have discovered a solution. Simply turn on Sticky Keys and use the Keyboard Viewer. Now you can use your mouse to press the Option Key - not ideal, but in a pinch, it's better than nothing!
Here are the step-by-step instructions for setting this up:
1. Open up the Preferences
2. Choose Accessibility
3. Turn on Sticky Keys
4. Go back to Preferences and choose Keyboard
5. Turn on "Shoe keyboard and emoji viewers in menu bar"
6. Open up the Keyboard Viewer
7. Now whenever you need to hold down the Option Key, tap it in the Keyboard Viewer
8. If you didn't have Sticky Keys turned on, you'd have to keep it held down in the viewer, but you can just tap it the once. Tapping it again puts it into some other state. Tapping it a third time turns it off. So whenever I want Option, I double click it in the viewer. Then I do whatever it was that needed the Option Key in the first place. And then I tap it again to turn it off.
I hope you find this helpful!
Saturday, December 24, 2016
#selector vs Selector
The warning (No method declared with Objective-C selector 'swipedLeft:') should be your first clue that there's a problem...

If you use this code in Swift 3, the left-swipe will result in an error like this:
Worst of all, examples like this are all over the place because leaving out the colon results in a similar error.
Thanks to this answer I learned that what you want instead is this:
Friday, September 09, 2016
VNC black screen of sadness
Monday, June 20, 2016
Old code, new Xcode
[self.window addSubview:self.viewController.view];
and it runs just fine... and later you update Xcode and start getting runtime errors:
Applications are expected to have a root view controller at the end of application launch
Fortunately the fix is easy:
[self.window setRootViewController:self.viewController];
Thanks, Interwebs!!
Saturday, April 23, 2016
Thursday, April 07, 2016
Major accomplishment
Sunday, January 10, 2016
Beach Ball!!!
Saturday, January 02, 2016
Friday, January 01, 2016
Swift selector argument - yes you can!
For example, if you are calling performSelectorOnMainThread to work around the problem between GCD and UIWebView that causes hangs in stringByEvaluatingJavaScriptFromString (see here) you don't have a choice.
But how to pass an argument? I defined my selector function to take AnyObject? just as I assumed I should since withObject:AnyObject?
So tl;dr - here's what I was doing wrong. The colon at the end of the selector DOES MATTER. Well duh, of course it does, because it indicates there's an argument. Here's an example of everything working correctly...
private func caller() {
let arg = 42
performSelectorOnMainThread("myfunc:", withObject: arg, waitUntilDone: false)
}
func myfunc(arg: AnyObject?) {
guard let n = arg as? Int else {
print("how did we get in this cornfield?")
return
}
print("and here we are with our arg n: \(n)")
}
...and the proof of the pudding - my, how tasty!
and here we are with our arg n: 42
Thursday, December 10, 2015
What To Wear
| °F | Just Right | Too Much | Not Enough |
|---|---|---|---|
| 56 |
| didn't need the hat or gloves or extra LST | n/a |
Wednesday, November 25, 2015
Handy howmany commandy
tcsh & csh
alias howmany "echo 'select count(*) from table;' | sqlplus -s 'xxxxxx/xxxxxx@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxxxxx)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=xxxxxx)))'"
sh & bash
alias howmany="echo 'select count(*) from table;' | sqlplus -s 'xxxxxx/xxxxxx@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxxxxx)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=xxxxxx)))'"
(for ksh use either) - and then...
$ howmany
Enjoy!
p.s. I'd love to add a pipe to
sed -e '/^$/ d; s/^\s-*//g'
but the dollar sign screws things up, at least in tcsh. Oh well!
Wednesday, November 18, 2015
Sunday, November 15, 2015
Hard-to-read Podcasts
Saturday, November 14, 2015
Don't take checks from strangers
Wednesday, October 07, 2015
Emacs cleanup
;; kill buffers visiting /scratch or /tmp files
(defun cleanup ()
(interactive)
(let* (
(n)
(list)
(file)
)
(setq list (buffer-list))
(setq n 0)
(save-excursion
(dolist (elt list)
(setq file (buffer-file-name (get-buffer elt)))
(if (and
file
(or
(string-match "^/scratch/" file)
(string-match "^/tmp/" file)
)
)
(progn
(if (kill-buffer elt)
(setq n (+ n 1))
)
)
)
)
(message "Delete %d buffer%s." n (if (= n 1) "" "s"))
)
)
)
Wednesday, August 26, 2015
I Repeat...
I'm always forgetting how to repeat a command. Here's how in tcsh:
$ repeat 9999 sh -c 'now=`date +%s` ; date > /tmp/tmp ; then=`date +%s` ; diff=`expr ${then} - ${now}` ; echo xxxxx ${diff} xxxxx ; if [ ${diff} -gt 0 ] ; then date ; fi ; sleep 15'
(The inner command is /bin/sh, of course)
Saturday, January 03, 2015
Hot and Sour Matzo Ball Soup
- Swanson Chinese hot and sour broth
- more broth (h&s or vegetable, optional)
- a can or two of mushrooms
- a scallion or two, chopped like you do
- matzo balls, prepared as directed on the back of a can of Manischewitz matzo meal
Instructions:
- Mix up the matzo ball ingredients and put them in the refrigerator.
- Cut up the scallion(s) and put them, along with the mushrooms, into the broth.
- Bring the broth and vegetables to a boil.
- Add the matzo balls to the boily broth.
- Lower the heat and simmer per the Manischewitz directions, about 30 minutes or so.
Monday, August 04, 2014
Listening Ports
Here's a handy command to find out which ports are listening:
And ymmv, but sudo is probably a good way to run that.
Saturday, April 26, 2014
Emacs Window Title
M-x set-frame-name
th! Stack Overflow
Wednesday, April 23, 2014
New cron job
Why? If you've ever run into the problem where python cron jobs start piling up because of abrtd, and you've restarted abrtd, this will help you keep an eye on things. Every hour on the 18 (so as not to run into one of my running python scripts) I'm counting python processes and if there are more than four, I'll hear about it.
Friday, January 31, 2014
Pet Peeve: "infinite number of"
Why say "infinite number of monkeys" when you can just say "infinite monkeys"??
Tuesday, January 28, 2014
Solaris TAR with Excluded Directories
$ tar cfX - /tmp/excludes . | gzip > ~/excluded.tgz
where /tmp/excludes looks like this:
./sub1
./sub2
./sub3
So it's not just a list of what's excluded, it's starting with the dot!
hattip: thank you, My Couple Of Cents!!
Saturday, November 02, 2013
Android SQLite queries and numeric predicates
Uri uri = MyProvider.URI;
String[] projection = ...;
String where = COLUMN_NAME + "=?";
String[] whereArgs = new String[] { someValue };
String sortOrder = SORT_COL + " " + sortDir;
Cursor c = getContentResolver().query(uri, projection,
where, whereArgs, sortOrder);
String[] projection = ...;
String where = COLUMN_NAME + "=(?+0)";
String[] whereArgs = new String[] { Long.toString(someValue) };
String sortOrder = SORT_COL + " " + sortDir;
Cursor c = getContentResolver().query(uri, projection,
where, whereArgs, sortOrder);
Tuesday, October 22, 2013
World Series Match-Ups
In case you're wondering about other match-ups, here is the complete list of which teams have played each other how many times.
11 Dodgers & Yankees
7 Giants & Yankees
5 Cardinals & Yankees
4 Athletics & Giants
4 Braves & Yankees
4 Cubs & Tigers
3 Cardinals & Red Sox
3 Cardinals & Tigers
3 Reds & Yankees
2 Athletics & Cardinals
2 Athletics & Cubs
2 Athletics & Dodgers
2 Athletics & Reds
2 Braves & Indians
2 Cubs & Yankees
2 Giants & Senators
2 Orioles & Pirates
2 Phillies & Yankees
2 Pirates & Yankees
1 Americans & Pirates
1 Angels & Giants
1 Astros & White Sox
1 Athletics & Braves
1 Athletics & Mets
1 Blue Jays & Braves
1 Blue Jays & Phillies
1 Braves & Twins
1 Brewers & Cardinals
1 Browns & Cardinals
1 Cardinals & Rangers
1 Cardinals & Royals
1 Cardinals & Twins
1 Cubs & Red Sox
1 Cubs & White Sox
1 Diamondbacks & Yankees
1 Dodgers & Orioles
1 Dodgers & Twins
1 Dodgers & White Sox
1 Giants & Indians
1 Giants & Rangers
1 Giants & Red Sox
1 Giants & Tigers
1 Giants & White Sox
1 Indians & Marlins
1 Indians & Robins
1 Marlins & Yankees
1 Mets & Orioles
1 Mets & Red Sox
1 Mets & Yankees
1 Orioles & Phillies
1 Orioles & Reds
1 Padres & Tigers
1 Padres & Yankees
1 Phillies & Rays
1 Phillies & Red Sox
1 Phillies & Royals
1 Pirates & Senators
1 Pirates & Tigers
1 Red Sox & Reds
1 Red Sox & Robins
1 Red Sox & Rockies
1 Reds & Tigers
1 Reds & White Sox
Wednesday, August 07, 2013
MySQL Reference
- Redhat Enterprise Linux (RHEL) Install and Configure MySQL Database Server
- How Do I Enable Remote Access To MySQL Database Server?
So thanks, nixCraft, for the assist!!
Tuesday, July 02, 2013
Upgrading Debian
Why? Why not!!
Actually, it's because of the whole google-chrome-stable and gconf-blah-blah business. It's scrolled off my screen, but it's all over the internets.
Mainly I'm following the steps I found here at HowtoForge.
Updated my sources.list, just replacing squeeze with wheezy
Did an update and an upgrade, started to do a dist-upgrade, but got this error:
E: Could not perform immediate configuration on 'openjdk-6-jre'. Please see man 5 apt.conf under APT::Immediate-Configure for details. (2)
Did this to continue:
sudo apt-get remove default-jre
sudo apt-get remove openjdk-6-jre
How about being WAN'd in via SSH and my end goes sleepy or wonky? Yikes!! But I did a:
sudo dpkg --configure -a
and the dist-upgrade is chugging along again.
A word of advice to whoever is responsible for configuration files: It sure would be nice if I could resolve all of the config conflicts either before or after the upgrade. Having the upgrade pause for me to Z and cp and blah blah blah, that's annoying.
And it's done. Now to fix the above:
sudo apt-get install default-jre
sudo apt-get install google-chrome-stable
Friday, June 21, 2013
Starting Oracle
$ cd install-area/oracle11/software
$ setenv ORACLE_HOME `pwd`
$ setenv ORACLE_SID orcl
$ ./bin/sqlplus 'sys/password as sysdba'
SQL*Plus: Release 11.2.0.3.0 Production on Fri Jun 21 06:35:36 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
.
.
.
$ ./bin/lsnrctl start
Filed under note-to-self and let's hope next time I remember there is a note!
Monday, March 18, 2013
Debian Console Mode?
Sunday, March 17, 2013
Debian Wireless (solved)
Sunday, March 10, 2013
My Apache setup
Friday, March 08, 2013
Tuesday, March 05, 2013
Firefox already running? Not.
Next time Firefox won't start and complains of "Firefox is already running but is not responding..."
Sunday, February 24, 2013
Friday, February 08, 2013
Where the streets have node names
Thursday, January 03, 2013
Samsung 923NW Screws
Monday, December 10, 2012
TightVNC selection sharing
autocutsel -s PRIMARY -fork
Thanks, Thomas from the Internets!
Reverting iTunes to 10.6.3 -- yes, you can!!
OR... (better yet, DON'T INSTALL ITUNES 11!! -- I hope somebody reads this before it's too late)
Sunday, December 09, 2012
VNC keymap swap
I switched to tightvncserver hoping that my vnc crashing will go away ::fingers crossed::
Saturday, December 08, 2012
Permission and PSP Import
Wednesday, December 05, 2012
Getting older sucks!!
Saturday, November 10, 2012
Trot Diamond, 2005-2012
Saturday, October 06, 2012
113 hours
I just finished with a project I've had on my list for the longest time. I watched all seven seasons of The West Wing, my favorite TV show of all time. It only took me 40 days to watch 154 episodes, about 113 hours running time. And no, I have no idea how I managed that!
Wednesday, October 03, 2012
Android Calendar tip
I'd been trying without any luck to find a way to make Agenda the default tab. I'd long given up wondering why the Week view wasn't available anymore.
Then mostly out of frustration, I long-pressed the Agenda icon and all of a sudden I was looking at this screen:
So it turns out you can choose which Calendar views to choose from and which order they appear in at the bottom of the Calendar screen. Yay!
Saturday, September 29, 2012
Ubuntu notes
| File Manager | $ nautilus |
| Terminal | $ gnome-terminal |
| System Settings | $ gnome-control-center |
| Update Manager | $ sudo update-manager |
| Backup | deja-dup (ui?) |
$ wmctrl |
Wednesday, September 05, 2012
VNC tip
Unknown message type 5
The google wasn't much help, so I just tried stabbing at it, and luckily, it didn't take long for something to happen.
But fortunately, Mac OS's built-in Screen Sharing does seem to work just fine. :-)
Useful ssh tricks
Thursday, August 16, 2012
Rezound ICS Linking Fixed!!
After the recent over-the-air upgrade of my HTC Rezound to Ice Cream Sandwich, I found that an important feature of Android (and indeed of every operating system) no longer worked: clicking links no longer launched the application responsible for handling that type of link.
I found the problem written up on Talk Android and realized I had a couple of choices:
I could restore my Rezound back to Gingerbread(Oh no you can't)- I could root my phone and make the fix.
As technical as I am, rooting is still kind of scary/daunting. I was really wishing I could go back to Gingerbread. But the Ice Cream Sandwich is so tasty! So root it would be.
My first search led me to an extremely helpful guide on Android Forums. I followed the instructions there for unlocking my bootloaded using htcdev, a tool that HTC provided. One thing I should say here is when the instructions call for using adb on the PC, you want your phone to be up and running and plugged into your PC. If you're using fastboot on the PC, your phone will want to be in the fastboot state, which, as much as it should have been obvious to me, wasn't at first.
Then I installed Amon Ra as my recovery, and I'm linking to it because that's proper, but you really should go to Android Forums and read up on all of this.
And next, to be honest, I wasn't quite sure what to do. I was under the FALSE impression that you needed to flash a ROM to be root. Don't know why I thought that, but it's not the case.
But where I ended up at this point was really great, the All-In-One Tool. It would have done the bootloader unlocking for me if I hadn't done that already. It also does five flavors of recovery flashing, which I wasn't needing at that point. What I did need, though, was Super User. And the instructions were muddy clear, so let me add some advice about that. You want to run the Perm Root (GB/ICS) command while the phone is plain old up and running, since adb is used to push a zip file, SuperSU.zip. It's after that file has been pushed that you want to reboot into recovery and use that recovery's zip installer. The output of the Perm Root command tends to give the impression that you're already rooted, but that's not the case until you've used recovery to do the installation of the zip.
So now I was rooted, but I wasn't done. I had copied /system/build.prop to my desktop, made the necessary edits* and pushed it back to my phone as /sdcard/build.prop.new, but I needed to put it back into /system. To do this, I used Mount /system (rw / ro) to make /system writable and I used Root Explorer (File Manager) to move build.prop.new to /system, rename build.prop to build.prop.old and finally rename build.prop.new to build.prop.
*Oh, and by the way, I found "ro.da1.enable" in build.prop twice, so I just made all of the changes twice.
Once I rebooted my phone, the good old linking behavior was fixed. Just as for centuries, clicking a Microsoft Word Document link on my desktop browser has always launched Microsoft Word, clicking on an Amazon MP3 link now launches the Amazon MP3 app, just as the gods intended.
Now that I'm able to declare victory, thanks to lots of help from the Internets, I'm off to click some thank-you and donation buttons.
Saturday, August 11, 2012
Screen capture!
My HTC Rezound has been upgraded (ha!!) to Ice Cream Sandwich, and I wondered whether screen shots might be possible. It is!! Just power/vol- and voila!!
Monday, April 16, 2012
Emacs Colors Begone
(setq-default global-font-lock-mode nil)
I'm not sure what version of Emacs that was for, but here's what I had to do (a couple times, actually) in version 23.1.1...
M-x global-font-lock-mode
Monday, April 09, 2012
Database Dropped
Wednesday, March 07, 2012
Fun with words
- something
- tenletters
- eighteencharacters
- two words
Sunday, March 04, 2012
layout.xml -> Activity.java
(defun xml-to-java ()
(interactive)
(progn
(setq tmp (buffer-string))
(switch-to-buffer "tmp")
(insert tmp)
(goto-char (point-min))
(save-excursion
(replace-regexp "[\n\t ]+" " ")
)
(save-excursion
(replace-regexp
" *<\\(\\w+\\)[^>]*android:id=\"@\\+id/\\(\\w+\\)\"[^>]*>"
"\nprivate \\1 \\2;\n\\2 = (\\1) findViewById(R.id.\\2);\n")
)
(save-excursion
(replace-regexp " *<!-- \\([^>]*\\) -->" "\n/* \\1 */\n")
)
(save-excursion
(replace-regexp " *<[^>]*>" "")
)
(save-excursion
(replace-string "\n\n" "\n")
)
)
)
Thursday, February 23, 2012
Facebook Subscriptions
Facebook Subscriptions
Very handy if you want to unsubscribe from annoying f-book friends.
Hat tip: Quora
Thursday, February 16, 2012
Google Calendar v3 Entry Update
I've been trying to update an event and all I've been getting back is a cryptic 400 error, "unsupported output format" -- BIG HELP!!
Well maybe if it had said input format... I don't know what made me try this, but when I set the Content-Type header of my PUT request (application/json) -- IT WORKS!!
Saturday, January 28, 2012
HTTP Clients for Android
Sunday, January 22, 2012
Android Emulator | Android Developers
Friday, January 06, 2012
(Semi-) Auto-complete your declarations
Well let's say you're declaring and assigning, like this:
SomeTypeName foo = something.getFoo();
But you can't remember the SomeTypeName part. Try this instead:
String foo = something.getFoo();
Eclipse will underline the error (oh yeah, you have to be using Eclipse, but who isn't??) and all you have to do it press Ctrl/1 (or Cmd-1 if you're on a Mac) and the quick fix will pop up,
Change type of 'foo' to 'SomeTypeName'
Just hit Enter and you're done! You're welcome!! :)
Saturday, December 10, 2011
SQLite.delete with args workaround
getContentResolver().delete(LogProvider.URI, LogDatabase.COL + " < ?", new String[] { Long.toString(lval) });
But this code does:
getContentResolver().delete(LogProvider.URI, LogDatabase.COL + " < " + Long.toString(lval), null);
Don't know if it's a bug in SQLite or in the way I was calling it. Doesn't matter, it's an easy enough workaround. Hope this saves somebody else some trouble!
Monday, December 05, 2011
Ballot Experiment
GraniteGeek at the Nashua Telegraph is doing an experiment with multi-choice ballots, and anyone can participate! Wish you could endorse Buddy Roemer's effort to get money out of elections? Afraid to vote for the candidate you truly like best because you would be "throwing your vote away"? Here is a chance to play with a system that fixes all that... Give it a try!
Friday, October 14, 2011
how to get screen to stay on when plugged in? - Android Forums
Thursday, October 06, 2011
createElement + iframe = NO
IE doesn't like it. Click here for the details and a workaround.
Wednesday, August 31, 2011
Droid2 Unrooting
Anyway, here are some links I found useful:
Here are the instructions for getting RSD Lite and the SBF file you need:
http://droid2hacks.com/droid-2-hacks/how-to-unrootunbrick-droid-2-back-to-factory/
And here is a tip on what to do when you're stuck at "Please manually power up this phone" -- just go back into the bootloader (up-arrow/power) and plug back in if you became unplugged. Part of my problem may be that I was running under Parallels and I goofed when it asked me to retain the USB connection to the phone.
Anyway, here's the other thing. When you're done, if you go to your settings and it has forgotten your phone number, no need to panic. From here I learned that by dialing *228 and hitting SEND you'll connect to the automated programming system. You'll hear stuff in the earpiece but if you pull the phone away from your face, you'll actually see the phone telling you it's being programmed. As in activated.
And Here's something else I didn't know. When I was done, I still had all of my apps. I'm not sure how this is possible. I expected everything to be wiped out. Did I do it right? Did the flash really happen? I'm assuming that it did, since my phone had to be reactivated onto Verizon's network. Oh well, it does seem to have worked!
Saturday, August 20, 2011
Thursday, August 11, 2011
Add UIBinder widget to root panel
And they give this example for adding your UIBinder object to your application:
Document.get().getBody().appendChild(helloWorld.getElement());
Maybe that's OK for an HTML UIBinder. I haven't tried that.
Instead, I was using GWT widgets in my UIBinder, and I wanted to add a ClickHandler to one of my buttons. But nothing ever happened when I clicked it. Turns out, as I read on Stack Overflow, that indeed the handlers aren't initialized properly unless you add to the root panel.
So here's what I did that worked just fine:
RootPanel.get().add(helloWorld);

















