Initial import
brought over all the files from the Jekyll version, fixed categories, reformatted for different markdown processor
This commit is contained in:
parent
1dfc7a007a
commit
67dcb2f77c
7
.gitignore
vendored
Normal file
7
.gitignore
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
.DS_Store
|
||||
Thumbs.db
|
||||
db.json
|
||||
*.log
|
||||
node_modules/
|
||||
public/
|
||||
.deploy*/
|
|
@ -1,2 +1,5 @@
|
|||
# techblog.djs-consulting.com
|
||||
Source code for the DJS Consulting Tech Blog
|
||||
|
||||
Why are you here? [The blog is over there!](https://techblog.djs-consulting.com) :)
|
||||
|
||||
_(This is the source code repository for the Hexo version of the blog.)_
|
||||
|
|
86
_config.yml
Normal file
86
_config.yml
Normal file
|
@ -0,0 +1,86 @@
|
|||
# Hexo Configuration
|
||||
## Docs: https://hexo.io/docs/configuration.html
|
||||
## Source: https://github.com/hexojs/hexo/
|
||||
|
||||
# Site
|
||||
title: DJS Consulting Tech Blog
|
||||
subtitle: Technical Information from DJS Consulting
|
||||
description:
|
||||
author: Daniel J. Summers
|
||||
language: en
|
||||
timezone: UTC
|
||||
|
||||
# URL
|
||||
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
|
||||
url: https://techblog.djs-consulting.com
|
||||
root: /
|
||||
permalink: :title.html
|
||||
permalink_defaults:
|
||||
|
||||
# Directory
|
||||
source_dir: source
|
||||
public_dir: public
|
||||
tag_dir: tag
|
||||
archive_dir: archives
|
||||
category_dir: category
|
||||
code_dir: downloads/code
|
||||
i18n_dir: :lang
|
||||
skip_render:
|
||||
|
||||
# Writing
|
||||
new_post_name: :title.md # File name of new posts
|
||||
default_layout: post
|
||||
titlecase: false # Transform title into titlecase
|
||||
external_link: true # Open external links in new tab
|
||||
filename_case: 1
|
||||
render_drafts: false
|
||||
post_asset_folder: false
|
||||
relative_link: false
|
||||
future: true
|
||||
highlight:
|
||||
enable: true
|
||||
line_number: true
|
||||
auto_detect: false
|
||||
tab_replace:
|
||||
|
||||
# Home page setting
|
||||
# path: Root path for your blogs index page. (default = '')
|
||||
# per_page: Posts displayed per page. (0 = disable pagination)
|
||||
# order_by: Posts order. (Order by date descending by default)
|
||||
index_generator:
|
||||
path: ''
|
||||
per_page: 6
|
||||
order_by: -date
|
||||
|
||||
# Category & Tag
|
||||
default_category: uncategorized
|
||||
category_map:
|
||||
tag_map:
|
||||
|
||||
category_generator:
|
||||
per_page: 6
|
||||
|
||||
tag_generator:
|
||||
per_page: 6
|
||||
|
||||
# Date / Time format
|
||||
## Hexo uses Moment.js to parse and display date
|
||||
## You can customize the date format as defined in
|
||||
## http://momentjs.com/docs/#/displaying/format/
|
||||
date_format: YYYY-MM-DD
|
||||
time_format: HH:mm:ss
|
||||
|
||||
# Pagination
|
||||
## Set per_page to 0 to disable pagination
|
||||
per_page: 10
|
||||
pagination_dir: page
|
||||
|
||||
# Extensions
|
||||
## Plugins: https://hexo.io/plugins/
|
||||
## Themes: https://hexo.io/themes/
|
||||
theme: mantraish
|
||||
|
||||
# Deployment
|
||||
## Docs: https://hexo.io/docs/deployment.html
|
||||
deploy:
|
||||
type:
|
2865
package-lock.json
generated
Normal file
2865
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
20
package.json
Normal file
20
package.json
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"name": "techblog-djsconsulting-com",
|
||||
"version": "4.1.0",
|
||||
"private": true,
|
||||
"hexo": {
|
||||
"version": "3.3.8"
|
||||
},
|
||||
"dependencies": {
|
||||
"hexo": "^3.2.0",
|
||||
"hexo-generator-archive": "^0.1.4",
|
||||
"hexo-generator-category": "^0.1.3",
|
||||
"hexo-generator-index": "^0.2.0",
|
||||
"hexo-generator-tag": "^0.2.0",
|
||||
"hexo-renderer-ejs": "^0.3.0",
|
||||
"hexo-renderer-marked": "^0.3.0",
|
||||
"hexo-renderer-pug": "0.0.5",
|
||||
"hexo-renderer-stylus": "^0.3.1",
|
||||
"hexo-server": "^0.2.0"
|
||||
}
|
||||
}
|
4
scaffolds/draft.md
Normal file
4
scaffolds/draft.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: {{ title }}
|
||||
tags:
|
||||
---
|
4
scaffolds/page.md
Normal file
4
scaffolds/page.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: {{ title }}
|
||||
date: {{ date }}
|
||||
---
|
5
scaffolds/post.md
Normal file
5
scaffolds/post.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: {{ title }}
|
||||
date: {{ date }}
|
||||
tags:
|
||||
---
|
14
source/_posts/2004/a-cry-for-help.md
Normal file
14
source/_posts/2004/a-cry-for-help.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
layout: post
|
||||
title: A Cry for Help
|
||||
author: Daniel
|
||||
date: 2004-07-07 00:00:38
|
||||
categories:
|
||||
- [ Linux, My Linux Adventure ]
|
||||
summary: The difficulties of downloading things when the network doesn't work
|
||||
---
|
||||
|
||||
I tried a few other things to make that module work, but nothing seemed to help. It's also very difficult to download and try new things when you can't get to the Internet to download them. I also posted a message to the WBEL user's list, and rather than go into that detail, that message can be found [here][].
|
||||
|
||||
|
||||
[here]: //beau.org/pipermail/whitebox-users/2004-July/002344.html
|
16
source/_posts/2004/a-foray-into-c-plus-plus.md
Normal file
16
source/_posts/2004/a-foray-into-c-plus-plus.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
layout: post
|
||||
title: "A Foray into C++"
|
||||
author: Daniel
|
||||
date: 2004-06-17 00:00:48
|
||||
categories:
|
||||
- [ Linux, My Linux Adventure ]
|
||||
- [ Programming, C++ ]
|
||||
summary: A bit of C++ knowledge should help when compiling programs for Linux
|
||||
---
|
||||
|
||||
Compiling my own versions of programs when trying to get DVD stuff working intrigued me. I've tried a couple of times to teach myself C++, but hadn't really gotten that far. My understanding of some of the concepts has improved some, and I've also found a good set of tutorials on [C Programming][]'s web site. I went though the tutorials, and got some interesting things working. This was PC-based, using the [CygWin][] Linux emulator. I actually understood everything I wrote, which is a very nice feeling! This knowledge should come in handy if I ever have trouble compiling something...
|
||||
|
||||
|
||||
[C Programming]: //www.cprogramming.com/tutorial.html
|
||||
[CygWin]: //www.cygwin.com
|
24
source/_posts/2004/a-month-in-summary.md
Normal file
24
source/_posts/2004/a-month-in-summary.md
Normal file
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
layout: post
|
||||
title: A Month in Summary
|
||||
author: Daniel
|
||||
date: 2004-08-31 00:00:12
|
||||
categories:
|
||||
- [ Databases, MySQL ]
|
||||
- [ Linux, My Linux Adventure ]
|
||||
- [ Web Servers, Apache ]
|
||||
- [ Web Servers, IIS ]
|
||||
summary: Progress over the past month
|
||||
---
|
||||
|
||||
Well, the last month has been interesting. I was able to get my Windows and Linux installations synchronized by creating a mount point for my second drive under <tt>/mnt/drive\_d</tt>. Under that, I created a directory called /thunderbird for my e-mail, and moved my e-mail and newsgroup folders over there. (The first time, I missed the "newsrc" file, which is important - it tells what newsgroups you've subscribed to and which messages you've read.) Under Windows, I pointed it to <tt>D:\thunderbird\pop3.knology.net</tt>, and under Linux, it was configured to <tt>/mnt/drive\_d/thunderbird/pop3.knology.net</tt>. I then moved the <tt>wwwroot</tt> directory from <tt>C:\Inetpub</tt> to drive D:, and pointed IIS to the new location. Under Linux, I did something a little different. As "root", I deleted the directory <tt>/var/www/html</tt>, and instead created <tt>/var/www/html</tt> as a symbolic link to <tt>/mnt/drive\_d/wwwroot</tt> (the actual command is <tt>ln -s /mnt/drive\_d/wwwroot /var/www/html</tt>). That worked great as well.
|
||||
|
||||
MySQL was more complicated, but I was eventually able to get it working as well. I created the directory <tt>D:\mysql\data</tt> for the data, then configured <tt>/etc/my.cnf</tt> under Linux to look at <tt>/mnt/drive\_d/mysql/data</tt>. I kept getting "Could not connect to server using socket /var/lib/mysql/mysql.sock". After some digging, it appeared to be a permissions problem. All the documentation said that the default socket was /tmp/mysql.sock, so I changed my.cnf to point there instead, restarted mysqld, and it worked! So, I have no idea what a Unix socket it, but I know that now I have one! :)
|
||||
|
||||
I was also able to get DVDs playing using xine, compiling it myself, and using [libdvdcss][], I can even watch commercial DVDs. I'm really impressed with xine - it handles all kinds of media out of the box, including DivX and up to version 8 of WMV files. You can add codecs to it as well, to support almost anything you want to do from an audio or video perspective. Compiling the player took around 20 minutes, and compiling the front end took another 5. And, it was simple - download the .tar.gz file, do <tt>tar xvfz [name].tar.gz</tt>, <tt>cd [name]</tt>, <tt>./configure</tt>, <tt>make install</tt>. The <tt>./configure</tt> script is the key in the whole process - it looks at what you have installed, and creates make files that will work with your compiler.
|
||||
|
||||
Everything started going south, though, when I started having freezes. Eventually, I got to where I could not boot without a kernel panic, and then boot errors (which I detailed in [this e-mail to the WBEL user's list][email]. Encouraged by my success over the past month, I decided to return to WBEL - it's supposed to be more stable than FC2, and I bet that I can get ndiswrapper, the dual-booting web server, the common e-mail, and maybe even some other stuff working again.
|
||||
|
||||
|
||||
[libdvdcss]: //developers.videolan.org/libdvdcss/
|
||||
[email]: //beau.org/pipermail/whitebox-users/2004-August/003197.html
|
15
source/_posts/2004/apache-and-mysql-are-back.md
Normal file
15
source/_posts/2004/apache-and-mysql-are-back.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
layout: post
|
||||
title: Apache and MySQL Are Back
|
||||
author: Daniel
|
||||
date: 2004-09-08 00:01:50
|
||||
categories:
|
||||
- [ Databases, MySQL ]
|
||||
- [ Linux, My Linux Adventure ]
|
||||
- [ Web Servers, Apache ]
|
||||
summary: Apache and MySQL work on both sides of the dual-booted computer now
|
||||
---
|
||||
|
||||
I was finally able to resolve my problems with Apache and MySQL. When I decided to mount my FAT32 drive under <tt>/home/summersd</tt>, I inadvertently caused myself some problems. From talking to a Linux guy at work, I found that no processes that weren't running under my user ID could access those files. The reason is that Linux looks up the entire diretory tree, back to /, to determine if you can access the file. So, although I had <tt>-rwxrwxrwx summersd summersd</tt> on every file, <tt>/home/summersd</tt> was <tt>drwx------ summersd summersd</tt>, and <tt>/home</tt> was <tt>drwxr-xr-x</tt>. The permissions on <tt>/home/summersd</tt> was keeping Apache from seeing <tt>/home/summersd/drive\_d/wwwroot</tt>, and MySQL from seeing or writing to <tt>/home/summersd/drive\_d/mysql/data</tt>. I moved the drive to <tt>/mnt/drive\_d</tt>, with the mount point being owned by "root", still mounting the drive with my user name, and everything worked.
|
||||
|
||||
In the process of reconfiguring Thunderbird, I believe I may have found out how to share the address book across operating systems. The file <tt>~/.thunderbird/default.[something]/prefs.js</tt> has a listing of all the preferences and settings. I modified this file to change the location of my mail files, and there is a setting there for an address book (which isn't shown in the configuration dialog - after all, it is 0.7.3...) I'll play with that later - right now I'm just elated to have Apache and MySQL working again.
|
11
source/_posts/2004/attack-of-the-quadruplicate-messages.md
Normal file
11
source/_posts/2004/attack-of-the-quadruplicate-messages.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
layout: post
|
||||
title: Attack of the Quadruplicate Messages
|
||||
author: Daniel
|
||||
date: 2004-06-30 00:00:42
|
||||
categories:
|
||||
- [ Linux, My Linux Adventure ]
|
||||
summary: I don't think I'm supposed to get every e-mail 4 times...
|
||||
---
|
||||
|
||||
When I left for choir practice this evening, I had 2 messages in my inbox. When I returned, I had over 600! Remember way back when I said that I removed that setting that left a copy of the e-mail on the server? Turns out in Ximian Evolution, "Close" is the equivalent of "Cancel" in most apps, and my change did not take. It looks like my ISP's mail server, in an effort to alert me that I was over my limit, started clearing whatever status was on these messages, which caused them to be downloaded multiple times, every 10 minutes. I made sure the setting was set, then went into my ISP's web mail service and deleted every message in my inbox. I deleted all the dupes out of my main inbox tonight, and I'll delete the dupes from the other folders tomorrow.
|
12
source/_posts/2004/back-to-wbel.md
Normal file
12
source/_posts/2004/back-to-wbel.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
layout: post
|
||||
title: Back to WBEL
|
||||
author: Daniel
|
||||
date: 2004-09-04 00:00:02
|
||||
categories:
|
||||
- [ Databases, MySQL ]
|
||||
- [ Linux, My Linux Adventure ]
|
||||
summary: WBEL has been reinstalled
|
||||
---
|
||||
|
||||
Today, I reinstalled WBEL 3.0. I was able to compile ndiswrapper (as I kept that on my FAT32 drive), and get the network card working smoothly very quickly. (In fact, it seems to be more reliable under Linux than WXP!) With the network up, it was easy to download Firefox, Thunderbird, and OpenOffice, and installing them was a breeze. (I decided to put them under /opt this time, trying to stick with the FHS.) I decided to mount my FAT32 drive under my home directory, as `/home/summersd/drive_d`. E-mail works fine, but Apache gives me a 403 (Permission Denied) error. MySQL doesn't seem to be working either - I'll have to play with that later.
|
11
source/_posts/2004/downloading-wine.md
Normal file
11
source/_posts/2004/downloading-wine.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
layout: post
|
||||
title: Downloading Wine
|
||||
author: Daniel
|
||||
date: 2004-07-01 00:00:08
|
||||
categories:
|
||||
- [ Linux, My Linux Adventure ]
|
||||
summary: Downloading is the first step for installing
|
||||
---
|
||||
|
||||
Today I didn't do a whole lot - I deleted the dupes out of my inbox subfolders, and I downloaded wine. I'll install it tomorrow.
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
layout: post
|
||||
title: "DVDs Are Back & Conflicting Wireless Networks"
|
||||
author: Daniel
|
||||
date: 2004-09-05 00:00:15
|
||||
categories:
|
||||
- [ Linux, My Linux Adventure ]
|
||||
summary: Resolving two minor issues
|
||||
---
|
||||
|
||||
I downloaded xine and xine-ui again, just to get the freshest stuff. Compiled first time, worked first time. I must be learning how to do this stuff! I also did a "yum update" to get the most recent version of everything, and I upgraded ndiswrapper from .8 to .10.
|
||||
|
||||
I moved the computer into another room, and found that I was now getting conflicts on my wireless card. After some research, it appears that I'm picking up my next-door-neighbor's wireless signal as well. I renamed our wireless network, and configured the cards to use only that network, and those conflicts went away.
|
13
source/_posts/2004/fedora-core-2-in-the-can.md
Normal file
13
source/_posts/2004/fedora-core-2-in-the-can.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
layout: post
|
||||
title: Fedora Core 2 in the Can
|
||||
author: Daniel
|
||||
date: 2004-07-24 00:00:09
|
||||
categories:
|
||||
- [ Linux, My Linux Adventure ]
|
||||
summary: Fedora Core 2 has been downloaded and is ready to install
|
||||
---
|
||||
|
||||
In an effort to cleanse my wife's computer of the spyware that dogged it so, I removed all the Linux partitions from my computer to make space for files. I got her computer rebuilt, and I'll be starting from scratch when I get back into it. No worries, though - if I'm going to get any good at setting it up... Kind of reminds me of a joke - a guy in New York asks an old man on the street, "Hey, how do you get to Radio City Music Hall?" The old guy responds, "Practice, practice, practice!"
|
||||
|
||||
In looking toward renewed Linux experimentation, I downloaded the .ISO files for FC2. I'm going to start with that, and see if I have any better luck getting my network card to work.
|
14
source/_posts/2004/foobar2000-with-wine.md
Normal file
14
source/_posts/2004/foobar2000-with-wine.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
layout: post
|
||||
title: foobar2000 with Wine
|
||||
author: Daniel
|
||||
date: 2004-09-08 00:00:47
|
||||
categories:
|
||||
- [ Linux, My Linux Adventure ]
|
||||
summary: A nice, lightweight Windows audio player working under wine
|
||||
---
|
||||
|
||||
[foobar2000][] is about the best, most organized audio player I've found. However, it is a Windows application, and according to what I've read, very reliant on Microsoft C++ extensions. I decided to give it a shot under wine, and it works great! There is a repaint problem - sometimes the playlist doesn't refresh as it should. But, it's pretty much a start-and-minimize sort of application, so that's acceptable.
|
||||
|
||||
|
||||
[foobar2000]: //www.foobar2000.org
|
12
source/_posts/2004/linux-play-on-pause.md
Normal file
12
source/_posts/2004/linux-play-on-pause.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
layout: post
|
||||
title: Linux Play on Pause
|
||||
author: Daniel
|
||||
date: 2004-07-10 00:00:18
|
||||
categories:
|
||||
- General Info
|
||||
- [ Linux, My Linux Adventure ]
|
||||
summary: Resignation to running Windows XP for a while
|
||||
---
|
||||
|
||||
With my inability to get my network working, I have resigned myself to running WXP. Work is starting to get really busy, and my personal life is as well. Maybe at some point in the future I can fire things back up and play some more.
|
14
source/_posts/2004/ndiswrapper-may-have-issues.md
Normal file
14
source/_posts/2004/ndiswrapper-may-have-issues.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
layout: post
|
||||
title: ndiswrapper May Have Issues
|
||||
author: Daniel
|
||||
date: 2004-09-07 00:00:49
|
||||
categories:
|
||||
- Hardware
|
||||
- [ Linux, My Linux Adventure ]
|
||||
summary: Wireless drivers don't handle the lack of a wireless network very gracefully
|
||||
---
|
||||
|
||||
We're speedily working towards a Friday deadline at work, so tonight I had some analysis work to do on some COBOL code. Great, I thought, I can use my VSlick setup under wine. I moved my computer from the living room back to our now-empty bedroom (soon to be nursery), and booted it up. Kernel panics galore - never got past the network stuff. When I booted to Windows, I found that the wireless network didn't reach that far, and I'm guessing that the ndiswrapper folks haven't tried their driver a lot with a wireless card, but no wireless network. Once I get past that, I may grab the dumps from these kernel panics and see if the developers need them to see what went wrong. So, for tonight, I had to use WXP (in which I actually had to disable the wireless connection - seems Windows doesn't handle a barely-there wireless connection much better than Linux).
|
||||
|
||||
The diagnostics I ran last night never found anything - they ran for about 10 hours. I suppose I'll just have to wait until I have problems again, then run it right then. Another person from the WBEL users list suggested I check the way I have my hard drives set up; he thinks that a 2GB drive slaved to a 20GB drive may be causing conflicts, which would cause freezes or panics.
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
layout: post
|
||||
title: Next-Generation Open Source Internet Apps
|
||||
author: Daniel
|
||||
date: 2004-07-12 00:00:11
|
||||
categories:
|
||||
- Windows Open Source
|
||||
summary: Firefox and Thunderbird
|
||||
---
|
||||
|
||||
In setting up my "I'm gonna use this for a while" environment on WXP, I've stumbled across what I feel are two gems. These are the [FireFox][] browser (which I've been using for a while now) and the [Thunderbird][] mail program. Thunderbird is not as fully featured as Ximian Evolution, but I prefer it's interface to that of Mozilla Mail. I also think that once I get back on Linux on a regular basis, I'll install the same version there, and see if I can get my mail to use the same data files whether I'm using Linux or WXP.
|
||||
|
||||
|
||||
[FireFox]: //www.mozilla.org/products/firefox
|
||||
[Thunderbird]: //www.mozilla.org/products/thunderbird
|
18
source/_posts/2004/non-alcoholic-wine-experiments.md
Normal file
18
source/_posts/2004/non-alcoholic-wine-experiments.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
layout: post
|
||||
title: Non-Alcoholic Wine Experiments
|
||||
author: Daniel
|
||||
date: 2004-07-02 00:00:27
|
||||
categories:
|
||||
- [ Linux, My Linux Adventure ]
|
||||
summary: First efforts with wine leave me unimpressed
|
||||
---
|
||||
|
||||
Wine is not getting me drunk. I installed it, downloaded and installed [WineSetupTK][] to assist with configuration. I then ran the setup program (through wine) for _Thomas the Tank Engine: The Great Festival Adventure_. Once that completed, I tried to run the program (by entering `wine "C:\Program Files\Hasbro Interactive\The Great Festival Adventure\thomas.exe"`) and got a message box saying "CD check path not found." I searched the web for this message, and didn't find anything - it may be a message from the game, and not wine. I'll do some digging later.
|
||||
|
||||
You may remember the problems I had with the Folding@Home client. So, I decided to try to run the Windows version through wine. I downloaded it, and ran it through wine. It took about 2 minutes to lock my machine up. I'm not being too hard on wine for this stuff - an emulator isn't going to be 100%. I am concerned that I don't seem to be able to run any sort of Folding@Home client, and since it's not open-source, I can't try compiling on this computer.
|
||||
|
||||
I uninstalled the OpenOffice.org suite from the /root directory, and installed it in `/usr/local/OpenOffice.org1.1.2` (which was where it suggested). Now, it works for normal users. I still haven't been able to resolve my printing problems, but I sent a question today to the WBEL users list - they came through quickly for helping me resolve my mail importing issues.
|
||||
|
||||
|
||||
[WineSetupTK]: //sourceforge.net/project/showfiles.php?group_id=6241&package_id=77479&release_id=161192
|
17
source/_posts/2004/power-at-last.md
Normal file
17
source/_posts/2004/power-at-last.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
layout: post
|
||||
title: Power at Last!
|
||||
author: Daniel
|
||||
date: 2004-06-25 00:00:33
|
||||
categories:
|
||||
- Hardware
|
||||
- [ Linux, My Linux Adventure ]
|
||||
summary: The power supply arrives, but a background program is locking the machine up hard
|
||||
---
|
||||
|
||||
Upon returning from vacation, I found that the power supply was finally here. After installing it, I fired up the computer, and it works! I fired up my e-mail client (to pull all the mail off the server that I had received for the past few weeks), and downloaded the [Folding@Home][] (F@H) client for Linux. I've been running that on a couple of other computers (user name LX_i, team #37825), and I'll probably write more about it in particular in my regular blog. Anyway, once I got that started, I started reading the e-mail I had missed. Then, the machine locked up!
|
||||
|
||||
I reset the machine, and repeated the steps (started Evolution, started F@H), and before long, it happened again. I restarted them both again, but it's getting late - I'll have to continue this tomorrow.
|
||||
|
||||
|
||||
[Folding@Home]: //www.stanford.edu/group/pandegroup/folding/
|
13
source/_posts/2004/power-on-order-vacation-pending.md
Normal file
13
source/_posts/2004/power-on-order-vacation-pending.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
layout: post
|
||||
title: "Power on Order / Vacation Pending"
|
||||
author: Daniel
|
||||
date: 2004-06-16 00:00:32
|
||||
categories:
|
||||
- General Info
|
||||
- Hardware
|
||||
- [ Linux, My Linux Adventure ]
|
||||
summary: Power supply inbound
|
||||
---
|
||||
|
||||
The power supply has been ordered, but I'm going out of town between the 19th and the 26th, so it probably won't make it here before I leave. This adventure will have to resume at that point.
|
28
source/_posts/2004/printing-woes-and-e-mail-happiness.md
Normal file
28
source/_posts/2004/printing-woes-and-e-mail-happiness.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
layout: post
|
||||
title: "Printing Woes & E-mail Happiness"
|
||||
author: Daniel
|
||||
date: 2004-06-29 00:00:42
|
||||
categories:
|
||||
- [ Linux, My Linux Adventure ]
|
||||
summary: Printing is a challenge, but e-mail is working great
|
||||
---
|
||||
|
||||
Printing is proving to be a challenge. Using [samba][] (the Linux [SMB][] libraries) and [cups][], I was able to configure my networked printer. However, I don't have a driver on my computer for it. I tried using some drivers that were close, but they didn't work - they just caused the printer to eject a blank page. I was creating the documents using [OpenOffice.org][]'s Writer, which has a "one-click PDF conversion" feature. When I went to use that feature, I found that I was on version 1.0, which didn't have the PDF stuff.
|
||||
|
||||
I downloaded the Linux install for version 1.1.2, and remembering that you need to use the "root" user to do most installs, did an [su][], and ran the install. I then launched the new writer and exported the PDF. Using samba, I copied the file over to the other computer, and was able to print it. However, since I installed it as root, it installed under /root, which meant that my normal user couldn't access it. At some point, I'll uninstall it and reinstall it in a public directory.
|
||||
|
||||
On another note, I posted a message about my inability to import mail from Netscape into Evolution to the WBEL user's list, and the response I got worked! Netscape actually stores the e-mail in the same format as many other Linux e-mail programs (a format called [mbox][] format). Using samba, I copied the files from "C:\Documents and Settings\Daniel\ApplicationData\Mozilla\Profiles\default\{somthing}.slt\Mail\Local Folders" - under this folder, there was a separate folder for each [POP3][] account, and within that folder, the file called "inbox" was my inbox. On some systems, the file is named "mbox", and it's in a folder with the name of the folder it represents (i.e., "Inbox/mbox"). Once these files were copied, I used Evolution's import utility - it prompted me for a file to import (whose type it determined automatically), and a location for the messages to go. I now have all my e-mail from my old setup!
|
||||
|
||||
One part of Unix/Linux of which I'm quickly becoming a fan is its adherance to the [Filesystem Hierarchy Standard][fhs] (FHS). The FHS defines where files should be found, and it represents all available files under a single directory, known as "/". No matter how many drives or network shares that are [mounted][], they're all under this directory. What this gives you is a system-wide view of your files, instead of the normal DOS-imposed separate drive specifications. The FHS also says what files are supposed to be in what directories, so no matter what Unix/Linux system you're using, once you know the FHS, you know exactly where to look for things.
|
||||
|
||||
|
||||
[samba]: //us1.samba.org/samba/samba.html
|
||||
[SMB]: //www.computerhope.com/jargon/s/smb.htm
|
||||
[cups]: //www.cups.org
|
||||
[OpenOffice.org]: //www.openoffice.org
|
||||
[su]: //hegel.ittc.ukans.edu/topics/linux/man-pages/man1/su.1.html
|
||||
[mbox]: //email.about.com/cs/standards/a/mbox_format.htm
|
||||
[POP3]: //www.computerhope.com/jargon/p/pop.htm
|
||||
[fhs]: //www.pathname.com/fhs/
|
||||
[mounted]: //www.computerhope.com/jargon/m/mount.htm
|
18
source/_posts/2004/programming-like-a-banshee.md
Normal file
18
source/_posts/2004/programming-like-a-banshee.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
layout: post
|
||||
title: Programming Like a Banshee
|
||||
author: Daniel
|
||||
date: 2004-06-27 00:00:32
|
||||
categories:
|
||||
- [ Linux, My Linux Adventure ]
|
||||
- [ Programming, PHP ]
|
||||
sumary: Programming work has been distracting from Linux adventures
|
||||
---
|
||||
|
||||
Despite being ill early in the day (which caused me to miss Sunday School and church), the day on the computer went pretty well. I made a lot more progress on TMTS, although I ran into a problem - it appears that the [PHP][] that came with WBEL may not have [MySQL][] support enabled. Rather than get sidelined with this right now, I'm going to continue converting pages on the application, and work this issue as part of unit testing.
|
||||
|
||||
I also managed to catch up on comp.lang.cobol and comp.sys.unisys, two newsgroups in which I participate. I was able to play a file off a DVD (although I still can't play the disc itself).
|
||||
|
||||
|
||||
[PHP]: //www.php.net
|
||||
[MySQL]: //www.mysql.com
|
24
source/_posts/2004/running-out-of-browsers.md
Normal file
24
source/_posts/2004/running-out-of-browsers.md
Normal file
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
layout: post
|
||||
title: Running Out of Browsers...
|
||||
author: Daniel
|
||||
date: 2004-06-26 00:00:01
|
||||
categories:
|
||||
- [ Linux, My Linux Adventure ]
|
||||
- [ Programming, PHP ]
|
||||
summary: Browser lock-ups are leaving them in an unusable state
|
||||
---
|
||||
|
||||
When I moved the mouse to try to get the screen to unblank this morning, nothing happened. It was locked up once again. I decided to only run one process, to see if I could isolate which one was causing me problems. I started with the F@H client. I started it before we left for breakfast, and when we got back, the computer was still running okay. I started using the computer actively, and found another problem - my profile for Firefox now thinks it's still in use, because I was using it when the machine crashed.
|
||||
|
||||
Now, anyone who has ever used Linux will know that one browser is much less severe than, for example, IE becoming unusable in a Windows evironment. I switched to using Mozilla, and was doing some research on Linux crashes when the machine locked up again. This time, when I restarted, both Firefox _and_ Mozilla thought they were still in use. I fired up the only other currently-installed browser, Konqueror, and surfed out to [LinuxQuestions.org][] and posted a message asking how to tell these browsers that they're not in use.
|
||||
|
||||
A few hours later, an answer appeared. For Firefox, the file is ~/.mozilla/firefox/default.lz7/lock, and for Mozilla, the file is ~/.mozilla/default/{something}.slt/lock. Both these are symbolic links to a process PID - deleting them freed up the default profiles so these browsers could be used again.
|
||||
|
||||
In the mean time, I have not restarted F@H, but I've had Evolution running in the background without incident. It seems that it may be the F@H client. That bugs me, because I was really looking forward to using this machine to help with the project. I may try to run the Windows version under [wine][], a Windows emulator for Linux.
|
||||
|
||||
Some folks have also expressed interest in the Tournament and Membership Tracking System (TMTS), which is a web application I coded to track membership and golf tournaments for a local golfing organization. They're interested in the PHP version, for which I no longer have the source code (it was on a laptop that was stolen). So, much of my computing effort over the next few days will be trying to get this recreated. Today, I was able to get the database rebuilt, and the first few pages converted.
|
||||
|
||||
|
||||
[LinuxQuestions.org]: //www.linuxquestions.org
|
||||
[wine]: //www.winehq.com
|
20
source/_posts/2004/satisfying-a-lust-for-power.md
Normal file
20
source/_posts/2004/satisfying-a-lust-for-power.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
layout: post
|
||||
title: Satisfying a Lust for Power
|
||||
author: Daniel
|
||||
date: 2004-06-15 00:00:48
|
||||
categories:
|
||||
- Hardware
|
||||
- [ Linux, My Linux Adventure ]
|
||||
summary: A new (inexpensive) power supply has been found
|
||||
---
|
||||
|
||||
Searching for power supplies was very interesting. I determined that I needed at least a 300W supply, and considered upgrading case and all. Some of the bigger stores, such as [Best Buy][], [Office Depot][], and [OfficeMax][], revealed nothing under $30 (just for the power supply). I checked some other sites, such as [Tiger Direct][] and [TCWO][], and found one for $17 on Tiger Direct. I thought that was pretty good, and was planning on ordering it, when a friend (the person I bought the computer from) found one on [PC Direct Source][] for $10. I'll probably order it tomorrow.
|
||||
|
||||
|
||||
[Best Buy]: //www.bestbuy.com
|
||||
[Office Depot]: //www.officedepot.com
|
||||
[OfficeMax]: //www.officemax.com
|
||||
[Tiger Direct]: //www.tigerdirect.com
|
||||
[TCWO]: //www.tcwo.com
|
||||
[PC Direct Source]: //www.pcdirectsource.com
|
16
source/_posts/2004/sour-milk-is-right.md
Normal file
16
source/_posts/2004/sour-milk-is-right.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
layout: post
|
||||
title: "Sour Milk Is Right!"
|
||||
author: Daniel
|
||||
date: 2004-07-08 00:00:09
|
||||
categories:
|
||||
- [ Linux, My Linux Adventure ]
|
||||
summary: A lead on a wireless driver doesn't work on my kernel
|
||||
---
|
||||
|
||||
A user wrote back and suggested that I try a driver from [SourMilk.net][], which is an "adm8211" driver project for Linux. When I downloaded it and started to compile it, I quickly became aware that it hoped I was on the 2.6 family of kernels (which is what the Fedora Project, and several of the newer distributions, are now using). WBEL 3.0 uses the 2.4 kernel, which is more established, but is beginning to drop off as most folks start developing for 2.6. Anyway, there was a 2.4 make file, but it was labeled "experimental."
|
||||
|
||||
That pretty much describes how I spent my time this evening - experimenting. I have virtually no experience with large-scale C projects, and I got many, many compile errors. I tried tweaking the make file, to no avail. I don't fault the driver, as it said up front that it is really targeted to 2.6. I may end up downloading a 2.6 distribution and trying it out.
|
||||
|
||||
|
||||
[SourMilk.net]: //aluminum.sourmilk.net/adm8211/
|
22
source/_posts/2004/success-with-wine-and-diagnostics.md
Normal file
22
source/_posts/2004/success-with-wine-and-diagnostics.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
layout: post
|
||||
title: "Success with Wine & Diagnostics"
|
||||
author: Daniel
|
||||
date: 2004-09-05 00:01:51
|
||||
categories:
|
||||
- [ Databases, MySQL ]
|
||||
- Hardware
|
||||
- [ Linux, My Linux Adventure ]
|
||||
- [ Web Servers, Apache ]
|
||||
summary: Some success and more troubleshooting
|
||||
---
|
||||
|
||||
At work, we use an editor called [Visual SlickEdit][] (VSlick). It's got a lot of features, and supports color-coding for many different languages. I decided that I'd give wine another shot, as we only have the Windows version of this program. I installed wine and winesetuptk, used winesetuptk to configure the installation, then ran the installation program. Everything installed, and the program ran up to a point, when it started complaining about a missing DLL. I booted to WXP, found the DLL, copied it to the FAT32 drive, rebooted to Linux, and copied the DLL into the "fake windows" system directory. Soon, it was working great! I can't believe it - success with wine!
|
||||
|
||||
I also have made little headway towards getting Apache and MySQL to working. I changed the process that Apache uses to run as "summersd", and I was able to see pages (although any pages that relied on a database didn't work). I still haven't figured this one out yet...
|
||||
|
||||
I'm still getting kernel panics from time to time, and it seems to be whenever I access networking. A suggestion from one of the folks on the WBEL users list was to download the [Ultimate Boot CD][ubcd], filled with diagnostic programs. I downloaded it, burned it, and ran some memory checks. Those checked out, so I'm going to run a "CPU Burn-In" program to see if it can detect errors from the CPU. It runs for up to 7 days, but I think I'll just run it overnight - folding@home didn't take nearly that long to crash it before.
|
||||
|
||||
|
||||
[Visual SlickEdit]: //www.slickedit.com
|
||||
[ubcd]: //www.ultimatebootcd.com
|
18
source/_posts/2004/webshots-wine-strikes-again.md
Normal file
18
source/_posts/2004/webshots-wine-strikes-again.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
layout: post
|
||||
title: Webshots - Wine Strikes Again!
|
||||
author: Daniel
|
||||
date: 2004-09-10 00:00:29
|
||||
categories:
|
||||
- [ Linux, My Linux Adventure ]
|
||||
summary: Using wine to use Webshots
|
||||
---
|
||||
|
||||
When I ran Windows as my desktop, I had a program called [WebShots][] that I used to set my desktop wallpaper, and cycle it. They have Windows and Mac versions, but no Linux version yet. They still send me e-mails each week, showing the daily picture selections for each day in the past week. I decided to download the Windows version, and install in under wine to see if it would work. I moved `websamp.exe` to `/home/summersd/.wine/fake_windows`, then ran `wine C:\\websamp.exe` to install the program. `wine "C:\\Program Files\\Webshots\\Launcher.exe"` then started the desktop control. I used that to disable the tray icon (wine has one, but you can't see it), and I disabled almost every other "auto update" feature.
|
||||
|
||||
I had downloaded a ".wbz" file (which is what is imported into WebShots), and I finally figured out how to import it. Running the launcher program, and following it with the name of the .wbz file, imports it. I may figure out a way to automate that, but for now, I know how to do it.
|
||||
|
||||
_(Note: This is the end of the "My Linux Adventure" series of posts. After this, I ended up going back to Windows XP, just because it worked and I didn't have hobbyist time. As of May 2007, I'm running Ubuntu 7.04 on one computer, and Windows Vista on my laptop, which is currently out of commission.)_
|
||||
|
||||
|
||||
[WebShots]: //www.webshots.com
|
12
source/_posts/2004/when-hardware-attacks.md
Normal file
12
source/_posts/2004/when-hardware-attacks.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
layout: post
|
||||
title: When Hardware Attacks
|
||||
author: Daniel
|
||||
date: 2004-06-14 00:00:22
|
||||
categories:
|
||||
- Hardware
|
||||
- [ Linux, My Linux Adventure ]
|
||||
summary: A bad power supply interrupts our plans
|
||||
---
|
||||
|
||||
I fired up the computer today while I was at home for lunch. I booted it into Windows so my younger son could play a game. When I came home from work, I noticed that the computer was off. Seems that it just completely shut down while he was in the middle of the game. After some hardware troubleshooting, I narrowed the problem down to the power supply. Time to go power-supply hunting...
|
14
source/_posts/2004/wireless-woes.md
Normal file
14
source/_posts/2004/wireless-woes.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
layout: post
|
||||
title: Wireless Woes
|
||||
author: Daniel
|
||||
date: 2004-07-06 00:00:19
|
||||
categories:
|
||||
- [ Linux, My Linux Adventure ]
|
||||
summary: First attempts at a wireless adapter fail spectacularly
|
||||
---
|
||||
|
||||
My wife bought me a wireless network card, so I could move the second computer out of the living room (or, as she calls it, "not a computer lab!"). :) Everything works okay under WXP, but when I boot to Linux, no joy. (I sort of expected that, at this point...) I downloaded the Red Hat 8 drivers from [iBlitzz's website][ib], but the interface for a network card is what's called a "kernel module," which is, as best I can tell, a highly-specialized object module that tells the kernel all the details of the hardware. At any rate, the kernel module is very much tied to a particular version of kernel, so the RH8 doesn't seem to be working. Oh well - time to play with my new toy - WXP for now.
|
||||
|
||||
|
||||
[ib]: //www.iblitzz.com
|
22
source/_posts/2004/wow.md
Normal file
22
source/_posts/2004/wow.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
layout: post
|
||||
title: Wow
|
||||
author: Daniel
|
||||
date: 2004-08-01 00:00:34
|
||||
categories:
|
||||
- [ Databases, MySQL ]
|
||||
- [ Linux, My Linux Adventure ]
|
||||
- [ Programming, PHP ]
|
||||
- [ Web Servers, Apache ]
|
||||
- [ Web Servers, IIS ]
|
||||
summary: Fedora Core 2 makes a nice first impression
|
||||
---
|
||||
|
||||
Today I installed Fedora Core 2. This thing is slick! WBEL looked a lot like RH8, which I had seen before my renewed Linux learning began. FC2 has a graphical loader that hides a lot of the background stuff (unless an error occurs) - that's cool. During the install, I skipped OpenOffice.org and MySQL, although I installed PHP with MySQL support. The reason for that is that I wanted to get the latest and greatest versions of those two products. We'll see if this proves to be a good decision or not.
|
||||
|
||||
The wireless network card still wasn't recognized (phooey). I did some more searching, armed with the knowledge that I have an adm8211 chipset. One of the first hits under Google's Linux search for "adm8211" pointed me to a project called [NDISwrapper][]. This is a "wrapper" that uses the vendor's Windows DLL file, and converts the hooks from Windows to Linux. Doing this, this driver can (in theory) support most any network card, especially those that aren't in the Linux Hardware Compatibility List (HCL). I downloaded it, compiled it, and followed the directions to install my driver under it. I still wasn't able to create a connection, but on a hunch, I restarted the computer. NDISwrapper is also a kernel module, and I know that often those are only read at startup. Once the computer was restarted, I was able to create a connection, and now my network card works! YEA!!! (And it was only one night's worth of work - much better.)
|
||||
|
||||
Now that I have networking working under both operating systems, I plan to try to get four things working the same, whether I'm booted to WXP or Linux - E-mail (using Mozilla Thunderbird), PHP (using Apache on Linux, IIS on WXP), MySQL (using the exact same version on both), and a web server that uses the same html root directory (again, Apache on Linux, IIS on WXP). If I didn't already have IIS up, running, and configured under WXP, I'd probably just do Apache on both, but this will be interesting - it should work, as I don't have many creative permission rules.
|
||||
|
||||
|
||||
[NDISwrapper]: //ndiswrapper.sourceforge.net
|
14
source/_posts/2004/yum-yum-yum.md
Normal file
14
source/_posts/2004/yum-yum-yum.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
layout: post
|
||||
title: yum yum yum
|
||||
author: Daniel
|
||||
date: 2004-06-28 00:00:06
|
||||
categories:
|
||||
- [ Linux, My Linux Adventure ]
|
||||
summary: 'The "yum" updater works nicely'
|
||||
---
|
||||
|
||||
I wasn't able to sleep very well last night, so I didn't do much tonight. One thing I did do, though, was run [yum][], which is, at a high-level, similar to Windows Update. WBEL recently released "Respin 1" (that's re-spin, not a new name - it's code name is still "Liberation"), and running yum with no options will update every available package. After about 30 minutes of watching it download stuff, I went to bed - I'll have to verify the results tomorrow.
|
||||
|
||||
|
||||
[yum]: //linux.duke.edu/projects/yum/
|
59
source/_posts/2005/about-the-xine-rpms.md
Normal file
59
source/_posts/2005/about-the-xine-rpms.md
Normal file
|
@ -0,0 +1,59 @@
|
|||
---
|
||||
layout: post
|
||||
title: About the xine RPMs
|
||||
author: Daniel
|
||||
date: 2005-06-02 00:01:00
|
||||
categories:
|
||||
- [ Hosted 64-bit Software, xine RPMs ]
|
||||
summary: Information about how xine RPMs are built
|
||||
---
|
||||
|
||||
_(This post is updated regularly, and should contain the most up-to-date information about these RPMs.)_
|
||||
|
||||
Xine is a full-featured media player for Linux, that can play CDs, DVDs, VCDs, MP3s, Ogg, and more. The main site for xine is [www.xine-project.org][] - you can find information, install instructions, and more user interfaces. These RPMs should work on White Box Enterprise Linux (WBEL), Red Hat Enterprise Linux (RHEL), and CentOS. To stay up-to-date on these releases, you can subscribe to the [RSS feed][] for this category.
|
||||
|
||||
_As with any standard disclaimer, no warranty is expressed or implied - these RPMs are provided as-is, and we assume no responsibility for any ill effects that may come from the downloading and installation of these files. However, feedback is welcome if you encounter problems with these RPMs._
|
||||
|
||||
**Note:** To use xine, you'll need both the library and the UI. To play commercial DVDs, you'll need libdvdcss, which is not provided here (but, knowing the name, you should be able to find it).
|
||||
|
||||
### How the RPMs Were Built
|
||||
|
||||
xine-ui 0.99.9 to current / xine-lib 1.2.6 to current / gxine 0.5.908 to current
|
||||
_These RPMs were built on Ubuntu Trusty Tahr (kernel 3.13.0-34-generic) as deb packages and converted to RPM using alien._
|
||||
|
||||
xine-ui 0.99.8
|
||||
_These RPMs were built on Ubuntu Saucy Salamander (kernel 3.11.0-17-generic) as deb packages and converted to RPM using alien._
|
||||
|
||||
xine-lib 1.1.21 / xine-ui 0.99.7
|
||||
_These RPMs were built on Ubuntu Precise Pangolin (kernel 3.0.0-24-generic) as deb packages and converted to RPM using alien._
|
||||
|
||||
xine-lib 1.1.20.1
|
||||
_These RPMs were built on Ubuntu Oneiric Ocelot (kernel 3.0.0-14-generic) as deb packages and converted to RPM using alien._
|
||||
|
||||
xine-lib 1.1.20
|
||||
_These RPMs were built on Ubuntu Oneiric Ocelot (kernel 3.0.0-12-generic) as deb packages and converted to RPM using alien._
|
||||
|
||||
xine-lib 1.1.19 / xine-ui 0.99.6
|
||||
_These RPMs were built on Ubuntu Lucid Lynx (kernel 2.6.32-24-generic) as deb packages and converted to RPM using alien._
|
||||
|
||||
xine-lib 1.1.16.2 and xine-lib 1.1.16.3
|
||||
_These RPMs were built on Ubuntu Intrepid Ibex (kernel 2.6.27-11-generic) as deb packages and converted to RPM using alien._
|
||||
|
||||
xine-lib 1.1.16.1
|
||||
_These RPMs were built on Ubuntu Intrepid Ibex (kernel 2.6.27-9-generic) as deb packages and converted to RPM using alien._
|
||||
|
||||
xine-lib 1.1.13 through 1.1.15
|
||||
_These RPMs were built on Ubuntu Hardy Herron (kernel 2.6.24-19-generic) as deb packages and converted to RPM using alien._
|
||||
|
||||
xine-lib 1.1.9.1 and 1.1.10.1
|
||||
_These RPMs were built on Ubuntu Gutsy Gibbon (kernel 2.6.22-14-generic) as deb packages and converted to RPM using alien._
|
||||
|
||||
xine-lib 1.1.7 / xine-ui 0.99.5
|
||||
_These RPMs were built on Ubuntu Feisty Fawn (kernel 2.6.20-16-generic) as deb packages and converted to RPM using alien._
|
||||
|
||||
xine-lib 1.1.1 / xine-ui 0.99.4 and earlier
|
||||
_These RPMs were built on White Box Enterprise Linux 4 running kernel version 2.6.9-5.EL._
|
||||
|
||||
|
||||
[www.xine-project.org]: //www.xine-project.org "xine Home"
|
||||
[RSS feed]: /category/hosted-64-bit-software/xine-rpms/feed "Xine RPMs (RSS) • DJS Consulting Tech Blog"
|
21
source/_posts/2005/xine-lib-1-0-1-rpm.md
Normal file
21
source/_posts/2005/xine-lib-1-0-1-rpm.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
layout: post
|
||||
title: xine-lib 1.0.1 RPM
|
||||
author: Daniel
|
||||
date: 2005-06-02 00:02:03
|
||||
categories:
|
||||
- [ Hosted 64-bit Software, xine RPMs ]
|
||||
---
|
||||
|
||||
Below are the library and development RPMs for xine-lib version 1.0.1. Be sure to check out the [About the xine RPMs][abt] post for more information.
|
||||
|
||||
xine-lib - The main xine library
|
||||
xine-lib-devel - The development xine library (needed if you're building an interface against xine-lib)
|
||||
|
||||
You'll also need a user interface - as of this release, the most current release of [xine-ui is 0.99.3][ui].
|
||||
|
||||
(To save disk space, only the current release and two prior releases will be maintained.)
|
||||
|
||||
|
||||
[abt]: /2005/about-the-xine-rpms.html "About the xine RPMs • DJS Consulting Tech Blog"
|
||||
[ui]: /2005/xine-ui-0-99-3-rpm.html
|
22
source/_posts/2005/xine-lib-1-1-0-rpm.md
Normal file
22
source/_posts/2005/xine-lib-1-1-0-rpm.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
layout: post
|
||||
title: xine-lib 1.1.0 RPM
|
||||
author: Daniel
|
||||
date: 2005-08-31 00:00:10
|
||||
categories:
|
||||
- [ Hosted 64-bit Software, xine RPMs ]
|
||||
---
|
||||
|
||||
Below are the library and development RPMs for xine-lib version 1.1.0. Be sure to check out the [About the xine RPMs][abt] post for more information.
|
||||
|
||||
xine-lib - The main xine library
|
||||
xine-lib-devel - The development xine library (needed if you're building an interface against xine-lib)
|
||||
|
||||
You'll also need a user interface - as of this release, the most current release of [xine-ui is 0.99.4][ui].
|
||||
|
||||
(To save disk space, only the current release and two [prior releases][pri] will be maintained.)
|
||||
|
||||
|
||||
[abt]: /2005/about-the-xine-rpms.html "About the xine RPMs • DJS Consulting Tech Blog"
|
||||
[ui]: /2005/xine-ui-0-99-4-rpm.html
|
||||
[pri]: /2005/xine-lib-1-0-1-rpm.html
|
22
source/_posts/2005/xine-lib-1-1-1-rpm.md
Normal file
22
source/_posts/2005/xine-lib-1-1-1-rpm.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
layout: post
|
||||
title: xine-lib 1.1.1 RPM
|
||||
author: Daniel
|
||||
date: 2005-11-23 00:00:49
|
||||
categories:
|
||||
- [ Hosted 64-bit Software, xine RPMs ]
|
||||
---
|
||||
|
||||
Below are the library and development RPMs for xine-lib version 1.1.1. Be sure to check out the [About the xine RPMs][abt] post for more information.
|
||||
|
||||
xine-lib - The main xine library
|
||||
xine-lib-devel - The development xine library (needed if you're building an interface against xine-lib)
|
||||
|
||||
You'll also need a user interface - as of this release, the most current release of [xine-ui is 0.99.4][ui].
|
||||
|
||||
(To save disk space, only the current release and two [prior releases][pri] will be maintained.)
|
||||
|
||||
|
||||
[abt]: /2005/about-the-xine-rpms.html "About the xine RPMs • DJS Consulting Tech Blog"
|
||||
[ui]: /2005/xine-ui-0-99-4-rpm.html
|
||||
[pri]: /2005/xine-lib-1-1-0-rpm.html
|
20
source/_posts/2005/xine-ui-0-99-3-rpm.md
Normal file
20
source/_posts/2005/xine-ui-0-99-3-rpm.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
layout: post
|
||||
title: xine-ui 0.99.3 RPM
|
||||
author: Daniel
|
||||
date: 2005-06-02 00:01:40
|
||||
categories:
|
||||
- [ Hosted 64-bit Software, xine RPMs ]
|
||||
---
|
||||
|
||||
Below is the RPM for xine-ui version 0.99.3. Be sure to check out the [About the xine RPMs][abt] post for more information.
|
||||
|
||||
xine-ui - The user interface
|
||||
|
||||
To use this, you'll also need xine-lib - as of this release, the most recent release of [xine-lib is 1.0.1][lib].
|
||||
|
||||
(To save disk space, only the current release and two prior releases will be maintained.)
|
||||
|
||||
|
||||
[abt]: /2005/about-the-xine-rpms.html "About the xine RPMs • DJS Consulting Tech Blog"
|
||||
[lib]: /2005/xine-lib-1-0-1-rpm.html
|
21
source/_posts/2005/xine-ui-0-99-4-rpm.md
Normal file
21
source/_posts/2005/xine-ui-0-99-4-rpm.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
layout: post
|
||||
title: xine-ui 0.99.4 RPM
|
||||
author: Daniel
|
||||
date: 2005-08-25 00:00:44
|
||||
categories:
|
||||
- [ Hosted 64-bit Software, xine RPMs ]
|
||||
---
|
||||
|
||||
Below is the RPM for xine-ui version 0.99.4. Be sure to check out the [About the xine RPMs][abt] post for morevinformation.
|
||||
|
||||
xine-ui - The user interface
|
||||
|
||||
To use this, you'll also need xine-lib - as of this release, the most recent release of [xine-lib is 1.1.0][lib].
|
||||
|
||||
(To save disk space, only the current release and two [prior releases][pri] will be maintained.)
|
||||
|
||||
|
||||
[abt]: /2005/about-the-xine-rpms.html "About the xine RPMs • DJS Consulting Tech Blog"
|
||||
[lib]: /2005/xine-lib-1-1-0-rpm.html
|
||||
[pri]: /2005/xine-ui-0-99-3-rpm.html
|
35
source/_posts/2007/adding-tags-to-a-wordpress-theme.md
Normal file
35
source/_posts/2007/adding-tags-to-a-wordpress-theme.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
---
|
||||
layout: post
|
||||
title: Adding Tags to a WordPress Theme
|
||||
author: Daniel
|
||||
date: 2007-11-25 22:47:28
|
||||
categories:
|
||||
- [ Programming, PHP, WordPress ]
|
||||
tags:
|
||||
- tag
|
||||
- template
|
||||
- theme
|
||||
- wordpress
|
||||
summary: Now that WordPress supports tags, this is how to put them in an existing theme
|
||||
---
|
||||
|
||||
WordPress 2.3 introduced tags, but unless you're using the default theme, your theme (like mine) probably didn't support them. Nowhere did I find a good example of how to add tags to your theme. Then, I was playing around with the theme switcher on my personal blog, and discovered that the default theme had tag support. I looked at it, and it was amazingly simple.
|
||||
|
||||
There is a new template tag called ...drumroll... `the_tags`. It takes three parameters: how to begin the list, how to separate each tag, and how to end the list. The tag does not do any output if a post hasn't been tagged, so it can safely sit in your theme until you need it to be active.
|
||||
|
||||
Here's how I did it in my personal blog.
|
||||
|
||||
{% codeblock lang:php %}
|
||||
<?php the_tags('<div class="tags">Tags » ', ' • ', '</div>'); ?>
|
||||
{% endcodeblock %}
|
||||
|
||||
Of course, you could also do it using an unordered list...
|
||||
|
||||
{% codeblock lang:php %}
|
||||
<?php the_tags('Tags<ul class="tags"><li>', '</li><li>', '</li></ul>'); ?>
|
||||
{% endcodeblock %}
|
||||
|
||||
Drop some styling for the "tags" class in your theme's CSS, and you're good to go!
|
||||
|
||||
(Well, not quite. You'll want to make sure to make the same change in your main index template, single post template,
|
||||
and archive template, so that the tags appear no matter how the user got to the post.)
|
30
source/_posts/2007/category-drop-down-in-wordpress.md
Normal file
30
source/_posts/2007/category-drop-down-in-wordpress.md
Normal file
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
layout: post
|
||||
title: Category Drop-Down in WordPress
|
||||
author: Daniel
|
||||
date: 2007-05-24 09:00:15
|
||||
categories:
|
||||
- [ Programming, JavaScript ]
|
||||
- [ Programming, PHP, WordPress ]
|
||||
tags:
|
||||
- category
|
||||
- dropdown
|
||||
- wordpress
|
||||
summary: A category dropdown (select list) in WordPress
|
||||
---
|
||||
|
||||
[WordPress][] provides a [template tag][template], [wp_dropdown_categories][cat], that inserts a drop-down list (the HTML <select> element) of categories, where the value of each item is the ID from the database. This works fine if you are not using rewrite rules (AKA "pretty links") - you can construct a URL using the value (?cat=[number]). However, if you use any sort of rewrite rules, this does not work. I recently converted my [personal site][], which uses the Pool theme, to utilize a JavaScript array to assist with displaying category pages.
|
||||
|
||||
Here's the code...
|
||||
|
||||
_Edit: Code has been moved to [this post][]._
|
||||
|
||||
This works for both "pretty" and standard links, as it uses the template tag [get_category_link][link] to specify the link.
|
||||
|
||||
|
||||
[WordPress]: //wordpress.org "WordPress"
|
||||
[template]: //codex.wordpress.org/Template_Tags "Template Tags - WordPress Codex"
|
||||
[cat]: //codex.wordpress.org/Template_Tags/wp_dropdown_categories "wp_dropdown_categories - WordPress Codex"
|
||||
[personal]: //daniel.summershome.org "Daniel J. Summers"
|
||||
[this post]: /2007/posting-source-code-in-wordpress-take-2.html "Posting Source Code in WordPress, Take 2 • DJS Consulting Tech Blog"
|
||||
[link]: //codex.wordpress.org/Function_Reference/get_category_link "get_category_link - WordPress Codex"
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
layout: post
|
||||
title: Daniel's DropDowns 1.0 - WordPress Plug-In
|
||||
author: Daniel
|
||||
date: 2007-10-02 19:54:56
|
||||
categories:
|
||||
- [ Programming, PHP, WordPress ]
|
||||
tags:
|
||||
- category
|
||||
- dropdown
|
||||
- plug-in
|
||||
- wordpress
|
||||
summary: A WordPress plugin to display category and archive drop-downs
|
||||
---
|
||||
|
||||
I've created a plug-in that I'm now using on my personal site to provide the category and archive drop-down lists. It's called "Daniel's DropDowns", and it will create drop-downs with either a link or a button to go to the selection in the drop-down, and a CSS class can be specified for the button and the drop-down box.
|
||||
|
||||
<del>daniels\_dropdowns.txt - Daniel's DropDowns 1.0</del> _(UPDATE: This functionality is now part of WordPress core.)_
|
||||
|
||||
<del>To install it, download the file, rename it "daniels_dropdowns.php", and upload it to your /wp-content/plugins directory. Then, enable it, and add the template tags to your theme. (The documentation at the top of the file lists all the template tags provided, and the options that can be passed to them.)</del>
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
layout: post
|
||||
title: Daniel's DropDowns 2.0.1 - WordPress Plug-In
|
||||
author: Daniel
|
||||
date: 2007-12-24 10:34:06
|
||||
categories:
|
||||
- [ Programming, PHP, WordPress ]
|
||||
tags:
|
||||
- category
|
||||
- dropdown
|
||||
- plug-in
|
||||
- update
|
||||
- wordpress
|
||||
summary: A quick bug fix
|
||||
---
|
||||
|
||||
I have released version 2.0.1 of Daniel's DropDowns, the [WordPress][] plug-in that provides category and archive dropdown template tags. It is available on [its page at the WordPress Plug-In Directory][pi].
|
||||
|
||||
This was a minor change - the auto-navigating lists added in version 2 needed a slight tweak. There wasn't a "select category" entry, so one could not navigate to the first item in the list without going somewhere else first. The category dropdown now has this entry, and is consistent with the archive dropdown.
|
||||
|
||||
Enjoy!
|
||||
|
||||
_(UPDATE: This plug-in is inactive, as its functionality is now part of WordPress core.)_
|
||||
|
||||
|
||||
[WordPress]: //wordpress.org "WordPress"
|
||||
[pi]: //wordpress.org/extend/plugins/daniels-dropdowns/ "Download Daniel's DropDowns 2.0.1"
|
30
source/_posts/2007/daniels-dropdowns-2-wordpress-plug-in.md
Normal file
30
source/_posts/2007/daniels-dropdowns-2-wordpress-plug-in.md
Normal file
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
layout: post
|
||||
title: Daniel's DropDowns 2 - WordPress Plug-In
|
||||
author: Daniel
|
||||
date: 2007-12-23 23:02:49
|
||||
categories:
|
||||
- [ Programming, PHP, WordPress ]
|
||||
tags:
|
||||
- category
|
||||
- dropdown
|
||||
- plug-in
|
||||
- update
|
||||
- wordpress
|
||||
summary: A new version of the category / archive plug-in
|
||||
---
|
||||
|
||||
I have released version 2 of my category and archive drop-down plug-in for [WordPress][]. It is hosted at the WordPress Plug-In Directory - you can [go get it there][pi]. Following are a few of the changes that were made.
|
||||
|
||||
* Both tags now have only 2 parameters - the type of navigation and the text for the link or button. For navigation type, 'button' remains the default, and 'link' is still available. However, a third option of 'auto' has been added, which will render the list as an auto-navigating select box.
|
||||
* The CSS parameters for the select and button elements were dropped. How these elements can be specified using CSS is detail in the top-of-plugin comments, along with an example.
|
||||
* The usage examples in the comments now have an example of how to put the tag in a template in such a way that, if the plug-in is disabled, the template will still render. This could be done with 1.0, but I didn't give an example.
|
||||
* I added PHP Documentor-style comments to both functions.
|
||||
|
||||
Let me know if you have any problems with it, or any ideas for other behavior. Enjoy!
|
||||
|
||||
_(UPDATE: This plug-in is inactive, as its functionality is now part of WordPress core.)_
|
||||
|
||||
|
||||
[WordPress]: //wordpress.org "WordPress"
|
||||
[pi]: //wordpress.org/extend/plugins/daniels-dropdowns/ "Download Daniel's DropDowns 2"
|
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
layout: post
|
||||
title: HCSB Verse of the Day 1.0 - WordPress Plug-In
|
||||
author: Daniel
|
||||
date: 2007-09-25 22:08:24
|
||||
categories:
|
||||
- [ Programming, PHP, WordPress ]
|
||||
tags:
|
||||
- bible gateway
|
||||
- hcsb
|
||||
- plug-in
|
||||
- wordpress
|
||||
summary: A WordPress plug-in to display a verse or passage each day
|
||||
---
|
||||
|
||||
I have used a hack in the theme of my personal site for a while to obtain the "Verse of the Day" in the Holman Christian Standard Bible (HCSB) version. With things that I've learned about plug-ins, I decided to take a stab at creating a plug-in to do this work. That way, if I changed themes, I wouldn't have to hack the new one they way I've hacked the current one.
|
||||
|
||||
The fruits of my labor is the new HCSB Verse of the Day plug-in for WordPress. It uses the reference from [BibleGateway.com][], then gets the text from their regular website. (They do not provide the service, citing copyright restrictions.) How to use the plug-in, along with my justification on copyright grounds, is in the top of the file's comments. If they're not clear, certainly post comments here and I'll address them. (I do plan to submit the plug-in to [WordPress.org][] - but, they require a specific README file format that it will take me a bit to put together.)
|
||||
|
||||
<del>votd\_hcsb.txt - HCSB Verse of the Day 1.0</del> _(UPDATE: It is in the plugin directory now.)_
|
||||
|
||||
<del>To install it, download the file, rename it "votd_hcsb.php", and upload it to your /wp-content/plugins directory. Then, enable it, and add the template tags to your theme - that's it!</del>
|
||||
|
||||
|
||||
[BibleGateway.com]: //www.biblegateway.com "Bible Gateway"
|
||||
[WordPress.org]: //wordpress.org "WordPress"
|
|
@ -0,0 +1,38 @@
|
|||
---
|
||||
layout: post
|
||||
title: Incorporating an Akismet Counter Into a WordPress Theme
|
||||
author: Daniel
|
||||
date: 2007-08-06 10:14:00
|
||||
categories:
|
||||
- [ Programming, PHP, WordPress ]
|
||||
tags:
|
||||
- aksimet
|
||||
- counter
|
||||
- spam
|
||||
- theme
|
||||
- wordpress
|
||||
summary: Akismet counts the spam it blocks, and that count can be displayed
|
||||
---
|
||||
|
||||
[Akismet][] is, by far, the most popular anti-spam plug-in for WordPress. (It comes bundled with the download, so that gets it market share. But, it's also very, very good.) It comes with a counter that can be put into a WordPress theme. It's attractive, but its light blue color may not integrate well into a given theme.
|
||||
|
||||
I went digging around in the source code, and found the line that actually pulls the count from the database. Using this parameter, I was able to integrate a spam count into the sidebar that has a look consistent with the rest of the site.
|
||||
|
||||
Here's the code that's in use on the theme on this site.
|
||||
|
||||
{% codeblock lang:php %}
|
||||
<li id="spamstats">
|
||||
<h2><?php _e('Akismet-Eaten Spam:'); ?></h2>
|
||||
<ul>
|
||||
<li><a href="//akismet.com"><?php
|
||||
echo(number_format(get_option("akismet_spam_count"))); ?>
|
||||
and counting...</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
{% endcodeblock %}
|
||||
|
||||
Of course, line 5 is the important one - that's how to get the number, formatted for whatever locale the server is set up for. (On my [personal blog][djs], the number is up over 1,400!)
|
||||
|
||||
|
||||
[Akismet]: //akismet.com "Akismet"
|
||||
[djs]: //daniel.summershome.org "Daniel J. Summers"
|
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
layout: post
|
||||
title: Lightning Calendar Plug-In for Thunderbird AMD64
|
||||
author: Daniel
|
||||
date: 2007-07-21 09:01:42
|
||||
categories:
|
||||
- [ Hosted 64-bit Software, Lightning Plug-In ]
|
||||
tags:
|
||||
- amd64
|
||||
- lightning
|
||||
- mozilla
|
||||
- plug-in
|
||||
- sunbird
|
||||
- thunderbird
|
||||
summary: A plugin that brings Mozilla Sunbird into Thunderbird
|
||||
comments: []
|
||||
---
|
||||
|
||||
[Mozilla Sunbird][] is a calendar project that's being designed as a sister program to Thunderbird and Firefox. It's now at the 0.5 version, and there is a plug-in that integrates Sunbird with Thunderbird, called [Lightning][]. It allows you to not only have a calendar, but send and receive meeting requests as well.
|
||||
|
||||
I'm running Thunderbird 2 under Ubuntu Feisty Fawn (7.04) on the AMD64 architecture, and could not find a pre-compiled version of this that worked. So, I decided to give it a shot. It was pretty easy, and the result is a plug-in that works with the AMD64 version of Thunderbird! Since I had trouble finding it, I thought I would share it.
|
||||
|
||||
Since I have just started using it, I haven't wrung it out, or tested all the options. Use at your own risk, etc.
|
||||
|
||||
<del>You can download the plug-in here</del> _(UPDATE: See [this post][].)_ Happy storming! ;)
|
||||
|
||||
|
||||
[Mozilla Sunbird]: //www.mozilla.org/projects/calendar/sunbird/ "Mozilla Sunbird Calendar Project"
|
||||
[Lightning]: //www.mozilla.org/projects/calendar/lightning/ "Lightning Plug-in for Thunderbird"
|
||||
[this post]: /2007/mozilla-now-hosting-lightning-64-bit-plug-in.html "Mozilla Now Hosting Lightning 64-bit Plug-In • DJS Consulting Tech Blog"
|
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
layout: post
|
||||
title: Mozilla Now Hosting Lightning 64-bit Plug-In
|
||||
author: Daniel
|
||||
date: 2007-08-07 12:56:46
|
||||
categories:
|
||||
- [ Hosted 64-bit Software, Lightning Plug-In ]
|
||||
tags:
|
||||
- lightning
|
||||
- mozilla
|
||||
- plug-in
|
||||
summary: Mozilla provides the Lightning plug-in now
|
||||
comments: []
|
||||
---
|
||||
|
||||
Just when I get a nice system set up here, lo and behold, Mozilla now has a 64-bit Linux plug-in available. It can be [obtained from their FTP site][ftp] (link for version 0.5). <del>I'll continue to keep the version I have here available, in case this dries up.</del> _(UPDATE: It's gone.)_ But, unless that does, this is probably the last post you'll see here about the 64-bit Lightning plug-in.
|
||||
|
||||
|
||||
[ftp]: //releases.mozilla.org/pub/mozilla.org/calendar/lightning/releases/0.5/contrib/linux-x86-64/
|
|
@ -0,0 +1,62 @@
|
|||
---
|
||||
layout: post
|
||||
title: Posting Source Code in WordPress, Take 2
|
||||
author: Daniel
|
||||
date: 2007-06-13 11:33:15
|
||||
categories:
|
||||
- [ Programming, PHP, WordPress ]
|
||||
tags:
|
||||
- geshi
|
||||
- plug-in
|
||||
- source
|
||||
- wordpress
|
||||
- wp-syntax
|
||||
summary: The WP Syntax Plugin is another plugin that simplifies posting source code
|
||||
---
|
||||
|
||||
In my searching, I have found another WordPress source code plugin, called [wp-syntax][]. This one uses [GeSHi][], the Generic Syntax Highlighter. It features many languages, and is extensible to even more. (If I ever post a COBOL snippet, I'll probably add COBOL support to it, and contribute it to the codebase.)
|
||||
|
||||
To use it, you simply put a pre tag, followed by `lang=[language]`. It will also do line numbering. Of course, with a single "language" parameter, the embedded language will not be highlighted as well. In this case, the previous plug-in works better; although the syntax highlighting has to be done manually, it can handle multiple languages.
|
||||
|
||||
_(NOTE: The samples have been removed, as this blog is not running under WordPress. However, since the source code from another post was moved here, it is presented below, using [Jekyll][]'s PHP highlighting mode.)_
|
||||
|
||||
{% codeblock lang:php %}
|
||||
<?php
|
||||
/**
|
||||
* This creates a list of category links that can be used with a category dropdown
|
||||
*/
|
||||
$aCategories = get_all_category_ids();
|
||||
$iMaxCat = 0;
|
||||
foreach($aCategories as $iThisCat) {
|
||||
if ($iMaxCat < $iThisCat) {
|
||||
$iMaxCat = $iThisCat;
|
||||
}
|
||||
}
|
||||
$iMaxCat++;
|
||||
?>
|
||||
<div style="text-align:center;">
|
||||
<form name="categoryform" action="" style="text-align:center;">
|
||||
<script type="text/javascript">
|
||||
var aLink = new Array(<?php echo($iMaxCat); ?>);
|
||||
<?php
|
||||
foreach($aCategories as $iThisCat) {
|
||||
echo("aLink[$iThisCat] = \"" . get_category_link($iThisCat) . "\";\n");
|
||||
} ?>
|
||||
function goCat() {
|
||||
window.location =
|
||||
aLink[document.getElementById('cat')[document.getElementById('cat').selectedIndex].text;
|
||||
}
|
||||
</script>
|
||||
<?php wp_dropdown_categories('class=sidebardropdown&orderby=name&show_count=1&hierarchical=1'); ?>
|
||||
<br /><br />
|
||||
<button class="sidebarbutton" type="button" style="margin-top:5px;" onclick="goCat();">View Category</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endcodeblock %}
|
||||
|
||||
This is another option, and is probably what I'll use for single-language posts, or posts where the embedded language may not be crucial.
|
||||
|
||||
|
||||
[wp-syntax]: //wordpress.org/extend/plugins/wp-syntax/ "WP Syntax Plugin"
|
||||
[GeSHi]: //qbnz.com/highlighter/ "GeSHi"
|
||||
[Jekyll]: //jekyllrb.com "Jekyll"
|
31
source/_posts/2007/posting-source-code-in-wordpress.md
Normal file
31
source/_posts/2007/posting-source-code-in-wordpress.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
layout: post
|
||||
title: Posting Source Code in WordPress
|
||||
author: Daniel
|
||||
date: 2007-05-30 14:45:10
|
||||
categories:
|
||||
- [ Programming, PHP, WordPress ]
|
||||
tags:
|
||||
- bennet mcelwee
|
||||
- plug-in
|
||||
- source
|
||||
- wordpress
|
||||
summary: A plug-in for WordPress makes posting source code samples easy
|
||||
---
|
||||
|
||||
Traditionally, posting source code in a WordPress blog, especially if it were HTML or PHP, was problematic. There are a few reasons for this...
|
||||
|
||||
* WordPress is very good about ensuring that it outputs valid XHTML, so it strips mis-matched and invalid tags. This is usually desirable, but it wreaks havoc with HTML and XML code posts.
|
||||
* Since WordPress is coded in PHP, blocks of PHP will attempt to execute.
|
||||
* White space is collapsed, which can kill any readability that the user has set out; the "visual editor" ([TinyMCE][]) does its best to create efficient HTML. This can actually break spacing-oriented languages such as Python.
|
||||
|
||||
So how do you do it? It's actually pretty easy, using the [Code Markup][] WordPress plugin. You can download the plugin from that link, and upload it to <tt>./wp-content/plugins</tt>. The instructions on the website are critical - the "visual" editor will not allow the code to come through unscathed. However, the visual editor only corrupts the code if you actually save it; what I have done is write the post using the visual editor, then disable it and put the code in. It's the best of both worlds! (Make sure that, once you have the code in, you don't edit the post using the visual editor - unless you have a good backup...)
|
||||
|
||||
<del>The post below this one (about category lists in WordPress) was done using this plugin.</del> _(This isn't running in WordPress any more.)_ In addition, you can use the <tt><span></tt> tag to do the color-coding. I created a few CSS classes ("key" for keywords, "func" for functions, "attr" for attributes, "embed" for embedded language), and used them to accomplish the color coding. It seems that it would be pretty easy to write another plugin that used a list of keywords to do this syntax highlighting; maybe that's a challenge for another day.
|
||||
|
||||
A big "atta boy" to [Bennet McElwee][] for a fantastic plugin!
|
||||
|
||||
|
||||
[TinyMCE]: //tinymce.moxiecode.com "TinyMCE"
|
||||
[Code Markup]: //www.thunderguy.com/semicolon/wordpress/code-markup-wordpress-plugin "Code Markup Plug-in - Semicolon"
|
||||
[Bennet McElwee]: //www.thunderguy.com/semicolon/ "Semicolon - by Bennett McElwee"
|
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
layout: post
|
||||
title: Releases for Lightning Plug-In and xine RPMs
|
||||
author: Daniel
|
||||
date: 2007-08-06 22:49:08
|
||||
categories:
|
||||
- [ Hosted 64-bit Software, Lightning Plug-In ]
|
||||
- [ Hosted 64-bit Software, xine RPMs ]
|
||||
tags:
|
||||
- category
|
||||
- lightning
|
||||
- xine
|
||||
summary: How to track releases of pre-built open source software hosted by DJS Consulting
|
||||
---
|
||||
|
||||
At DJS Consulting, we maintain 64-bit builds for two software products - xine and the Lightning plug-in for Thunderbird. These are now shown under "Hosted 64-Bit Software" in the sidebar. You can also view links for each of the categories.
|
||||
|
||||
<del>**Lightning Plug-In**</del> _(UPDATE: See [this post][].)_
|
||||
|
||||
<del>Category Link • <del>RSS Feed</del>
|
||||
|
||||
**xine RPMs**
|
||||
|
||||
[Category Link][xine-cat] • [RSS Feed][xine-rss]
|
||||
|
||||
Along these lines, there will hopefully be a new xine (1.1.7) coming soon - stay tuned!
|
||||
|
||||
|
||||
[this post]: /2007/mozilla-now-hosting-lightning-64-bit-plug-in.html "Mozilla Now Hosting Lightning 64-bit Plug-In • DJS Consulting Tech Blog"
|
||||
[xine-cat]: /category/xine-rpms
|
||||
[xine-rss]: /xine-rpms.xml
|
|
@ -0,0 +1,133 @@
|
|||
---
|
||||
layout: post
|
||||
title: Transferring CLOBs Across Linked Oracle Databases
|
||||
author: Daniel
|
||||
date: 2007-06-15 14:04:02
|
||||
categories:
|
||||
- [ Databases, Oracle ]
|
||||
- [ Programming, SQL, PL/SQL ]
|
||||
tags:
|
||||
- algorithm
|
||||
- clob
|
||||
- data
|
||||
- linked database
|
||||
- oracle
|
||||
summary: An algorithm to move CLOBs from one database to another
|
||||
---
|
||||
|
||||
Linking databases in Oracle make it easy to share data, and can be useful for replication. However, there is a limitation in Oracle that prevents Character Large Objects (CLOBs) from coming across these links. The following technique uses stored procedures and a temporary table to pull CLOBs across a database link.
|
||||
|
||||
First, you'll need the temporary table, which will hold a sequence number, the primary key for the table where you'll want to reconstruct the CLOB, and some text. This table can reside in the source or destination database, but must be linked from the other one. For our purposes, it looks like this...
|
||||
|
||||
{% codeblock lang:sql %}
|
||||
create table clob_xfer_area
|
||||
(
|
||||
cxa_pk number(12),
|
||||
cxa_number number(12),
|
||||
cxa_text varchar2(4000 byte)
|
||||
);
|
||||
alter table clob_xfer_area add
|
||||
(
|
||||
constraint pk_cxa_id
|
||||
primary key (cxa_pk, cxa_number)
|
||||
);
|
||||
{% endcodeblock %}
|
||||
|
||||
Second, you'll need the procedure in the source database that breaks the CLOB apart and populates the temporary table.
|
||||
|
||||
{% codeblock lang:sql %}
|
||||
set serveroutput on size 1000000
|
||||
set lines 1000
|
||||
set pages 0
|
||||
set tab off
|
||||
set feedback on
|
||||
create or replace
|
||||
procedure break_clobs_apart
|
||||
is
|
||||
v_line_number number(3);
|
||||
v_text_piece varchar2(4000);
|
||||
v_total_length number(12);
|
||||
cursor clob_cur is
|
||||
select twc_pk, twc_clob_field
|
||||
from table_with_clob;
|
||||
begin /* { */
|
||||
for clob_rec in clob_cur loop /* { */
|
||||
v_total_length := 1;
|
||||
v_line_number := 0;
|
||||
while (v_total_length <=
|
||||
DBMS_LOB.GETLENGTH(clob_rec.twc_clob_field)) loop /* { */
|
||||
v_line_number := v_line_number + 1;
|
||||
v_text_piece := DBMS_LOB.SUBSTR(clob_rec.twc_clob_field,
|
||||
3999, v_total_length);
|
||||
v_total_length := v_total_length + 3999;
|
||||
insert into clob_xfer_area (
|
||||
cxa_pk,
|
||||
cxa_number,
|
||||
cxa_text
|
||||
)
|
||||
values (
|
||||
clob_rec.twc_pk, -- cxa_pk
|
||||
v_line_number, -- cxa_number
|
||||
v_text_piece -- cxa_text
|
||||
);
|
||||
end loop; /* } of while */
|
||||
end loop; /* } of clob_cur */
|
||||
end; /* } of procedure break_clobs_apart */
|
||||
{% endcodeblock %}
|
||||
|
||||
Third, you'll need a procedure in the destination database that puts the CLOB back together, and deletes the data from the temporary table.
|
||||
|
||||
{% codeblock lang:sql %}
|
||||
set serveroutput on size 1000000
|
||||
set lines 1000
|
||||
set pages 0
|
||||
set feedback on
|
||||
set tab off
|
||||
create or replace
|
||||
procedure put_clobs_together
|
||||
is
|
||||
v_new_clob clob;
|
||||
cursor pk_cur is
|
||||
select distinct cxa_pk
|
||||
from clob_xfer_area;
|
||||
cursor piece_cur(p_cxa_pk number) is
|
||||
select cxa_text
|
||||
from clob_xfer_area
|
||||
where cxa_pk = p_cxa_pk
|
||||
order by cxa_number;
|
||||
begin /* { */
|
||||
for pk_rec in pk_cur loop /* { */
|
||||
DBMS_LOB.CREATETEMPORARY(v_new_clob, TRUE);
|
||||
DBMS_LOB.OPEN(v_new_clob, DBMS_LOB.LOB_READWRITE);
|
||||
for piece_rec in piece_cur(pk_rec.cxa_pk) loop /* { */
|
||||
DBMS_LOB.WRITEAPPEND(v_new_clob, LENGTH(piece_rec.cxa_text),
|
||||
piece_rec.cxa_text);
|
||||
end loop; /* } of piece_cur */
|
||||
DBMS_LOB.CLOSE(v_new_clob);
|
||||
update dest_table_with_clob
|
||||
set migrated_clob = v_new_clob
|
||||
where dtwc_pk = pk_rec.cxa_pk;
|
||||
end loop; /* } of pk_cur */
|
||||
delete from clob_xfer_area;
|
||||
end; /* } of procedure put_clobs_together */
|
||||
{% endcodeblock %}
|
||||
|
||||
Finally, you'll need a procedure that controls the whole thing. We'll assume that this procedure is loaded in the destination database, and the source database is linked with the name "source".
|
||||
|
||||
{% codeblock lang:sql %}
|
||||
set lines 1000
|
||||
set pages 0
|
||||
set feedback on
|
||||
set tab off
|
||||
create or replace
|
||||
procedure xfer_clobs
|
||||
is
|
||||
begin /* { */
|
||||
break_clobs_apart@source;
|
||||
put_clobs_together;
|
||||
end; /* } */
|
||||
{% endcodeblock %}
|
||||
|
||||
(This does not include a commit - the changes will not be persistent unless they are committed.)
|
||||
|
||||
Of course, these processes could (and, to be useful, likely would) be integrated into other procedures and scripts. But, this framework will successfully transfer CLOBs across linked databases in Oracle.
|
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
layout: post
|
||||
title: Transferring Data Between Oracle and SQL Server
|
||||
author: Daniel
|
||||
date: 2007-07-09 15:23:10
|
||||
date_gmt: '2007-07-09 21:23:10 +0000'
|
||||
categories:
|
||||
- [ Databases, Oracle ]
|
||||
- [ Databases, SQL Server ]
|
||||
tags:
|
||||
- data
|
||||
- dts
|
||||
- instant client
|
||||
- oracle
|
||||
- sql server
|
||||
summary: Using Oracle's Instant Client for easy SQL Server data exchange
|
||||
---
|
||||
|
||||
There are lots of "how to" articles on sharing data between Oracle and SQL Server. Most of these involve installing Oracle's code base on the SQL Server machine, then using that instance to link tables within Oracle. This technique does not require that, thanks to a product from Oracle called [Oracle Instant Client][ic].
|
||||
|
||||
To set up the Oracle piece, download the packages for "Basic" and "ODBC Supplement", and follow the instructions for installation, on the machine with SQL Server. (This is not an "install" per se - it's basically an unzip.) Next, you'll need to provide a TNSNAMES.ORA file - this can be any valid file, including a simple shell with an "ifile=" statement pointing to a common TNSNAMES.ORA file. Finally, set the environment variable TNS_ADMIN to point to the directory where this TNSNAMES.ORA file resides.
|
||||
|
||||
Now, you can easily create a DTS script through SQL Server to push or pull data however you'd like. Oracle Instant Client will appear in the drop-down list of providers, and you'll be able to specify your connection the way you normally do (i.e., "DB01.WORLD").
|
||||
|
||||
Happy migrating!
|
||||
|
||||
|
||||
[ic]: //www.oracle.com/technology/tech/oci/instantclient/index.html "Download Oracle Instant Client"
|
20
source/_posts/2007/welcome.md
Normal file
20
source/_posts/2007/welcome.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
layout: post
|
||||
title: Welcome!
|
||||
author: Daniel
|
||||
date: 2007-05-17 14:29:32
|
||||
categories:
|
||||
- General Info
|
||||
tags:
|
||||
- blog
|
||||
- welcome
|
||||
---
|
||||
|
||||
Welcome to the DJS Consulting Tech Blog. This blog is a place where I plan to posts tips and other information regarding technology (AKA "geek stuff"). This will allow me to keep [my personal blog][pers] non-technical.
|
||||
|
||||
I have imported my old "My Linux Adventure" posts from 2004 here, to allow the to be indexed and searchable. I noticed, in the process, that some of the information is somewhat dated - take it for what it's worth, which is twice what you paid for it!
|
||||
|
||||
I hope that the information here will be beneficial to you.
|
||||
|
||||
|
||||
[pers]: //daniel.summershome.org "Daniel J. Summers: Charter Member of the VRWC"
|
19
source/_posts/2007/wordpress-2-3-about-to-drop.md
Normal file
19
source/_posts/2007/wordpress-2-3-about-to-drop.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
layout: post
|
||||
title: WordPress 2.3 About to Drop
|
||||
author: Daniel
|
||||
date: 2007-09-24 13:05:27
|
||||
categories:
|
||||
- General Info
|
||||
tags:
|
||||
- update
|
||||
- wordpress
|
||||
summary: A pending WordPress release
|
||||
---
|
||||
|
||||
Version 2.3 of WordPress, the blogging software I use to produce this blog (as well as the other blogs on my site), will be released later today. I'll be upgrading these blogs on Monday evening. There have been major pieces of WordPress that have been re-worked, and those are causing some plug-ins to not work correctly. None of my blogs are all that reliant on plug-ins - the "Share This" plug-in is the main one, and it's been verified in 2.3 already.
|
||||
|
||||
There's lots more information on the [WordPress Development Blog][dev] - I won't go into the details here. I'm confident this will be a smooth upgrade. I just wanted to let you know in case some things look strange, I'm on it.
|
||||
|
||||
|
||||
[dev]: //wordpress.org/development "Development Blog - WordPress.org"
|
25
source/_posts/2007/xine-lib-1-1-7-rpm.md
Normal file
25
source/_posts/2007/xine-lib-1-1-7-rpm.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
layout: post
|
||||
title: xine-lib 1.1.7 RPM
|
||||
author: Daniel
|
||||
date: 2007-08-21 21:10:15
|
||||
categories:
|
||||
- [ Hosted 64-bit Software, xine RPMs ]
|
||||
tags:
|
||||
- rpm
|
||||
- xine-lib
|
||||
---
|
||||
|
||||
Below are the library and development RPMs for xine-lib version 1.1.7. These have been built a little differently. First, these have been built on Ubuntu Linux, and converted to RPM using alien. Second, I could not quickly figure out how to get only the files tagged for the 1.1.7 release, so this is actually the in-work 1.1.8 release. I ran these builds through some paces, and nothing glaring came out. Be sure to check out the [About the xine RPMs][abt] post for more information.
|
||||
|
||||
xine-lib - The main xine library
|
||||
xine-lib-dev - The development xine library (needed if you're building an interface against xine-lib)
|
||||
|
||||
You'll also need a user interface - as of this release, the most current release of [xine-ui is 0.99.5][ui].
|
||||
|
||||
(To save disk space, only the current release and two [prior releases][pri] will be maintained.)
|
||||
|
||||
|
||||
[abt]: /2005/about-the-xine-rpms.html "About the xine RPMs • DJS Consulting Tech Blog"
|
||||
[ui]: /2007/xine-ui-0-99-5-rpm.html
|
||||
[pri]: /2005/xine-lib-1-1-1-rpm.html
|
24
source/_posts/2007/xine-ui-0-99-5-rpm.md
Normal file
24
source/_posts/2007/xine-ui-0-99-5-rpm.md
Normal file
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
layout: post
|
||||
title: xine-ui 0.99.5 RPM
|
||||
author: Daniel
|
||||
date: 2007-08-21 21:15:35
|
||||
categories:
|
||||
- [ Hosted 64-bit Software, xine RPMs ]
|
||||
tags:
|
||||
- rpm
|
||||
- xine-ui
|
||||
---
|
||||
|
||||
Below is the RPM for xine-ui version 0.99.5. This RPM has been built a little differently. First, it was built on Ubuntu Linux and converted to RPM using alien. Second, I could not quickly figure out how to get the files tagged for the 0.99.5 release, so this build includes changes committed after the official 0.99.5 release. I ran the UI through some paces, and no glaring errors jumped out. Be sure to check out the [About the xine RPMs][abt] post for more information.
|
||||
|
||||
xine-ui - The user interface
|
||||
|
||||
To use this, you'll also need xine-lib - as of this release, the most recent release of [xine-lib is 1.1.7][lib].
|
||||
|
||||
(To save disk space, only the current release and two [prior releases][pri] will be maintained.)
|
||||
|
||||
|
||||
[abt]: /2005/about-the-xine-rpms.html "About the xine RPMs • DJS Consulting Tech Blog"
|
||||
[lib]: /2007/xine-lib-1-1-7-rpm.html
|
||||
[pri]: /2005/xine-ui-0-99-4-rpm.html
|
125
source/_posts/2008/a-handy-php-backup-script.md
Normal file
125
source/_posts/2008/a-handy-php-backup-script.md
Normal file
|
@ -0,0 +1,125 @@
|
|||
---
|
||||
layout: post
|
||||
title: A Handy PHP Backup Script
|
||||
author: Daniel
|
||||
date: 2008-03-28 23:06:37
|
||||
categories:
|
||||
- [ Databases, MySQL ]
|
||||
- [ Databases, PostgreSQL ]
|
||||
- [ Programming, PHP ]
|
||||
tags:
|
||||
- backup
|
||||
- database
|
||||
- php
|
||||
- script
|
||||
summary: A PHP script to create a zip archive and e-mail it
|
||||
---
|
||||
|
||||
I found a script over on the Lunarpages Forums about [using PHP to back up your site][forum]. I have taken it, modified it a little, beefed up the documentation a lot, and am now posting it here. You can copy and paste it from below to customize it for your own use.
|
||||
|
||||
{% codeblock backup.php lang:php %}
|
||||
<?php
|
||||
/**
|
||||
* Generic Backup Script.
|
||||
*
|
||||
* To configure this script for your purposes, just edit the parameters below.
|
||||
* Once you have the parameters set properly, when the script executes, it will
|
||||
* create an archive file, gzip it, and e-mail it to the address specified. It
|
||||
* can be executed through cron with the command
|
||||
*
|
||||
* php -q [name of script]
|
||||
*
|
||||
* You are free to use this, modify it, copy it, etc. However, neither DJS
|
||||
* Consulting nor Daniel J. Summers assume any responsibility for good or bad
|
||||
* things that happen when modifications of this script are run.
|
||||
*
|
||||
* @author Daniel J. Summers <daniel@djs-consulting.com>
|
||||
*/
|
||||
|
||||
// --- SCRIPT PARAMETERS ---
|
||||
|
||||
/* -- File Name --
|
||||
This is the name of the file that you're backing up, and should contain no
|
||||
slashes. For example, if you're backing up a database, this might look
|
||||
something like...
|
||||
$sFilename = "backup-my_database_name-" . date("Y-m-d") . ".sql"; */
|
||||
$sFilename = "backup-[whatever-it-is]-" . date("Y-m-d") . ".[extension]";
|
||||
|
||||
/* -- E-mail Address --
|
||||
This is the e-mail address to which the message will be sent. */
|
||||
$sEmailAddress = "[your e-mail address]";
|
||||
|
||||
/* -- E-mail Subject --
|
||||
This is the subject that will be on the e-mail you receive. */
|
||||
$sEmailSubject = "[something meaningful]";
|
||||
|
||||
/* -- E-mail Message --
|
||||
This is the text of the message that will be sent. */
|
||||
$sMessage = "Compressed database backup file $sFilename.gz attached.";
|
||||
|
||||
/* -- Backup Command --
|
||||
This is the command that does the work.
|
||||
|
||||
A note on the database commands - your setup likely requires a password
|
||||
for these commands, and they each allow you to pass a password on the
|
||||
command line. However, this is very insecure, as anyone who runs "ps" can
|
||||
see your password! For MySQL, you can create a ~/.my.cnf file - it is
|
||||
detailed at //dev.mysql.com/doc/refman/4.1/en/password-security.html .
|
||||
For PostgreSQL, the file is ~/.pgpass, and it is detailed at
|
||||
//www.postgresql.org/docs/8.0/interactive/libpq-pgpass.html . Both of
|
||||
these files should be chmod-ded to 600, so that they can only be viewed by
|
||||
you, the creator.
|
||||
|
||||
That being said, some common commands are...
|
||||
|
||||
- Backing Up a MySQL Database
|
||||
$sBackupCommand = "mysqldump -u [user_name] [db_name] > $sFilename";
|
||||
|
||||
- Backing Up a PostgreSQL Database
|
||||
$sBackupCommand = "pg_dump [db_name] -h localhost -U [user_name] -d -O > $sFilename";
|
||||
|
||||
- Backing Up a set of files (tar and gzip)
|
||||
$sBackupCommand = "tar cvf $sFilename [directory]
|
||||
|
||||
Whatever command you use, this script appends .gz to the filename after the command is executed. */
|
||||
$sBackupCommand = "[a backup command]";
|
||||
|
||||
// --- END OF SCRIPT PARAMETERS ---
|
||||
//
|
||||
// Edit below at your own risk. :)
|
||||
|
||||
// Do the backup.
|
||||
$sResult = passthru($sBackupCommand . "; gzip $sFilename");
|
||||
$sFilename .= ".gz";
|
||||
|
||||
// Create the message.
|
||||
$sMessage = "Compressed database backup file $sFilename attached.";
|
||||
$sMimeBoundary = "<<<:" . md5(time());
|
||||
$sData = chunk_split(base64_encode(implode("", file($sFilename))));
|
||||
|
||||
$sHeaders = "From: $sEmailAddress\r\n"
|
||||
. "MIME-Version: 1.0\r\n"
|
||||
. "Content-type: multipart/mixed;\r\n"
|
||||
. " boundary=\"$sMimeBoundary\"\r\n";
|
||||
|
||||
$sContent = "This is a multi-part message in MIME format.\r\n\r\n"
|
||||
. "--$sMimeBoundary\r\n"
|
||||
. "Content-Type: text/plain; charset=\"iso-8859-1\"\r\n"
|
||||
. "Content-Transfer-Encoding: 7bit\r\n\r\n"
|
||||
. $sMessage."\r\n"
|
||||
. "--$sMimeBoundary\r\n"
|
||||
. "Content-Disposition: attachment;\r\n"
|
||||
. "Content-Type: Application/Octet-Stream; name=\"$sFilename\"\r\n"
|
||||
. "Content-Transfer-Encoding: base64\r\n\r\n"
|
||||
. $sData."\r\n"
|
||||
. "--$sMimeBoundary\r\n";
|
||||
|
||||
// Send the message.
|
||||
mail($sEmailAddress, $sEmailSubject, $sContent, $sHeaders);
|
||||
|
||||
// Delete the file - we don't need it any more.
|
||||
unlink($sFilename);
|
||||
{% endcodeblock %}
|
||||
|
||||
|
||||
[forum]: //www.lunarforums.com/lunarpages_how_tos/site_and_mysql_backups_via_cron-t22118.0.html "Site and MySQL backups via cron - Lunarforums"
|
|
@ -0,0 +1,138 @@
|
|||
---
|
||||
layout: post
|
||||
title: Algorithm for One-to-Many Child Table Updates
|
||||
author: Daniel
|
||||
date: 2008-03-28 20:13:24
|
||||
categories:
|
||||
- Databases
|
||||
- [ Programming, PHP ]
|
||||
- [ Programming, SQL ]
|
||||
tags:
|
||||
- algorithm
|
||||
- array
|
||||
- nsx
|
||||
- one-to-many
|
||||
- php
|
||||
- sql
|
||||
summary: An easy way to sync changes in a one-to-many relationship
|
||||
---
|
||||
|
||||
While working on the [Not So Extreme Makeover: Community Edition][nsx] site, I came up with an algorithm that simplifies anything else I've ever written to deal with this condition. I'll set the scenario, explain the algorithm, share how I implemented it in PHP, and provide a modification if the scenario is a bit more complicated.
|
||||
|
||||
**Scenario** - You have two parent tables, and a child table with a many-to-one relationship with both parent tables, used to map entries in the two parent tables to each other. For this example, we'll use these three tables...
|
||||
|
||||
{% codeblock lang:sql %}
|
||||
create table volunteer (
|
||||
vol_id integer not null,
|
||||
vol_last_name varchar(50) not null,
|
||||
...etc...
|
||||
primary key (vol_id)
|
||||
);
|
||||
|
||||
create table r_volunteer_area (
|
||||
rva_id integer not null,
|
||||
rva_description varchar(255) not null,
|
||||
primary key (rva_id)
|
||||
);
|
||||
|
||||
create table volunteer_area (
|
||||
va_volunteer_id integer not null,
|
||||
va_area_id integer not null,
|
||||
primary key (va_volunteer_id, va_area_id),
|
||||
foreign key (va_volunteer_id) references volunteer (vol_id),
|
||||
foreign key (va_area_id) references r_volunteer_area (rva_id)
|
||||
);
|
||||
{% endcodeblock %}
|
||||
|
||||
**Algorithm** - The three-step algorithm is as follows...
|
||||
|
||||
1. Create a comma-delimited string of IDs for the child table.
|
||||
2. Delete the IDs from the child table that are not in the list.
|
||||
3. Insert the IDs into the child table that are not there already.
|
||||
|
||||
**Implementation** - In PHP, if you have an array, it's easy to come up with comma-delimited list. To get an array of values back in a post, define your fields with "[]" after the name...
|
||||
|
||||
{% codeblock lang:php %}
|
||||
<input type="checkbox" name="area[]" id="chkArea1" value="1" />
|
||||
<label for="chkArea1">Do Something</label><br />
|
||||
<input type="checkbox" name="area[]" id="chkArea7" value="7" />
|
||||
<label for="chkArea7">Do Something Else</label>
|
||||
{% endcodeblock %}
|
||||
|
||||
Here's the PHP code, using [PHP Data Objects (PDO)][pdo] as the database interface, behind a helper class that creates the statement, appends the parameters, and executes it. _(The "quoting" escapes the statement to avoid potential SQL injection attacks - putting it in its own class would make the implementation here much cleaner.)_
|
||||
|
||||
{% codeblock lang:php %}
|
||||
/**
|
||||
* STEP 1
|
||||
* Create a comma-delimited list of IDs.
|
||||
*/
|
||||
|
||||
// Quote will return the string as '2,3,4' - since we're using this
|
||||
// as an IN clause of integers, we'll strip the quotes off.
|
||||
$sAreas = $pdo->quote(join(",", $_POST["area"]));
|
||||
$sAreas = substr($sAreas, 1, strlen($sAreas) - 1);
|
||||
|
||||
// Quote the volunteer ID.
|
||||
$iVol = $pdo->quote($_POST["vol"], PDO::PARAM_INT);
|
||||
|
||||
/**
|
||||
* STEP 2
|
||||
* Delete the IDs that are no longer in the list.
|
||||
*/
|
||||
$dbService->executeCommand(
|
||||
"DELETE FROM volunteer_area
|
||||
WHERE va_volunteer_id = ?
|
||||
AND va_area_id NOT IN ($sAreas)",
|
||||
array($iVol);
|
||||
|
||||
/**
|
||||
* STEP 3
|
||||
* Insert the IDs that are not yet in the list.
|
||||
*/
|
||||
$dbService->executeCommand(
|
||||
"INSERT INTO volunteer_area
|
||||
SELECT $iVol, rva_id
|
||||
FROM r_volunteer_area
|
||||
WHERE rva_id IN ($sAreas)
|
||||
AND rva_id NOT IN
|
||||
(SELECT va_area_id
|
||||
FROM volunteer_area
|
||||
WHERE va_volunteer_id = ?)",
|
||||
array($iVol));
|
||||
{% endcodeblock %}
|
||||
|
||||
**Modification** - Suppose that now you accepted comments along with each of the checkboxes, so a simple two-integer insert/delete is no longer sufficient. You would still only need to break step 3 into two steps.
|
||||
|
||||
1. Get a list of IDs to update.
|
||||
2. For each ID in the posted list
|
||||
1. If the ID exists in the update list, update it.
|
||||
2. Otherwise, insert it.
|
||||
|
||||
The implementation would then be able to use this list to make the decision without hitting the database every time.
|
||||
|
||||
{% codeblock lang:php %}
|
||||
// Assume this returns an associative array of IDs.
|
||||
$aUpdates = $dbService->performSelect(
|
||||
"SELECT va_area_id
|
||||
FROM volunteer_area
|
||||
WHERE va_volunteer_id = ?
|
||||
AND va_area_id IN ($sAreas)",
|
||||
array($iVol));
|
||||
|
||||
foreach($_POST["area"] as $iArea) {
|
||||
if (in_array($iArea, $aUpdates)) {
|
||||
// Update the table
|
||||
...etc...
|
||||
}
|
||||
else {
|
||||
// Insert into the table
|
||||
...etc...
|
||||
}
|
||||
}
|
||||
{% endcodeblock %}
|
||||
|
||||
I think you'll agree that this is much better than spinning through a loop, doing a count on each ID to see if it exists, then either doing an update or an insert based on the count. And, while the implementation here is PHP, it could easily be implemented in any language that supports arrays and database access.
|
||||
|
||||
|
||||
[nsx]: //djs-consulting.com/applications/nsx "Not So Extreme Makeover: Community Edition • DJS Consulting"
|
||||
[pdo]: //us.php.net/pdo "PHP Data Objects (PDO)"
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
layout: post
|
||||
title: Daniel's DropDowns 2.1 - WordPress Plug-In
|
||||
author: Daniel
|
||||
date: 2008-05-09 20:14:20
|
||||
categories:
|
||||
- [ Programming, PHP, WordPress ]
|
||||
tags:
|
||||
- category
|
||||
- dropdown
|
||||
- plug-in
|
||||
- wordpress
|
||||
summary: Bug fixes in conjunction with changes in WordPress 2.5
|
||||
---
|
||||
|
||||
Version 2.1 of Daniel's DropDowns has been released. This fixes a problem introduced with the 2.5-series of WordPress - the output of the WordPress tag changed, so the search-and-replace portion that added a "Select Category" entry didn't work. This has been fixed in version 2.1. I also corrected a small bug that caused the first entry in the category list to be selected if a default wasn't specified.
|
||||
|
||||
It can be downloaded from the [WordPress Plug-In Directory][pi]. Enjoy!
|
||||
|
||||
_(UPDATE: This plug-in is inactive, as its functionality is now part of WordPress core.)_
|
||||
|
||||
|
||||
[pi]: //wordpress.org/extend/plugins/daniels-dropdowns/ "Download Daniel's DropDowns 2.1"
|
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
layout: post
|
||||
title: HCSB Verse of the Day 2 - WordPress Plug-In
|
||||
author: Daniel
|
||||
date: 2008-01-01 11:02:11
|
||||
categories:
|
||||
- [ Programming, PHP, WordPress ]
|
||||
tags:
|
||||
- bible gateway
|
||||
- hcsb
|
||||
- plug-in
|
||||
- update
|
||||
- wordpress
|
||||
summary: Significant updates to the verse-of-the-day plug-in
|
||||
---
|
||||
|
||||
I have released version 2 of HCSB Verse of the Day, the [WordPress][] plug-in that provides a verse or passage each day, using the reference provided by [BibleGateway.com][]. I also completed the required files for the WordPress Plug-In Directory, so it can be [downloaded from there][pi].
|
||||
|
||||
New in this version...
|
||||
|
||||
* **New Tag** - There is now a tag votd_hcsb() that puts out the heading, the text, the reference, and the credit line all in one. This will simplify the template modification required to implement the plug-in.
|
||||
* **Custom Tag** - There is a separate file where you can specify a separate group of tags, and the votd_hcsb() tag will utilize it instead of its default. This also means that, even if future versions change the default, the custom tag layout will be used.
|
||||
* **Two Versions** - WordPress (and most plug-ins) must be compatible with PHP version 4. However, if your web server is running PHP version 5, there is now a PHP 5 version included. It incorporates the object-oriented enhancements in PHP 5.
|
||||
* **Options Revamped** - Since I initially wrote the plug-in, I've learned that WordPress allows an option to be an array. So, to streamline its usage, the options are now an array, and only require one row in the database instead of five. There is also a file to clean up the old options.
|
||||
* **Bug Fixes** - BibleGateway.com changed the way they display multiple passages (ex. "Matthew 1:13, 17-19"); version 2 has a fix that makes that work again.
|
||||
|
||||
As always, if you encounter any problems with the plug-in, just let me know and I'll try to help. Enjoy!
|
||||
|
||||
|
||||
[WordPress]: //wordpress.org "WordPress"
|
||||
[BibleGateway.com]: //www.biblegateway.com "Bible Gateway"
|
||||
[pi]: //wordpress.org/extend/plugins/hcsb-verse-of-the-day/ "Download HCSB Verse of the Day 2"
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
layout: post
|
||||
title: Killing _utma _utmb _utmc _utmz Cookies
|
||||
author: Daniel
|
||||
date: 2008-10-27 21:06:26
|
||||
categories:
|
||||
- Security and Privacy
|
||||
tags:
|
||||
- adblock plus
|
||||
- cookie
|
||||
- google
|
||||
summary: Using AdBlock Plus to get rid of common third-party cookies
|
||||
---
|
||||
|
||||
For those of us who are cookie-conscious as we surf the web, you're aware that a lot of sites give cookies with names like _utma, _utmb, _utmc, and _utmz. It turns out that these cookies come from Google Analytics.
|
||||
|
||||
However, using AdBlock Plus, there is an easy way to kill it. To put in a filter for it, click the "ABP" stop sign icon, and click the "New Filter..." button. Enter "http://www.google-analytics.com/\*" and press Enter. That's it! Those _utm* cookies are now a thing of the past.
|
21
source/_posts/2008/on-mission.md
Normal file
21
source/_posts/2008/on-mission.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
layout: post
|
||||
title: On Mission
|
||||
author: Daniel
|
||||
date: 2008-03-14 18:44:49
|
||||
categories:
|
||||
- General Info
|
||||
tags:
|
||||
- easter
|
||||
- nsx
|
||||
- postgresql
|
||||
summary: Posts have been delayed due to work on a volunteer effort in Albuquerque, New Mexico
|
||||
---
|
||||
|
||||
Sorry for the lack of new content (although I did download and build the latest release of xine). I've been working on a community-based volunteer effort in Albuquerque, New Mexico called [Not So Extreme Makeover: Community Edition][nsx]. I'm handling the public website, as well as a private side that the leaders can use to track lots of different things. I'm going to have some good stuff I've discovered out here once we're done (along with lots of praise to heap on [PostgreSQL][pg] - I have a new "most favorite" open source database), but for the rest of March, I'll likely be incommunicado.
|
||||
|
||||
Happy Easter - see you in April!
|
||||
|
||||
|
||||
[nsx]: //djs-consulting.com/applications/nsx "Not So Extreme Makeover: Community Edition • DJS Consulting"
|
||||
[pg]: //www.postgresql.org
|
34
source/_posts/2008/oracle-sql-developer-debian-package.md
Normal file
34
source/_posts/2008/oracle-sql-developer-debian-package.md
Normal file
|
@ -0,0 +1,34 @@
|
|||
---
|
||||
layout: post
|
||||
title: Oracle SQL Developer Debian Package
|
||||
author: Daniel
|
||||
date: 2008-10-29 07:17:14
|
||||
categories:
|
||||
- [ Databases, MySQL ]
|
||||
- [ Databases, Oracle ]
|
||||
- [ Databases, PostgreSQL ]
|
||||
- [ Databases, SQL Server ]
|
||||
- [ Programming, SQL ]
|
||||
tags:
|
||||
- alien
|
||||
- deb
|
||||
- java
|
||||
- oracle
|
||||
- rpm
|
||||
- sql developer
|
||||
summary: A .deb package for Oracle's SQL Developer product
|
||||
---
|
||||
|
||||
[Oracle SQL Developer][sd] is a Java-based tool that provides a graphical interface to a database. While it's main focus is Oracle (of course), it can be hooked up, via JDBC, to many other databases, such as MySQL, PostgreSQL, and SQL Server. It's similar to [Toad][], but is provided by Oracle at no cost.
|
||||
|
||||
Oracle provides SQL Developer in either an RPM, or a generic binary install. I like the ability to manage packages, but I've never had much luck at getting RPM to run on Ubuntu. I downloaded the RPM file, and, using [alien][], I converted the package to a .deb package (Debian package format) and installed it. It worked like a charm!
|
||||
|
||||
I haven't tested it with gcj, but using Sun's Java 6 update 7 from the Ubuntu repositories, it ran just fine. After you install the package, do a directory list on `/usr/lib/jvm`. You're looking for the Sun JDK - if it's installed, you'll have a symlink java-6-sun that points to java-6-sun-1.6.0.07. Once you've determined the location of the JDK, run "sqldeveloper" from the command line - the program will prompt you for the path to your JDK. Enter it (probably `/usr/lib/jvm/java-6-sun`) and you're good to go. (You have to install the package as root - but, for the rest of these steps, use your normal user, not root, as this puts settings in a .sqldeveloper directory off your home directory.) The package installs an icon in the "Programming" or "Development" group. Once you've told it where the JDK is, you can use this to launch it.
|
||||
|
||||
[Download SQL Developer 1.5.1 Debian Package][deb]
|
||||
|
||||
|
||||
[sd]: //www.oracle.com/technology/products/database/sql_developer/index.html "Oracle SQL Developer • Oracle"
|
||||
[Toad]: //www.toadsoft.com
|
||||
[alien]: //kitenet.net/~joey/code/alien/
|
||||
[deb]: //djs-consulting.com/linux/software/sqldeveloper/sqldeveloper_1.5.54.40-2_all.deb "SQL Developer 1.5.1 Debian Package • DJS Consulting Linux Software Repository"
|
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
layout: post
|
||||
title: The DJS Consulting Linux Software Repository
|
||||
author: Daniel
|
||||
date: 2008-06-24 21:05:18
|
||||
categories:
|
||||
- General Info
|
||||
tags:
|
||||
- mike petersen
|
||||
- open source
|
||||
- opensuse
|
||||
- repository
|
||||
- sled
|
||||
- xine
|
||||
- xine-lib
|
||||
- xine-ui
|
||||
summary: A new place to find all the software we host
|
||||
---
|
||||
|
||||
We have created a software repository, where users can browse files that may be available. The base location is [https://hosted.djs-consulting.com/software][repo]. Within there, there are a few areas.
|
||||
|
||||
* [/sled][] and [/opensuse][] - These contain add-on CD images for SUSE Linux Enterprise Desktop (SLED) and openSUSE, created by [Mike Petersen][pcc]. These add-ons provide multimedia and gaming capabilities that don't come with SLED unless you purchase the support or compile them yourselves. These images can be added as resources in YaST.
|
||||
* [/xine][] - This contains the 64-bit RPMs for xine (the latest three), both xine-lib and xine-ui. New releases will continue to get their own posts, but that's where they will be.
|
||||
|
||||
Enjoy!
|
||||
|
||||
|
||||
[repo]: //hosted.djs-consulting.com/software "DJS Consulting Linux Software Repository"
|
||||
[/sled]: //hosted.djs-consulting.com/software/sled "SUSE Linux Enterprise Desktop Add-On Images"
|
||||
[/opensuse]: //hosted.djs-consulting.com/software/opensuse "openSUSE Add-On Images"
|
||||
[pcc]: //www.pcc-services.com "PCC Services"
|
||||
[/xine]: //hosted.djs-consulting.com/software/xine "xine RPMs"
|
25
source/_posts/2008/xine-lib-1-1-10-1-rpm.md
Normal file
25
source/_posts/2008/xine-lib-1-1-10-1-rpm.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
layout: post
|
||||
title: xine-lib 1.1.10.1 RPM
|
||||
author: Daniel
|
||||
date: 2008-03-14 18:21:55
|
||||
categories:
|
||||
- [ Hosted 64-bit Software, xine RPMs ]
|
||||
tags:
|
||||
- rpm
|
||||
- xine-lib
|
||||
---
|
||||
|
||||
Below are the library and development RPMs for xine-lib version 1.1.10.1. These have been built the same way that 1.1.7 and 1.1.9.1 were - built on Ubuntu Linux, and converted to RPM using alien. Be sure to check out the [About the xine RPMs][abt] post for more information.
|
||||
|
||||
xine-lib - The main xine library
|
||||
xine-lib-dev - The development xine library (needed if you're building an interface against xine-lib)
|
||||
|
||||
You'll also need a user interface - as of this release, the most current release of [xine-ui is 0.99.5][ui].
|
||||
|
||||
(To save disk space, only the current release and two [prior releases][pri] will be maintained.)
|
||||
|
||||
|
||||
[abt]: /2005/about-the-xine-rpms.html "About the xine RPMs • DJS Consulting Tech Blog"
|
||||
[ui]: /2007/xine-ui-0-99-5-rpm.html
|
||||
[pri]: /2008/xine-lib-1-1-9-1-rpm.html
|
25
source/_posts/2008/xine-lib-1-1-13-rpm.md
Normal file
25
source/_posts/2008/xine-lib-1-1-13-rpm.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
layout: post
|
||||
title: xine-lib 1.1.13 RPM
|
||||
author: Daniel
|
||||
date: 2008-06-24 19:06:36
|
||||
categories:
|
||||
- [ Hosted 64-bit Software, xine RPMs ]
|
||||
tags:
|
||||
- rpm
|
||||
- xine-lib
|
||||
---
|
||||
|
||||
Below are the library and development RPMs for xine-lib version 1.1.13. These were built on Ubuntu Linux and converted to RPM using alien. Be sure to check out the [About the xine RPMs][abt] post for more information.
|
||||
|
||||
xine-lib - The main xine library
|
||||
xine-lib-dev - The development xine library (needed if you're building an interface against xine-lib)
|
||||
|
||||
You'll also need a user interface - as of this release, the most current release of [xine-ui is 0.99.5][ui].
|
||||
|
||||
(To save disk space, only the current release and two [prior releases][pri] will be maintained.)
|
||||
|
||||
|
||||
[abt]: /2005/about-the-xine-rpms.html "About the xine RPMs • DJS Consulting Tech Blog"
|
||||
[ui]: /2007/xine-ui-0-99-5-rpm.html
|
||||
[pri]: /2008/xine-lib-1-1-10-1-rpm.html
|
25
source/_posts/2008/xine-lib-1-1-14-rpm.md
Normal file
25
source/_posts/2008/xine-lib-1-1-14-rpm.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
layout: post
|
||||
title: xine-lib 1.1.14 RPM
|
||||
author: Daniel
|
||||
date: 2008-06-29 19:20:58
|
||||
categories:
|
||||
- [ Hosted 64-bit Software, xine RPMs ]
|
||||
tags:
|
||||
- rpm
|
||||
- xine-lib
|
||||
---
|
||||
|
||||
Below are the library and development RPMs for xine-lib version 1.1.14. These were built on Ubuntu Linux and converted to RPM using alien. Be sure to check out the [About the xine RPMs][abt] post for more information.
|
||||
|
||||
xine-lib - The main xine library
|
||||
xine-lib-dev - The development xine library (needed if you're building an interface against xine-lib)
|
||||
|
||||
You'll also need a user interface - as of this release, the most current release of [xine-ui is 0.99.5][ui].
|
||||
|
||||
(To save disk space, only the current release and two [prior releases][pri] will be maintained.)
|
||||
|
||||
|
||||
[abt]: /2005/about-the-xine-rpms.html "About the xine RPMs • DJS Consulting Tech Blog"
|
||||
[ui]: /2007/xine-ui-0-99-5-rpm.html
|
||||
[pri]: /2008/xine-lib-1-1-13-rpm.html
|
24
source/_posts/2008/xine-lib-1-1-9-1-rpm.md
Normal file
24
source/_posts/2008/xine-lib-1-1-9-1-rpm.md
Normal file
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
layout: post
|
||||
title: xine-lib 1.1.9.1 RPM
|
||||
author: Daniel
|
||||
date: 2008-01-23 21:41:28
|
||||
categories:
|
||||
- [ Hosted 64-bit Software, xine RPMs ]
|
||||
tags:
|
||||
- rpm
|
||||
- xine-lib
|
||||
---
|
||||
|
||||
Below are the library and development RPMs for xine-lib version 1.1.9.1. These have been built the same way that the 1.1.7 RPMs were - built on Ubuntu Linux, and converted to RPM using alien. Be sure to check out the [About the xine RPMs][abt] post for more information.
|
||||
|
||||
xine-lib - The main xine library
|
||||
xine-lib-dev - The development xine library (needed if you're building an interface against xine-lib)
|
||||
|
||||
You'll also need a user interface - as of this release, the most current release of [xine-ui is 0.99.5][ui].
|
||||
|
||||
(To save disk space, only the current release and two [prior releases][pri] will be maintained.)
|
||||
|
||||
[abt]: /2005/about-the-xine-rpms.html "About the xine RPMs • DJS Consulting Tech Blog"
|
||||
[ui]: /2007/xine-ui-0-99-5-rpm.html
|
||||
[pri]: /2007/xine-lib-1-1-7-rpm.html
|
26
source/_posts/2009/xine-lib-1-1-16-1-rpm.md
Normal file
26
source/_posts/2009/xine-lib-1-1-16-1-rpm.md
Normal file
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
layout: post
|
||||
title: xine-lib 1.1.16.1 RPM
|
||||
author: Daniel
|
||||
date: 2009-01-12 22:53:20
|
||||
categories:
|
||||
- [ Hosted 64-bit Software, xine RPMs ]
|
||||
tags:
|
||||
- rpm
|
||||
- xine-lib
|
||||
---
|
||||
|
||||
Below are the library and development RPMs for xine-lib version 1.1.16.1. Additionally, beginning with this release, there is also a documentation RPM available. These were built on Ubuntu Linux and converted to RPM using alien. Be sure to check out the [About the xine RPMs][abt] post for more information.
|
||||
|
||||
xine-lib - The main xine library
|
||||
xine-lib-dev - The development xine library (needed if you're building an interface against xine-lib)
|
||||
xine-lib-doc - Documentation
|
||||
|
||||
You'll also need a user interface - as of this release, the most current release of [xine-ui is 0.99.5][ui].
|
||||
|
||||
(To save disk space, only the current release and two [prior releases][pri] will be maintained.)
|
||||
|
||||
|
||||
[abt]: /2005/about-the-xine-rpms.html "About the xine RPMs • DJS Consulting Tech Blog"
|
||||
[ui]: /2007/xine-ui-0-99-5-rpm.html
|
||||
[pri]: /2008/xine-lib-1-1-14-rpm.html
|
26
source/_posts/2009/xine-lib-1-1-16-2-rpm.md
Normal file
26
source/_posts/2009/xine-lib-1-1-16-2-rpm.md
Normal file
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
layout: post
|
||||
title: xine-lib 1.1.16.2 RPM
|
||||
author: Daniel
|
||||
date: 2009-02-11 19:29:50
|
||||
categories:
|
||||
- [ Hosted 64-bit Software, xine RPMs ]
|
||||
tags:
|
||||
- rpm
|
||||
- xine-lib
|
||||
---
|
||||
|
||||
Below are the library and development RPMs for xine-lib version 1.1.16.2. These were built on Ubuntu Linux and converted to RPM using alien. Be sure to check out the [About the xine RPMs][abt] post for more information.
|
||||
|
||||
xine-lib - The main xine library
|
||||
xine-lib-dev - The development xine library (needed if you're building an interface against xine-lib)
|
||||
xine-lib-doc - Documentation
|
||||
|
||||
You'll also need a user interface - as of this release, the most current release of [xine-ui is 0.99.5][ui].
|
||||
|
||||
(To save disk space, only the current release and two [prior releases][pri] will be maintained.)
|
||||
|
||||
|
||||
[abt]: /2005/about-the-xine-rpms.html "About the xine RPMs • DJS Consulting Tech Blog"
|
||||
[ui]: /2007/xine-ui-0-99-5-rpm.html
|
||||
[pri]: /2009/xine-lib-1-1-16-1-rpm.html
|
26
source/_posts/2009/xine-lib-1-1-16-3-rpm.md
Normal file
26
source/_posts/2009/xine-lib-1-1-16-3-rpm.md
Normal file
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
layout: post
|
||||
title: xine-lib 1.1.16.3 RPM
|
||||
author: Daniel
|
||||
date: 2009-04-03 18:21:57
|
||||
categories:
|
||||
- [ Hosted 64-bit Software, xine RPMs ]
|
||||
tags:
|
||||
- rpm
|
||||
- xine-lib
|
||||
---
|
||||
|
||||
Below are the library and development RPMs for xine-lib version 1.1.16.3. These were built on Ubuntu Linux and converted to RPM using alien. Be sure to check out the [About the xine RPMs][abt] post for more information.
|
||||
|
||||
xine-lib - The main xine library
|
||||
xine-lib-dev - The development xine library (needed if you're building an interface against xine-lib)
|
||||
xine-lib-doc - Documentation
|
||||
|
||||
You'll also need a user interface - as of this release, the most current release of [xine-ui is 0.99.5][ui].
|
||||
|
||||
(To save disk space, only the current release and two [prior releases][pri] will be maintained.)
|
||||
|
||||
|
||||
[abt]: /2005/about-the-xine-rpms.html "About the xine RPMs • DJS Consulting Tech Blog"
|
||||
[ui]: /2007/xine-ui-0-99-5-rpm.html
|
||||
[pri]: /2009/xine-lib-1-1-16-2-rpm.html
|
40
source/_posts/2010/4040-web-service.md
Normal file
40
source/_posts/2010/4040-web-service.md
Normal file
|
@ -0,0 +1,40 @@
|
|||
---
|
||||
layout: post
|
||||
title: 40/40 Web Service
|
||||
author: Daniel
|
||||
date: 2010-09-19 19:55:34
|
||||
categories:
|
||||
- [ Programming, Web Services ]
|
||||
tags:
|
||||
- erlc
|
||||
- prayer
|
||||
- sbc
|
||||
- web service
|
||||
summary: A web service to support the 2010 40/40 Prayer Vigil
|
||||
---
|
||||
|
||||
The [Ethics and Religious Liberty Commission][erlc] of the [Southern Baptist Convention][sbc] is holding a "[40/40 Prayer Vigil][site]," encouraging prayer through the end of October. While some of the prayer is focused on the upcoming elections, the focus is on national revival. They have produced a prayer guide, which details suggestions for prayer over the course of 40 days, beginning September 20th, and for 40 hours, beginning October 29th at 4pm.
|
||||
|
||||
We have created a web service to break this guide up into day and hour-sized chunks. The service <del>is</del> _(UPDATE: was)_ at http://services.djs-consulting.com/FortyForty.asmx. There are several ways to retrieve this information.
|
||||
|
||||
* **GetDay**
|
||||
This gets one of the 40 days, by the day number. (September 20th is 1, September 21st is 2, etc.) The "day" parameter controls which day is returned.
|
||||
* **GetHour**
|
||||
This gets one of the 40 hours, by the hour number (10/29 4pm is 1, 10/29 5pm is 2, etc.) The "hour" parameter controls which hour is returned.
|
||||
* **GetDate**
|
||||
This gets one of the 40 days, by the current date. The "date" parameter controls which day is returned. (The time portion may be given, but it is ignored.)
|
||||
* **GetTime**
|
||||
This gets one of the 40 hours, by the date/time. The "time" parameter controls which hour is returned.
|
||||
* **GetDayHTML**, **GetHourHTML**, **GetDateHTML**, and **GetTimeHTML**
|
||||
This is the same as the above 4 calls, except what is returned is a formatted block of text that can be displayed on a web page.
|
||||
|
||||
In all cases, if the day/hour/date/time does not match a valid value for the vigil, a null is returned.
|
||||
|
||||
If you're not interested in consuming the web service, but you'd like to see the suggested prayer each day, the Hoffmantown Prayer site is displaying the days and hours on Mountain Time. This information is on the front page with no login required.
|
||||
|
||||
This web service will be discontinued at some point after December 31, 2010.
|
||||
|
||||
|
||||
[erlc]: //erlc.com "The Ethics and Religious Liberty Commission of the Southern Baptist Convention"
|
||||
[sbc]: //www.sbc.net "Southern Baptist Convention"
|
||||
[site]: //www.4040prayer.com "40/40 Prayer Vigil"
|
137
source/_posts/2010/mono-fastcgi-startup-script.md
Normal file
137
source/_posts/2010/mono-fastcgi-startup-script.md
Normal file
|
@ -0,0 +1,137 @@
|
|||
---
|
||||
layout: post
|
||||
title: Mono / FastCGI Startup Script
|
||||
author: Daniel
|
||||
date: 2010-09-03 19:28:15
|
||||
categories:
|
||||
- Linux
|
||||
- [ Programming, .NET, Mono ]
|
||||
- Web Servers
|
||||
tags:
|
||||
- badgerports
|
||||
- config
|
||||
- fastcgi
|
||||
- mono
|
||||
- script
|
||||
summary: A script that allows Mono web applications to be defined and started the way Apache and nginx enable and disable their sites
|
||||
---
|
||||
|
||||
We've begun running Mono on some DJS Consulting servers to enable us to support the .NET environment, in addition to the PHP environment most of our other applications use. While Ubuntu has nice packages (and [Badgerports][] even brings them up to the latest release), one thing that we were missing was a "conf.d"-type of configuration; my "/applications=" clause of the command was getting really, really long. We decided to see if we could create something similar to Apache / Nginx's sites-available/sites-enabled paradigm, and we have succeeded!
|
||||
|
||||
To begin, you'll need to create the directories `/etc/mono/fcgi/apps-available` and `/etc/mono/fcgi/apps-enabled`. These directories will hold files that will be used define applications. The intent of these directories is to put the actual files in `apps-available`, then symlink the ones that are enabled from `apps-enabled`. These files have no name restrictions, but do not put an extra newline character in them. The script will concatenate the contents of that file to create the [MONO_FCGI_APPLICATIONS environment variable][env], which tells the server what applications exist. (The syntax is the same as that for the "/applications=" clause - `[domain]:[URL path]:[filesystem path]`.) Here's how the site you're reading now is configured (from the file `djs-consulting.com.techblog.conf`)...
|
||||
|
||||
{% codeblock djs-consulting.com.techblog.conf lang:shell %}
|
||||
techblog.djs-consulting.com:/:/path/to/install/base/for/this/site
|
||||
{% endcodeblock %}
|
||||
|
||||
Finally, what brings it all together is a shell script. This should be named "monoserve" and placed in `/etc/init.d`. (This borrows heavily from [this script][scr], which we used until we wrote this one.) Note the group of variables surrounded by the "make changes here" notes - these are the values that are used in starting the server. They are at the top so that you can easily modify this for your own needs.
|
||||
|
||||
{% codeblock monoserve lang:shell %}
|
||||
#/bin/bash
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: monoserve.sh
|
||||
# Required-Start: $local_fs $syslog $remote_fs
|
||||
# Required-Stop: $local_fs $syslog $remote_fs
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Start FastCGI Mono server with hosts
|
||||
### END INIT INFO
|
||||
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||
DAEMON=/usr/bin/mono
|
||||
NAME=monoserver
|
||||
DESC=monoserver
|
||||
|
||||
## Begin -- MAKE CHANGES HERE --
|
||||
PROGRAM=fastcgi-mono-server2 # The program which will be started
|
||||
ADDRESS=127.0.0.1 # The address on which the server will listen
|
||||
PORT=9001 # The port on which the server will listen
|
||||
USER=www-data # The user under which the process will run
|
||||
GROUP=$USER # The group under which the process will run
|
||||
## End -- MAKE CHANGES HERE --
|
||||
|
||||
# Determine the environment
|
||||
MONOSERVER=$(which $PROGRAM)
|
||||
MONOSERVER_PID=""
|
||||
FCGI_CONFIG_DIR=/etc/mono/fcgi/apps-enabled
|
||||
|
||||
# Start up the Mono server
|
||||
start_up() {
|
||||
get_pid
|
||||
if [ -z "$MONOSERVER_PID" ]; then
|
||||
echo "Configured Applications"
|
||||
echo "-----------------------"
|
||||
# Construct the application list if the configuration directory exists
|
||||
if [ -d $FCGI_CONFIG_DIR ]; then
|
||||
MONO_FCGI_APPLICATIONS=""
|
||||
for file in $( ls $FCGI_CONFIG_DIR ); do
|
||||
if [ "$MONO_FCGI_APPLICATIONS" != "" ]; then
|
||||
MONO_FCGI_APPLICATIONS=$MONO_FCGI_APPLICATIONS,
|
||||
fi
|
||||
MONO_FCGI_APPLICATIONS=$MONO_FCGI_APPLICATIONS`cat $FCGI_CONFIG_DIR/$file`
|
||||
done
|
||||
export MONO_FCGI_APPLICATIONS
|
||||
echo -e ${MONO_FCGI_APPLICATIONS//,/"\n"}
|
||||
else
|
||||
echo "None (config directory $FCGI_CONFIG_DIR not found)"
|
||||
fi
|
||||
echo
|
||||
|
||||
# Start the server
|
||||
start-stop-daemon -S -c $USER:$GROUP -x $MONOSERVER -- /socket=tcp:$ADDRESS:$PORT &
|
||||
echo "Mono FastCGI Server $PROGRAM started as $USER on $ADDRESS:$PORT"
|
||||
else
|
||||
echo "Mono FastCGI Server is already running - PID $MONOSERVER_PID"
|
||||
fi
|
||||
}
|
||||
|
||||
# Shut down the Mono server
|
||||
shut_down() {
|
||||
get_pid
|
||||
if [ -n "$MONOSERVER_PID" ]; then
|
||||
kill $MONOSERVER_PID
|
||||
echo "Mono FastCGI Server stopped"
|
||||
else
|
||||
echo "Mono FastCGI Server is not running"
|
||||
fi
|
||||
}
|
||||
|
||||
# Refresh the PID
|
||||
get_pid() {
|
||||
MONOSERVER_PID=$(ps auxf | grep $PROGRAM.exe | grep -v grep | awk '{print $2}')
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start_up
|
||||
;;
|
||||
stop)
|
||||
shut_down
|
||||
;;
|
||||
restart|force-reload)
|
||||
shut_down
|
||||
start_up
|
||||
;;
|
||||
status)
|
||||
get_pid
|
||||
if [ -z "$MONOSERVER_PID" ]; then
|
||||
echo "Mono FastCGI Server is not running"
|
||||
else
|
||||
echo "Mono FastCGI Server is running - PID $MONOSERVER_PID"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Usage: monoserve (start|stop|restart|force-reload|status)"
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
{% endcodeblock %}
|
||||
|
||||
This needs to be owned by root and be executable (`chmod +x monoserve`). You can use `update-rc.d monoserve defaults` to set this to start at boot.
|
||||
|
||||
|
||||
[Badgerports]: //badgerports.org "Badgerports"
|
||||
[env]: //www.mono-project.com/FastCGI "FastCGI • Mono Project"
|
||||
[scr]: //tomi.developmententity.sk/Blog/Post/2 "Linux startup script for mono FastCGI server • Keep Coding"
|
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
layout: post
|
||||
title: Oracle SQL Developer 2.1 Debian Package
|
||||
author: Daniel
|
||||
date: 2010-03-02 12:11:26
|
||||
categories:
|
||||
- [ Databases, Oracle ]
|
||||
tags:
|
||||
- deb
|
||||
- oracle
|
||||
- sql developer
|
||||
summary: A newer version of SQL Developer is available
|
||||
---
|
||||
|
||||
It had been a while since I had updated SQL Developer. It turns out that version 2.1 was released March 1st of this year. I've downloaded it and created a Debian package. It can be [downloaded][deb] from the [DJS Consulting Linux Software Repository][repo].
|
||||
|
||||
I've used it with Sun's Java 6 Update 18; I have not tested it with OpenJDK. If you have problems getting it to work, you may want to check the [previous post][post] on this topic.
|
||||
|
||||
|
||||
[deb]: //hosted.djs-consulting.com/software/sqldeveloper/sqldeveloper_2.1.1.64.39-2_all.deb "Download SQL Developer 2.1 Debian Package"
|
||||
[repo]: //hosted.djs-consulting.com/software "DJS Consulting Linux Software Repository"
|
||||
[post]: /2008/oracle-sql-developer-debian-package.html "Oracle SQL Developer Debian Package • DJS Consulting Tech Blog"
|
33
source/_posts/2010/tech-blog-2-0.md
Normal file
33
source/_posts/2010/tech-blog-2-0.md
Normal file
|
@ -0,0 +1,33 @@
|
|||
---
|
||||
layout: post
|
||||
title: Tech Blog 2.0
|
||||
author: Daniel
|
||||
date: 2010-08-05 19:09:54
|
||||
categories:
|
||||
- General Info
|
||||
- [ Programming, .NET, C# ]
|
||||
tags:
|
||||
- .net
|
||||
- blogengine
|
||||
- fastcgi
|
||||
- mono
|
||||
- php
|
||||
- wordpress
|
||||
---
|
||||
|
||||
After three years on [WordPress][], the DJS Consulting Tech Blog has moved to [BlogEngine.NET][]. There are several reasons for this change, some technical and some not.
|
||||
|
||||
* PHP's Fast CGI processor has a problem where, if all of the processes are busy, the server will simply time out. While this hasn't afflicted my server as much as others, it has caused problems; when this problem occurred, none of the PHP sites were accessible.
|
||||
* Through experience with a very heavily-used site, I became less enamored of WordPress's "read from the database every time" way of doing business. I also found that various caching plug-ins for WordPress, on this particular site, did very little to ease the load.
|
||||
* Since I first looked at Mono (Linux's implementation of the .NET framework), it has matured significantly. It supports most of C# 4.0 already, which was released earlier this year.
|
||||
* BlogEngine.NET is a rapidly-maturing blog platform, and the project has a stated goal of 100% compatibility with Mono. This is good, because you can mention Mono problems to the team, and you're not dismissed because you're running Linux.
|
||||
|
||||
As part of the move, the URL has changed; the new link is <https://techblog.djs-consulting.com>. I have implemented redirection for each post, the category and category feed links, and the main blog feed and home page from the old URL, so you may not have even realized that you're looking at the new site. The DJS Consulting Software Repository remains at <https://hosted.djs-consulting.com/software>.
|
||||
|
||||
I'm looking forward to this new setup!
|
||||
|
||||
_(NOTE: The next-to-last paragraph was updated with correct links as of February 2017.)_
|
||||
|
||||
|
||||
[WordPress]: //wordpress.org "WordPress"
|
||||
[BlogEngine.NET]: //dotnetblogengine.net "BlogEngine.NET"
|
26
source/_posts/2010/xine-lib-1-1-19-rpm.md
Normal file
26
source/_posts/2010/xine-lib-1-1-19-rpm.md
Normal file
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
layout: post
|
||||
title: xine-lib 1.1.19 RPM
|
||||
author: Daniel
|
||||
date: 2010-08-05 21:00:48
|
||||
categories:
|
||||
- [ Hosted 64-bit Software, xine RPMs ]
|
||||
tags:
|
||||
- rpm
|
||||
- xine-lib
|
||||
---
|
||||
|
||||
Below are the library and development RPMs for xine-lib version 1.1.19. These were built on Ubuntu Linux and converted to RPM using alien. Be sure to check out the [About the xine RPMs][abt] post for more information.
|
||||
|
||||
xine-lib - The main xine library
|
||||
xine-lib-dev - The development xine library (needed if you're building an interface against xine-lib)
|
||||
xine-lib-doc - Documentation
|
||||
|
||||
You'll also need a user interface - as of this release, the most current release of [xine-ui is 0.99.6][ui].
|
||||
|
||||
(To save disk space, only the current release and two [prior releases][pri] will be maintained.)
|
||||
|
||||
|
||||
[abt]: /2005/about-the-xine-rpms.html "About the xine RPMs • DJS Consulting Tech Blog"
|
||||
[ui]: /2010/xine-ui-0-99-6-rpm.html
|
||||
[pri]: /2009/xine-lib-1-1-16-3-rpm.html
|
24
source/_posts/2010/xine-ui-0-99-6-rpm.md
Normal file
24
source/_posts/2010/xine-ui-0-99-6-rpm.md
Normal file
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
layout: post
|
||||
title: xine-ui 0.99.6 RPM
|
||||
author: Daniel
|
||||
date: 2010-08-06 17:28:09
|
||||
categories:
|
||||
- [ Hosted 64-bit Software, xine RPMs ]
|
||||
tags:
|
||||
- rpm
|
||||
- xine-ui
|
||||
---
|
||||
|
||||
Below is the RPM for xine-ui version 0.99.6. See the [About the xine RPMs][abt] post for information on how this RPM was built.
|
||||
|
||||
xine-ui - The user interface
|
||||
|
||||
To use this, you'll also need xine-lib - as of this release, the most recent release of [xine-lib is 1.1.19][lib].
|
||||
|
||||
(To save disk space, only the current release and two [prior releases][pri] will be maintained.)
|
||||
|
||||
|
||||
[abt]: /2005/about-the-xine-rpms.html "About the xine RPMs • DJS Consulting Tech Blog"
|
||||
[lib]: /2010/xine-lib-1-1-19-rpm.html
|
||||
[pri]: /2007/xine-ui-0-99-5-rpm.html
|
44
source/_posts/2011/database-abstraction-v0-8.md
Normal file
44
source/_posts/2011/database-abstraction-v0-8.md
Normal file
|
@ -0,0 +1,44 @@
|
|||
---
|
||||
layout: post
|
||||
title: Database Abstraction v0.8
|
||||
author: Daniel
|
||||
date: 2011-10-22 21:00:48
|
||||
categories:
|
||||
- [ Databases, MySQL ]
|
||||
- [ Databases, PostgreSQL ]
|
||||
- [ Databases, SQL Server ]
|
||||
- [ Databases, SQLite ]
|
||||
- [ Programming, .NET, C# ]
|
||||
- [ Projects, Database Abstraction ]
|
||||
tags:
|
||||
- abstraction
|
||||
- ado.net
|
||||
- c#
|
||||
- linq
|
||||
- linq to sql
|
||||
- nhibernate
|
||||
summary: An open-source project to allow queries to be defined in code and not tied to a specific database implementation
|
||||
---
|
||||
|
||||
When we began developing C# web applications, we found ourselves in the position of determining what the best way of accessing the database is. We evaluated several technologies...
|
||||
|
||||
* **NHibernate** - May be very good, but it was overkill for what we were trying to do.
|
||||
* **LINQ to SQL** - This brings C#'s LINQ (Language-Integrated Query) to SQL databases. You create database-aware classes and use LINQ to select from collections, which LINQ to SQL converts to database access. This is a good abstraction, but it relies on SQL Server; as we typically deploy to PostgreSQL, this didn't work. (We also couldn't get DBLinq, a database-agnostic implementation, to work.)
|
||||
* **ADO.NET** - This is the tried-and-true database access methodology, released as part of the initial release of the .NET framework. The downside to this is that it encourages SQL in the code at the point of data retrieval; it does not provide a clean separation of data access from data processing.
|
||||
* **EF Code First** - This didn't exist; it's also very SQL Server-centric. Not faulting Microsoft for that, especially since they release a free version now; but, as we deploy on Linux, until they release a Linux version, SQL Server is not an option.
|
||||
|
||||
With our PHP applications, we had written a database service that read queries from XML files. Then, queries were accessed by name, with parameters passed via arrays. The one thing that ADO.NET has that was useful was the fact that it is based on interfaces. This means that if we wrote something that exposed, manipulated, and depended on `IDataConnection` (instead of `SqlConnection`, the SQL Server implementation of that interface), we could support any implementation of database. The `SqlDataReader` implements `IDataReader` as well. Our solution was becoming apparent.
|
||||
|
||||
Over time, we developed what is now the [Database Abstraction][proj] project hosted on <del>CodePlex</del> _(UPDATE: migrated project to [GitHub][])_. On Thursday, we released the first public release (although the DLLs are in the repository, and are usually current at every commit). If you are looking for a way to separate your data access from the rest of your code, or want a solution that's database-agnostic, check it out. It supports SQL Server, MySQL, PostgreSQL, SQLite, and ODBC connections *, using the data provider name to derive the proper connection to implement. There is also a Mock implementation to support unit tests; this mock can provide data, providing a useful way to test methods. Finally, there is a membership and role provider based on Database Abstraction; simply configure the connection string, create the database tables, and away you go! **
|
||||
|
||||
A pre-released version is already in production use in our [PrayerTracker][] application, and others are being built around it. If this sounds like something that could help your project, certainly feel free to [check it out][rel]!
|
||||
|
||||
<small>_\* Oracle is omitted from this list, as their DLL had redistribution restrictions; this meant that the source code repository, upon check-out, would have build errors. There may be an Oracle implementation in the future (it would be trivial), but there is not one now._
|
||||
|
||||
<small>_\** The membership and role providers are untested; they will be tested and tweaked by version 0.9._</small>
|
||||
|
||||
|
||||
[proj]: //dbabstraction.codeplex.com "Database Abstraction • CodePlex"
|
||||
[PrayerTracker]: //prayer.djs-consulting.com "PrayerTracker"
|
||||
[rel]: //dbabstraction.codeplex.com/releases/view/75241 "Database Abstaction v0.8 • Database Abstraction"
|
||||
[GitHub]: //github.com/danieljsummers/DatabaseAbstraction
|
|
@ -0,0 +1,34 @@
|
|||
---
|
||||
layout: post
|
||||
title: "HCSB Verse of the Day (Plus) 3.0.1 - WordPress Plug-In"
|
||||
author: Daniel
|
||||
date: 2011-09-03 22:30:09
|
||||
categories:
|
||||
- [ Programming, PHP, WordPress ]
|
||||
tags:
|
||||
- esv
|
||||
- hcsb
|
||||
- kjv
|
||||
- niv
|
||||
- nkjv
|
||||
- plug-in
|
||||
- update
|
||||
- widget
|
||||
- wordpress
|
||||
summary: New features available in this plug-in
|
||||
---
|
||||
|
||||
After a nearly four-year run at version 2, the HCSB Verse of the Day plug-in has been updated to version 3. The latest version available is 3.0.1, which contains a quick fix that was found just after I had released version 3. When you see that ".0.1," just think, "Oh, this was written by a human!"
|
||||
|
||||
Major changes in this version include:
|
||||
|
||||
* The addition of "(Plus)" to the name, as this version supports five different translations - in addition to the Holman Christian Standard Bible (HCSB), it now supports the English Standard Version (ESV), the New King James Version (NKJV), the New International Version (NIV), and the King James Version (KJV).
|
||||
* A new settings page, where you can select the version.
|
||||
* A widget, that will drop right in any widget zone.
|
||||
* The replacement of several function calls that have been deprecated in the WordPress API over the past 3 years and 8 months.
|
||||
* Formal dropping of support for PHP 4, following WordPress's lead in 3.2.
|
||||
|
||||
While a lot of the code is different, if you only used the template tags, you should notice nothing different with this release. You can [download HCSB Verse of the Day (Plus) 3.0.1][pi] at the WordPress Plug-In Directory, or upgrade on the WordPress Plug-In Administration Page in your blog.
|
||||
|
||||
|
||||
[pi]: //wordpress.org/extend/plugins/hcsb-verse-of-the-day/ "HCSB Verse of the Day (Plus) • WordPress Plug-In Directory"
|
27
source/_posts/2011/spring-clean-your-windows-machine.md
Normal file
27
source/_posts/2011/spring-clean-your-windows-machine.md
Normal file
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
layout: post
|
||||
title: Spring Clean Your Windows Machine
|
||||
author: Daniel
|
||||
date: 2011-05-07 15:48:26
|
||||
categories:
|
||||
- Security and Privacy
|
||||
tags:
|
||||
- compcln
|
||||
- security
|
||||
- spring
|
||||
- vista
|
||||
- windows
|
||||
- winsxs
|
||||
summary: Reclaim significant space on your Windows drive by deleting old versions of system libraries
|
||||
---
|
||||
|
||||
Spring has sprung, the grass has riz; do you know where your HD space is? If you're running Windows Vista or Windows 7, you may have some unclaimed disk space waiting for you. (Disclaimer: I am not telling you to do anything to your computer, and I maintain no liability for the effects of the commands you enter. I'm sharing what worked for me.)
|
||||
|
||||
Windows Vista was a rewrite of Windows; as part of this, they developed Windows Side by Side (WinSxS) to deal with the conflicting/removed DLL issue that plagued Windows in the past. SxS maintains components, and programs continue to use their components unless they specifically ask to use a new one. This keeps upgrades from breaking older programs, and makes all upgrades reversible. With Vista currently at SP2, you probably have lots of versions of several of these components, and if you have a smaller drive, they can be pinching your disk space. If you're content with the way your computer is running, SP2 includes a utility called COMPCLN.EXE which will make these upgrades permanent by removing unused components. WinSxS knows which components are referenced by current software, so you can run this without worrying that you'll break an older program.
|
||||
|
||||
To run it, click the Windows icon on the bottom left of the task bar, type "cmd", then press Enter. When the command prompt window opens, type "compcln" and press Enter. It will give you a y/n prompt, then clean the old components off your computer. Windows also makes restore points, which is a saved group of files and settings that exist before installing updates. If you're cleaning the components, you can also delete these as well. To run this, open the control panel and search for "disk cleanup". Choose your C: drive, then click the "More Files" tab. The restore point button is in the middle of that page.
|
||||
|
||||
Finally, Microsoft has released [Microsoft Security Essentials][mse], an anti-virus/anti-malware program for Windows XP through 7. If you're tired of "buy the real version" nags or renewing subscriptions, this is the tool for you. It's a tool that many feel should have been included in Windows for a long time (though the reasons why it hasn't been are outside the scope of this how-to), it works well, and it's free.
|
||||
|
||||
|
||||
[mse]: //www.microsoft.com/security/pc-security/mse.aspx "Microsoft Security Essentials"
|
46
source/_posts/2011/tech-blog-3-0.md
Normal file
46
source/_posts/2011/tech-blog-3-0.md
Normal file
|
@ -0,0 +1,46 @@
|
|||
---
|
||||
layout: post
|
||||
title: 'Tech Blog 3.0 (aka "You win, PHP...")'
|
||||
author: Daniel
|
||||
date: 2011-08-24 22:12:44
|
||||
categories:
|
||||
- General Info
|
||||
- [ Programming, .NET, Mono ]
|
||||
- [ Programming, PHP ]
|
||||
- [ Web Servers, Apache ]
|
||||
tags:
|
||||
- apache
|
||||
- blog
|
||||
- blogengine
|
||||
- mpm
|
||||
- php
|
||||
- pre-fork
|
||||
- theme
|
||||
- thread
|
||||
- wordpress
|
||||
- worker
|
||||
summary: This site has returned to WordPress
|
||||
---
|
||||
|
||||
After a little over a year running on [Tech Blog 2.0][], you are now viewing version 3.0. For this version, we've returned to [WordPress][] from [BlogEngine][]. There are several issues that colluded to drive this change, most of which surrounded PHP and its crazy behavior. (Geeky details follow - skip to the paragraph starting with "Bottom line:" if you don't want the geek stuff. I bolded it so it would be easy to spot.)
|
||||
|
||||
PHP's recommended configuration is to run under Apache using the pre-fork multi-processing module (MPM). The advantage to this is that Apache does not have to spin off another process to handle each request; it handles it in the same thread. However, this means that each instance of the server must have all enabled modules loaded. This means that each instance of the server (AKA "thread") is very large, so the number of threads run is lower (typically 5-15 in a server the size we're on). Also, this means that each thread can only handle one request at a time; if you have 7 threads configured, each serving one of 7 requests, and an 8th request comes it, it has to wait for one to finish. If the requests are served quickly, this may not be a problem; however, the avalanche of request that follow the typical front-page mention on mega-blogs can easily overwhelm it.
|
||||
|
||||
To fix this problem, there is another MPM, this one called worker. In this scenario, there are spare thread waiting to fill requests, and these can spawn other threads to do further work if required. So, the Apache threads would realize that a request needs to be handled by PHP, and pass it off to that process to be completed. The Apache memory footprint is much smaller; it serves the images, scripts, and other static files, and passes off the requests that require heavy lifting. PHP, then, has a (FastCGI) process where it receives these requests, processes them, and returns the response to the caller. Because each of these threads only has to load the PHP requirements, they are smaller too, so you can have more threads processing at the same time; you just might survive that front-page mention! (This is the same technique applied by LightTPD and Nginx, two other servers I tried at various times.)
|
||||
|
||||
It is in this scenario where PHP fails to live up to its expectations. These PHP processes would simply stop responding, but the controller thinks they're still there. The end result to the user is a site that just sits and waits for output that will never come. Eventually, they may receive a Gateway Timeout or Bad Gateway error. The problem is worse on slower sites, but even popular sites seemed to fall victim to this from time to time. This was also a problem whether PHP controlled its threads, or Apache controlled them.
|
||||
|
||||
The one thing that really perturbs me is instability. If something is broken, I can fix it; if it works, I can fix it 'til it's broke. :) But something that works sometimes, and other times doesn't, simply won't fly. I was able to introduce some stability by restarting the server 4 times a day, but that's a band-aid, not a long term solution. I was tired of fighting.
|
||||
|
||||
**Bottom line**: the configuration required for a stable server is in opposition to a lean-and-mean configuration. So, I installed the required Apache modules, and will continue to run my PHP-serving server at a configuration twice as large as it needs to be. I'll eventually move the Mono (.NET) processes to another machine, where the fast configuration won't cause stability problems.
|
||||
|
||||
But, PHP isn't all. While I would still heartily recommend BlogEngine.NET to someone who was going to serve the blog from a Windows machine, but I had some issues getting upgrades to go smoothly under Mono. It also is optimized for fast serving, at the expense of RAM. At this point, that's not the tradeoff we need.
|
||||
|
||||
Finally, with this update, the blog has received its first new theme. It's a clean, clear theme that should serve the content well. Plus, the social media icons up in the corner are just too cool, IMO. I've also applied tags to all posts except the "My Linux Adventure" series, and this theme displays them. (Comments are not here now, but will be migrated shortly.)
|
||||
|
||||
So, there you have it. Enjoy!
|
||||
|
||||
|
||||
[Tech Blog 2.0]: /2010/tech-blog-2-0.html "Tech Blog 2.0 • DJS Consulting Tech Blog"
|
||||
[WordPress]: //wordpress.org "WordPress"
|
||||
[BlogEngine]: //dotnetblogengine.net "BlogEngine.NET"
|
29
source/_posts/2011/xine-lib-1-1-20-rpm.md
Normal file
29
source/_posts/2011/xine-lib-1-1-20-rpm.md
Normal file
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
layout: post
|
||||
title: xine-lib 1.1.20 RPM
|
||||
author: Daniel
|
||||
date: 2011-11-13 20:20:16
|
||||
categories:
|
||||
- [ Hosted 64-bit Software, xine RPMs ]
|
||||
tags:
|
||||
- rpm
|
||||
- xine-lib
|
||||
---
|
||||
|
||||
Below are the library and development RPMs for xine-lib version 1.1.20. These were built on Ubuntu Linux and converted to RPM using alien. Be sure to check out the [About the xine RPMs][abt] post for more information.
|
||||
|
||||
[xine-lib][] - The main xine library
|
||||
[xine-lib-dev][] - The development xine library (needed if you're building an interface against xine-lib)
|
||||
[xine-lib-doc][] - Documentation
|
||||
|
||||
You'll also need a user interface - as of this release, the most current release of [xine-ui is 0.99.6][ui].
|
||||
|
||||
(To save disk space, only the current release and two [prior releases][pri] will be maintained.)
|
||||
|
||||
|
||||
[abt]: /2005/about-the-xine-rpms.html "About the xine RPMs • DJS Consulting Tech Blog"
|
||||
[xine-lib]: //hosted.djs-consulting.com/software/xine/xine-lib/libxine1-1.1.20-2.x86_64.rpm
|
||||
[xine-lib-dev]: //hosted.djs-consulting.com/software/xine/xine-lib/libxine-dev-1.1.20-2.x86_64.rpm
|
||||
[xine-lib-doc]: //hosted.djs-consulting.com/software/xine/xine-lib/libxine1-doc-1.1.20-2.noarch.rpm
|
||||
[ui]: /2010/xine-ui-0-99-6-rpm.html
|
||||
[pri]: /2010/xine-lib-1-1-19-rpm.html
|
23
source/_posts/2011/your-mothers-maiden-name-is-useless.md
Normal file
23
source/_posts/2011/your-mothers-maiden-name-is-useless.md
Normal file
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
layout: post
|
||||
title: Your Mother's Maiden Name Is Useless
|
||||
author: Daniel
|
||||
date: 2011-10-04 18:10:36
|
||||
categories:
|
||||
- Security and Privacy
|
||||
tags:
|
||||
- answer
|
||||
- facebook
|
||||
- maiden
|
||||
- question
|
||||
- security
|
||||
summary: With the advent of social media, be smart about your security questions and answers
|
||||
---
|
||||
|
||||
...well, at least as a security question.
|
||||
|
||||
This is not a new thing, and is the reason that most places allow you to define security questions other than that. With the prevalence of information available online, it really is not much of a stretch for a would-be attacker to determine; if you are connected to your mother via a social network like Facebook, where having a public maiden name is encouraged to help you be found, it becomes trivial.
|
||||
|
||||
If you still have "mother's maiden name" as a security question somewhere, there's no need to panic. There are two simple options. You can see if there is another question you can use in its place, and just use that one. If you can't (or don't want to) do that, <del>lie</del> make something up; there is no requirement that the answer is accurate, only that you can match the answer when challenged. What you should **not** do is demand that your mother remove that information from her profile. This is unnecessary, as the information has already been released; plus, "security through obscurity" is of limited benefit.
|
||||
|
||||
Just a quick tip to help keep you secure online...
|
38
source/_posts/2012/4040-web-service-for-2012.md
Normal file
38
source/_posts/2012/4040-web-service-for-2012.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
---
|
||||
layout: post
|
||||
title: 40/40 Web Service for 2012
|
||||
author: Daniel
|
||||
date: 2012-06-17 22:21:01
|
||||
categories:
|
||||
- [ Programming, Web Services ]
|
||||
tags:
|
||||
- '4040'
|
||||
- api
|
||||
- hoffmantown
|
||||
- english
|
||||
- español
|
||||
- html
|
||||
- json
|
||||
- prayer
|
||||
- prayertracker
|
||||
- rest
|
||||
- soap
|
||||
- web service
|
||||
- wsdl
|
||||
- xml
|
||||
summary: The 40/40 Prayer Vigil has been updated for 2012, as a REST API supporting both English and Spanish
|
||||
---
|
||||
|
||||
Back in 2010, we wrote a [web service][post] for the [40/40 Prayer Vigil][4040] organized by the [Ethics and Religious Liberty Commission][erlc] of the Southern Baptist Convention. This allowed us to use the content in multiple places. They are doing another vigil this year, but the service we wrote two years ago was not terribly reusable.
|
||||
|
||||
This year, we have developed a reusable web service that should hold up for 2014 and beyond. _(Acronym alert - non-programmers skip the next sentence.)_ This one has a <acronym title="Representational State Translation">REST</acronym> <acronym title="Application Programming Interface">API</acronym> instead of <acronym title="Simple Object Access Protocol">SOAP</acronym> and <acronym title="Web Services Definition Language">WSDL</acronym>, and supports <acronym title="Extensible Markup Language">XML</acronym>, <acronym title="JavaScript Object Notation">JSON</acronym>, and <acronym title="HyperText Markup Language">HTML</acronym> output formats. This year, it also supports both English and Español.
|
||||
|
||||
The REST API start page <del>is</del> _(UPDATE: was)_ at http://services.djs-consulting.com/FortyForty. The prayer guides require an output format, a language, the Scripture version, whether the guide is for a day or an hour, and the day or hour number. There are lookup transactions for lists of available output formats, languages, and Scripture versions, and lookups for converting a date to a day number and a date/time to an hour number.
|
||||
|
||||
There will be a WordPress plug-in shortly that will utilize this to display the current day or hour's prayer guide directly on your blog; we'll make another post when that is available. Also, starting September 26th (the first day of the vigil), it will be available for display with no login required at the Hoffmantown Prayer and [PrayerTracker][pt] websites. Developers, the service is available now; if you want to write code to utilize the service, you've got 3 months to make it work!
|
||||
|
||||
|
||||
[post]: /2010/4040-web-service.html "40/40 Web Service • DJS Consulting Tech Blog"
|
||||
[4040]: //erlc.com/4040 "40/40 Prayer Vigil • ERLC"
|
||||
[erlc]: //erlc.com "Ethics and Religious Liberty Commission"
|
||||
[pt]: //prayer.djs-consulting.com "PrayerTracker"
|
20
source/_posts/2012/4040-wordpress-plugin.md
Normal file
20
source/_posts/2012/4040-wordpress-plugin.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
layout: post
|
||||
title: 40/40 WordPress Plugin
|
||||
author: Daniel
|
||||
date: 2012-07-01 14:27:45
|
||||
categories:
|
||||
- [ Programming, PHP, WordPress ]
|
||||
- [ Programming, Web Services ]
|
||||
summary: A WordPress plugin is now available to display the suggested prayers for the 40/40 Prayer Vigil
|
||||
---
|
||||
|
||||
The WordPress plugin for the 40/40 Prayer Vigil has just been published! You can download it from your plugin menu, or by visiting [its home on the WordPress Plugin Directory][pi].
|
||||
|
||||
The plugin provides a widget that utilizes [the web service about which we previously wrote][post] to display the prayer guide for each day. You can configure whether you want it to display 40 days or 40 hours; what language to retrieve; the translation version for the Scripture links displayed with each day's guide; and the number of overlap days (it will display a "Coming Soon" entry before and a "Thanks for Praying" entry after). Use is pretty simple; just drop it into a widgetized area of your theme. It will probably look best with at least 200 horizontal pixels, although it will wrap to any sort of narrowness.
|
||||
|
||||
Version 2012.0 is the version that's up there now. The Spanish translations of the options menu is not done yet, but you can specify Spanish prayer guides. Version 2012.1 will contain the localized options menu. If you run into any problems using it, you can submit issues against it at its WordPress Plugin Directory page.
|
||||
|
||||
|
||||
[pi]: //wordpress.org/extend/plugins/4040-prayer-vigil/ "40/40 Prayer Vigil • WordPress Plugin Directory"
|
||||
[post]: /2012/4040-web-service-for-2012.html "40/40 Web Service for 2012 • DJS Consulting Tech Blog"
|
29
source/_posts/2012/xine-lib-1-1-20-1-rpm.md
Normal file
29
source/_posts/2012/xine-lib-1-1-20-1-rpm.md
Normal file
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
layout: post
|
||||
title: xine-lib 1.1.20.1 RPM
|
||||
author: Daniel
|
||||
date: 2012-01-02 11:41:10
|
||||
categories:
|
||||
- [ Hosted 64-bit Software, xine RPMs ]
|
||||
tags:
|
||||
- rpm
|
||||
- xine-lib
|
||||
---
|
||||
|
||||
Below are the library and development RPMs for xine-lib version 1.1.20.1. These were built on Ubuntu Linux and converted to RPM using alien. Be sure to check out the [About the xine RPMs][abt] post for more information.
|
||||
|
||||
[xine-lib][] - The main xine library
|
||||
[xine-lib-dev][] - The development xine library (needed if you’re building an interface against xine-lib)
|
||||
[xine-lib-doc][] - Documentation
|
||||
|
||||
You'll also need a user interface - as of this release, the most current release of [xine-ui is 0.99.6][ui].
|
||||
|
||||
(To save disk space, only the current release and two [prior releases][pri] will be maintained.)
|
||||
|
||||
|
||||
[abt]: /2005/about-the-xine-rpms.html "About the xine RPMs • DJS Consulting Tech Blog"
|
||||
[xine-lib]: //hosted.djs-consulting.com/software/xine/xine-lib/libxine1-1.1.20.1-2.x86_64.rpm
|
||||
[xine-lib-dev]: //hosted.djs-consulting.com/software/xine/xine-lib/libxine-dev-1.1.20.1-2.x86_64.rpm
|
||||
[xine-lib-doc]: //hosted.djs-consulting.com/software/xine/xine-lib/libxine1-doc-1.1.20.1-2.noarch.rpm
|
||||
[ui]: /2010/xine-ui-0-99-6-rpm.html
|
||||
[pri]: /2011/xine-lib-1-1-20-rpm.html
|
29
source/_posts/2012/xine-lib-1-1-21-rpm.md
Normal file
29
source/_posts/2012/xine-lib-1-1-21-rpm.md
Normal file
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
layout: post
|
||||
title: xine-lib 1.1.21 RPM
|
||||
author: Daniel
|
||||
date: 2012-06-10 16:52:27
|
||||
categories:
|
||||
- [ Hosted 64-bit Software, xine RPMs ]
|
||||
tags:
|
||||
- rpm
|
||||
- xine-lib
|
||||
---
|
||||
|
||||
Below are the library and development RPMs for xine-lib version 1.1.21. These were built on Ubuntu Linux and converted to RPM using alien. Be sure to check out the [About the xine RPMs][abt] post for more information.
|
||||
|
||||
[xine-lib][] - The main xine library
|
||||
[xine-lib-dev][] - The development xine library (needed if you're building an interface against xine-lib)
|
||||
[xine-lib-doc][] - Documentation
|
||||
|
||||
You'll also need a user interface - as of this release, the most current release of [xine-ui is 0.99.7][ui].
|
||||
|
||||
(To save disk space, only the current release and two [prior releases][pri] will be maintained.)
|
||||
|
||||
|
||||
[abt]: /2005/about-the-xine-rpms.html "About the xine RPMs • DJS Consulting Tech Blog"
|
||||
[xine-lib]: //hosted.djs-consulting.com/software/xine/xine-lib/libxine1-1.1.21-2.x86_64.rpm
|
||||
[xine-lib-dev]: //hosted.djs-consulting.com/software/xine/xine-lib/libxine-dev-1.1.21-2.x86_64.rpm
|
||||
[xine-lib-doc]: //hosted.djs-consulting.com/software/xine/xine-lib/libxine1-doc-1.1.21-2.noarch.rpm
|
||||
[ui]: /2012/xine-ui-0-99-7-rpm.html
|
||||
[pri]: /2012/xine-lib-1-1-20-1-rpm.html
|
25
source/_posts/2012/xine-ui-0-99-7-rpm.md
Normal file
25
source/_posts/2012/xine-ui-0-99-7-rpm.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
layout: post
|
||||
title: xine-ui 0.99.7 RPM
|
||||
author: Daniel
|
||||
date: 2012-06-10 16:55:11
|
||||
categories:
|
||||
- [ Hosted 64-bit Software, xine RPMs ]
|
||||
tags:
|
||||
- rpm
|
||||
- xine-ui
|
||||
---
|
||||
|
||||
Below is the RPM for xine-ui version 0.99.7. See the [About the xine RPMs][abt] post for information on how this RPM was built.
|
||||
|
||||
[xine-ui][] - The user interface
|
||||
|
||||
To use this, you'll also need xine-lib - as of this release, the most recent release of [xine-lib is 1.1.21][lib].
|
||||
|
||||
(To save disk space, only the current release and two [prior releases][pri] will be maintained.)
|
||||
|
||||
|
||||
[abt]: /2005/about-the-xine-rpms.html "About the xine RPMs • DJS Consulting Tech Blog"
|
||||
[xine-ui]: //hosted.djs-consulting.com/software/xine/xine-ui/xine-ui-0.99.7-2.x86_64.rpm
|
||||
[lib]: /2012/xine-lib-1-1-21-rpm.html
|
||||
[pri]: /2010/xine-ui-0-99-6-rpm.html
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
layout: post
|
||||
title: Oracle SQL Developer 3.2 Debian Package
|
||||
author: Daniel
|
||||
date: 2013-06-22 23:24:04
|
||||
categories:
|
||||
- [ Databases, Oracle ]
|
||||
- [ Programming, SQL ]
|
||||
tags:
|
||||
- deb
|
||||
- java
|
||||
- oracle
|
||||
- sql developer
|
||||
summary: A new version of Oracle's SQL Developer
|
||||
---
|
||||
|
||||
Oracle has released version 3.2 (.20.09) of their SQL Developer tool. They're still releasing RPMs, so developers on Debian-based systems need to use alien to install it on their machines. We have done that, and have made this available for others to use as well. What makes this particular release of SQL Developer so great is that [it now runs reliably under Java 1.7][java7] - no more keeping a 1.6 JDK floating around just for SQL Developer!
|
||||
|
||||
The .deb package [can be downloaded here][deb], or you can browse current and previously posted packages [in the "SQL Developer" directory][dir] of the DJS Consulting Software Repository.
|
||||
|
||||
|
||||
[java7]: //www.thatjeffsmith.com/archive/2013/06/oracle-sql-developer-and-java-7/ "Oracle SQL Developer and Java 7 • That Jeff Smith"
|
||||
[deb]: //hosted.djs-consulting.com/software/sqldeveloper/sqldeveloper_3.2.20.09.87-2_all.deb "SQL Developer 3.2.20.09 Debian Package"
|
||||
[dir]: //hosted.djs-consulting.com/software/sqldeveloper/ "SQL Developer • DJS Consulting Linux Software Repository"
|
79
source/_posts/2014/a-handy-c-sharp-async-utility-method.md
Normal file
79
source/_posts/2014/a-handy-c-sharp-async-utility-method.md
Normal file
|
@ -0,0 +1,79 @@
|
|||
---
|
||||
layout: post
|
||||
title: A Handy C# Async Utility Method
|
||||
author: Daniel
|
||||
date: 2014-08-04 19:48:43
|
||||
categories:
|
||||
- [ Programming, .NET, C# ]
|
||||
tags:
|
||||
- asynchronous
|
||||
- c#
|
||||
- utility
|
||||
summary: Using async when you can't use async
|
||||
---
|
||||
|
||||
In the course of writing C# code utilizing the new (for 4.5.1) [Task-based asynchronous programming][async], I've run across a couple of places where the `await` keyword either is not allowed (a catch block or a property accessor) or the `async` keyword greatly complicates the syntax (lambda expressions). I've found myself writing this method for two different projects, and so I thought I would drop this Q&D, more-comments-than-code utility method here for others to use if you see the need.
|
||||
|
||||
_(UPDATE: This works well in console applications; it can cause deadlocks in desktop and web apps. Test before you rely on it.)_
|
||||
|
||||
{% codeblock lang:csharp %}
|
||||
/// <summary>
|
||||
/// Get the result of a task in contexts where the "await" keyword may be prohibited
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The return type for the task</typeparam>
|
||||
/// <param name="task">The task to be awaited</param>
|
||||
/// <returns>The result of the task</returns>
|
||||
public static T TaskResult<T>(Task<T> task)
|
||||
{
|
||||
Task.WaitAll(task);
|
||||
return task.Result;
|
||||
}
|
||||
{% endcodeblock %}
|
||||
|
||||
And, in places where you can't do something like this...
|
||||
|
||||
{% codeblock ExampleClass.cs lang:csharp %}
|
||||
/// <summary>
|
||||
/// A horribly contrived example class
|
||||
/// </summary>
|
||||
/// <remarks>Don't ever structure your POCOs this way, unless EF is handling the navigation properties</remarks>
|
||||
public class ExampleClass
|
||||
{
|
||||
/// <summary>
|
||||
/// A contrived ID to a dependent entity
|
||||
/// </summary>
|
||||
public int ForeignKeyID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The contrived dependent entity
|
||||
/// </summary>
|
||||
public DependentEntity DependentEntity
|
||||
{
|
||||
get
|
||||
{
|
||||
// Does not compile; can't use await without async, can't mark a property as async
|
||||
return await Data.DependentEntities
|
||||
.FirstOrDefaultAsync(entity => entity.ID == ForeignKeyID);
|
||||
}
|
||||
}
|
||||
}
|
||||
{% endcodeblock %}
|
||||
|
||||
...you can instead do this in that "DependentEntity" property...
|
||||
|
||||
{% codeblock lang:csharp %}
|
||||
/// <summary>
|
||||
/// The contrived dependent entity
|
||||
/// </summary>
|
||||
public DependentEntity DependentEntity
|
||||
{
|
||||
get
|
||||
{
|
||||
return UtilClass.TaskResult<DependentEntity>(Data.DependentEntities
|
||||
.FirstOrDefaultAsync(entity => entity.ID == ForeignKeyID));
|
||||
}
|
||||
}
|
||||
{% endcodeblock %}
|
||||
|
||||
|
||||
[async]: //msdn.microsoft.com/EN-US/library/vstudio/hh191443(v=vs.110).aspx "Asynchronous Programming with Async and Await - MSDN"
|
28
source/_posts/2014/gxine-0-5-908-rpm.md
Normal file
28
source/_posts/2014/gxine-0-5-908-rpm.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
layout: post
|
||||
title: gxine 0.5.908 RPM
|
||||
author: Daniel
|
||||
date: 2014-08-24 19:37:37
|
||||
categories:
|
||||
- [ Hosted 64-bit Software, xine RPMs ]
|
||||
tags:
|
||||
- gxine
|
||||
- rpm
|
||||
- xine-lib
|
||||
---
|
||||
|
||||
Below are the RPMs for gxine version 0.5.908. See [About the xine RPMs][abt] for information on how these were built.
|
||||
|
||||
[gxine][] - The main gxine program
|
||||
[gxineplugin][] - Browser plugin library for gxine
|
||||
|
||||
To use this, you'll also need xine-lib - as of this release, the most recent release of [xine-lib is 1.2.6][lib]. The latest [xine-lib 1.1 is 1.1.21][lib1].
|
||||
|
||||
(To save disk space, only the current release and two prior releases will be maintained.)
|
||||
|
||||
|
||||
[abt]: /2005/about-the-xine-rpms.html "About the xine RPMs • DJS Consulting Tech Blog"
|
||||
[gxine]: //hosted.djs-consulting.com/software/xine/gxine/gxine-0.5.908-2.x86_64.rpm
|
||||
[gxineplugin]: //hosted.djs-consulting.com/software/xine/gxine/gxineplugin-0.5.908-2.x86_64.rpm
|
||||
[lib]: /2014/xine-lib-1-2-6-rpm.html
|
||||
[lib1]: /2012/xine-lib-1-1-21-rpm.html
|
31
source/_posts/2014/xine-lib-1-2-6-rpm.md
Normal file
31
source/_posts/2014/xine-lib-1-2-6-rpm.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
layout: post
|
||||
title: xine-lib 1.2.6 RPM
|
||||
author: Daniel
|
||||
date: 2014-08-24 19:33:28
|
||||
categories:
|
||||
- [ Hosted 64-bit Software, xine RPMs ]
|
||||
tags:
|
||||
- gxine
|
||||
- rpm
|
||||
- xine-lib
|
||||
- xine-ui
|
||||
---
|
||||
|
||||
Below are the library and development RPMs for xine-lib version 1.2.6. Be sure to check out the [About the xine RPMs][abt] post for information on how these were built.
|
||||
|
||||
[xine-lib][] - The main xine library
|
||||
[xine-lib-dev][] - The development xine library (needed if you're building an interface against xine-lib)
|
||||
[xine-lib-doc][] - Documentation
|
||||
|
||||
You'll also need a user interface - as of this release, the most current release of [xine-ui is 0.99.9][ui], and the most current release of [gxine is 0.5.908][gxine].
|
||||
|
||||
(To save disk space, only the current release and two prior releases in the 1.2-series will be maintained.)
|
||||
|
||||
|
||||
[abt]: /2005/about-the-xine-rpms.html "About the xine RPMs • DJS Consulting Tech Blog"
|
||||
[xine-lib]: //hosted.djs-consulting.com/software/xine/xine-lib/libxine2-1.2.6-2.x86_64.rpm
|
||||
[xine-lib-dev]: //hosted.djs-consulting.com/software/xine/xine-lib/libxine2-dev-1.2.6-2.x86_64.rpm
|
||||
[xine-lib-doc]: //hosted.djs-consulting.com/software/xine/xine-lib/libxine2-doc-1.2.6-2.noarch.rpm
|
||||
[ui]: /2014/xine-ui-0-99-9-rpm.html "xine-ui 0.99.9 RPM • DJS Consulting Tech Blog"
|
||||
[gxine]: /2014/gxine-0-5-908-rpm.html "gxine 0.5.908 RPM • DJS Consulting Tech Blog"
|
25
source/_posts/2014/xine-ui-0-99-8-rpm.md
Normal file
25
source/_posts/2014/xine-ui-0-99-8-rpm.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
layout: post
|
||||
title: xine-ui 0.99.8 RPM
|
||||
author: Daniel
|
||||
date: 2014-02-26 05:42:19
|
||||
categories:
|
||||
- [ Hosted 64-bit Software, xine RPMs ]
|
||||
tags:
|
||||
- rpm
|
||||
- xine-ui
|
||||
---
|
||||
|
||||
Below is the RPM for xine-ui version 0.99.8. See the [About the xine RPMs][abt] post for information on how this RPM was built.
|
||||
|
||||
[xine-ui][] - The user interface
|
||||
|
||||
To use this, you'll also need xine-lib - as of this release, the most recent release of [xine-lib is 1.1.21][lib].
|
||||
|
||||
(To save disk space, only the current release and two [prior releases][pri] will be maintained.)
|
||||
|
||||
|
||||
[abt]: /2005/about-the-xine-rpms.html "About the xine RPMs • DJS Consulting Tech Blog"
|
||||
[xine-ui]: //hosted.djs-consulting.com/software/xine/xine-ui/xine-ui-0.99.8-2.x86_64.rpm
|
||||
[lib]: /2012/xine-lib-1-1-21-rpm.html
|
||||
[pri]: /2012/xine-ui-0-99-7-rpm.html
|
26
source/_posts/2014/xine-ui-0-99-9-rpm.md
Normal file
26
source/_posts/2014/xine-ui-0-99-9-rpm.md
Normal file
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
layout: post
|
||||
title: xine-ui 0.99.9 RPM
|
||||
author: Daniel
|
||||
date: 2014-08-24 19:24:14
|
||||
categories:
|
||||
- [ Hosted 64-bit Software, xine RPMs ]
|
||||
tags:
|
||||
- rpm
|
||||
- xine-ui
|
||||
---
|
||||
|
||||
Below is the RPM for xine-ui version 0.99.9. See the [About the xine RPMs][abt] post for information on how this RPM was built.
|
||||
|
||||
[xine-ui][] — The user interface
|
||||
|
||||
To use this, you'll also need xine-lib - as of this release, the most recent release of [xine-lib is 1.2.6][lib]. The latest [xine-lib 1.1 is 1.1.21][lib1].
|
||||
|
||||
(To save disk space, only the current release and two [prior releases][pri] will be maintained.)
|
||||
|
||||
|
||||
[abt]: /2005/about-the-xine-rpms.html "About the xine RPMs • DJS Consulting Tech Blog"
|
||||
[xine-ui]: //hosted.djs-consulting.com/software/xine/xine-ui/xine-ui-0.99.9-2.x86_64.rpm
|
||||
[lib]: /2014/xine-lib-1-2-6-rpm.html
|
||||
[lib1]: /2012/xine-lib-1-1-21-rpm.html
|
||||
[pri]: /2014/xine-ui-0-99-8-rpm.html "xine-lib 0.99.8 RPM • DJS Consulting Tech Blog"
|
|
@ -0,0 +1,115 @@
|
|||
---
|
||||
layout: post
|
||||
title: Generating a Jekyll Site on Mercurial (Hg) Push
|
||||
author: Daniel
|
||||
date: 2017-02-18 12:41:00
|
||||
categories:
|
||||
- Linux
|
||||
- [ Programming, Jekyll ]
|
||||
tags:
|
||||
- commit
|
||||
- cron
|
||||
- hg
|
||||
- jekyll
|
||||
- mercurial
|
||||
- push
|
||||
- regenerate
|
||||
- rsync
|
||||
- scp
|
||||
- ssh
|
||||
summary: The process we use to regenerate Jekyll sites when a push occurs to a private Mercurial (Hg) repository
|
||||
---
|
||||
|
||||
As we mentioned in [our last post][v4], we plan to share aspects of how we moved to [Jekyll][]. This is the first of these posts.
|
||||
|
||||
# Background
|
||||
|
||||
With a database-based solution, updating is easy; when the user updates content through the user interface, the new content is served when the page or post is requested. However, with a static site, an "update" is technically any change to the underlying files from which the site is generated. Typically, though, this is marked by source control commit and push to a master repository. [GitHub Pages][ghp], the product for which Jekyll was developed, uses this as a flag to regenerate the site. We weren't using GitHub*, though - we were using [Mercurial][hg] (Hg) for our source code control, with the master repository on a different server than the one from which the site is served.
|
||||
|
||||
_\* There were a few reasons we did not wish to host our sites using GitHub, none of which are pertinent to how this works._
|
||||
|
||||
# Options
|
||||
|
||||
With the need to regenerate the site after each site's master repository receives a push, there were a few different options we considered.
|
||||
|
||||
1. When a push occurs, regenerate the site on the Hg server, then use `scp` to delete the old files from and copy the new files to the web server.
|
||||
2. Set up a sandbox on the Hg server that updates and regnerates each time a push occurs, and run `rsync` on the web server to check for updates every so often.
|
||||
3. When a push occurs, notify the web server, and have it regenerate the site.
|
||||
|
||||
The first option has the potential to run afoul of SSH rate limits, plus has the potential to require much more data transfer than option 3. The second option had the advantage of running a process local to the Hg server, but would have required disk space utilization that we didn't really need; and, as Jekyll regenerates all the pages in a site, `rsync` would have likely ended up transferring all the data for every update anyway, losing one of its benefits. The third option required Jekyll to be installed on the web server, and uses it for processing, potentially taking cycles that could be used to serve web pages.
|
||||
|
||||
Eventually, we decided to go with option 3.
|
||||
|
||||
# Script All the Things
|
||||
|
||||
On the Hg server, in the master repository for each site, we put the following in `.hg/hgrc` _(the following examples are for this site)_:
|
||||
|
||||
{% codeblock hgrc lang:shell %}
|
||||
[hooks]
|
||||
incoming = /opt/jobs/notify.tech-blog.sh
|
||||
{% endcodeblock %}
|
||||
|
||||
...and then, `notify.tech-blog.sh`...
|
||||
|
||||
{% codeblock notify.tech-blog.sh lang:shell %}
|
||||
#!/bin/bash
|
||||
ssh user@web.server touch /opt/jobs/jekyll/.tech-blog
|
||||
{% endcodeblock %}
|
||||
|
||||
That is the only logic required on the Hg server. Now, over on the web server, we need logic to regenerate the site and make it live. Since we have multiple sites, we wrote a script that has a few variables, so it could be duplicated for other sites. The following is `tech-blog.sh`:
|
||||
|
||||
{% codeblock tech-blog.sh lang:shell %}
|
||||
##
|
||||
## DJS Consulting Tech Blog Jekyll Build Script
|
||||
##
|
||||
## This will check out, build, and replace a Jekyll-generated site. Just update
|
||||
## the parts under the "Env" heading for the specific site.
|
||||
##
|
||||
|
||||
## Env
|
||||
REPO=jekyll.tech-blog
|
||||
DEST=/path/to/public/techblog
|
||||
TRIGGER=.tech-blog
|
||||
## /Env
|
||||
|
||||
cd /opt/jobs/jekyll
|
||||
|
||||
if [ -e $TRIGGER ]
|
||||
then
|
||||
rm $TRIGGER
|
||||
|
||||
## Check out the site and build it
|
||||
hg clone ssh://user@hg.server/HgPath/$REPO $REPO
|
||||
cd $REPO
|
||||
jekyll build
|
||||
|
||||
## Copy it to the proper directory
|
||||
cd _site
|
||||
rm -r $DEST/*
|
||||
cp -r * $DEST
|
||||
|
||||
## Clean up
|
||||
cd ../..
|
||||
rm -r $REPO
|
||||
fi
|
||||
{% endcodeblock %}
|
||||
|
||||
This script isn't perfect; it needs to check the exit code from the Jekyll build process before whacking the current site (and notifying for a failed build would be a nice addition). However, with Jekyll being the same on both development and production, and a single committer, this is fine for our purposes.
|
||||
|
||||
Finally, each script needs to be run to check for the presence of the semaphore (or `TRIGGER`, as the script calls it). The following cron definition will check every 4 minutes for a change.
|
||||
|
||||
{% codeblock crontab lang:shell %}
|
||||
*/4 * * * * /opt/jobs/jekyll/tech-blog.sh > /dev/null
|
||||
{% endcodeblock %}
|
||||
|
||||
# Conclusion
|
||||
|
||||
Overall, we're pleased with the results. The inter-server communication is light, only requiring one initiated `ssh` connection from each server, so we won't run afoul of rate limits. With the work being done on the destination server, the amount of time where there are no files in the directory (between the `rm -r $DEST/*` and the time the `cp -r * $DEST` finishes) is very short; it would have been much longer if the directory were being repopulated across the network, or more complex if we added a staging area on the web server. Each piece can be run separately, and if we've committed a post with a future date, we can run the same `touch` command to make that post appear.
|
||||
|
||||
Next time, we'll discuss our experiences converting a non-WordPress site.
|
||||
|
||||
|
||||
[v4]: /2017/tech-blog-v4.html "Tech Blog v4 • DJS Consulting Tech Blog"
|
||||
[Jekyll]: //jekyllrb.com "Jekyll"
|
||||
[ghp]: //pages.github.com "GitHub Pages"
|
||||
[hg]: //www.mercurial-scm.org "Mercurial (Hg)"
|
26
source/_posts/2017/tech-blog-v4.md
Normal file
26
source/_posts/2017/tech-blog-v4.md
Normal file
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
layout: post
|
||||
title: Tech Blog v4
|
||||
author: Daniel
|
||||
date: 2017-02-16 19:21:00
|
||||
categories:
|
||||
- General Info
|
||||
- [ Web Servers, nginx ]
|
||||
tags:
|
||||
- blog
|
||||
- jekyll
|
||||
- nginx
|
||||
- wordpress
|
||||
summary: The blog moves from WordPress to Jekyll
|
||||
---
|
||||
|
||||
From [August 2011][v3] until today, this site has been running under WordPress. During this time, we have done many experiments with several other blog platforms, but none of them made it to the "import all the old stuff from this one - this is what we're looking for!" stage. As you may have already guessed, though, this is no longer the case. WordPress does what it does very well. However, the last post before this one was August... of 2014! That means that, every page served from this site, a script was run on the server that accessed a database and dynamically assembled the page. This content did not need to be dynamic - even when there is a new post, there is very little in the way of dynamic content here.
|
||||
|
||||
[Jekyll][] is a static site generator; these types of applications generate static sites based on a collection of templates and content files, that can then be served with no backing data store. Now, we can utilize the blazing fast [nginx][] web server to push these files as quick as people can request them, where the request does not even have to escape the process.
|
||||
|
||||
There will be more to come on Jekyll; there are at least two posts to be written, one on automating the build process and another on the migration from WordPress. Until then, though, there are redirects that ensure the RSS feeds for both the main blog and the xine RPMs require no changes, and the category pages have redirects as well. If something does not look right, let us know via either of the social media accounts linked above.
|
||||
|
||||
|
||||
[v3]: /2011/tech-blog-3-0.html "Tech Blog 3.0 • DJS Consulting Tech Blog"
|
||||
[Jekyll]: //jekyllrb.com "Jekyll"
|
||||
[nginx]: //nginx.com "nginx"
|
13
themes/mantraish/layout/_partial/footer.pug
Normal file
13
themes/mantraish/layout/_partial/footer.pug
Normal file
|
@ -0,0 +1,13 @@
|
|||
footer#footer(role='contentinfo')
|
||||
#footer2
|
||||
#site-copyright.
|
||||
A production of #[a(href='//djs-consulting.com' title='Your Web Design and Application Solution Source') DJS Consulting]
|
||||
| Design Inspired by #[a(target='_blank' href='//www.cryoutcreations.eu' title='Mantra Theme by Cryout Creations') Mantra]
|
||||
div(style='text-align:center;clear:both;padding-top:4px;').
|
||||
#[a(href='/' title='DJS Consulting Tech Blog' rel='home') DJS Consulting Tech Blog] | Generated by
|
||||
#[a(href='//hexo.io' title='Hexo') Hexo] | Served by #[a(href='//nginx.com' title='nginx') nginx] | Secured by
|
||||
#[a(href='//letsencrypt.org') Let's Encrypt]
|
||||
#sfooter.socials
|
||||
a(target='_blank' rel='nofollow' href='/feed.xml' class='socialicons social-RSS' title='RSS'): img(alt='RSS' src='/img/social-rss.png')
|
||||
a(target='_blank' rel='nofollow' href='//twitter.com/DJS_Consulting' class='socialicons social-Twitter' title='Twitter'): img(alt='Twitter' src='/img/social-twitter.png')
|
||||
a(target='_blank' rel='nofollow' href='//www.facebook.com/pages/DJS-Consulting/262368048575' class='socialicons social-Facebook' title='Facebook'): img(alt='Facebook' src='/img/social-facebook.png')
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user