|
|
This is a ruby script I’ve used successfully to split up a mysqldump file that contained multiple databases.
#!/usr/local/bin/ruby if (ARGV.count < 1) puts "give filename please." exit end if (ARGV.include? ‘–table’) pattern = /^– Table structure for table `(\w+)`$/ else pattern = /^– Current Database: `(\w+)`$/ end outfile = nil File.new(ARGV[0], ‘rb’).each_line do |line| if line =~ pattern outfile.close if outfile outfile = File.new($1, ‘w’) end if outfile outfile.print(line) end end
So, this Android app that I wrote (see this post) is called On My Way. It is easy for me to use (I wrote it) but as I was looking at it earlier today it occurred to me that it might not be as clear to everyone else. Here are some things you should know if you want to use this app effectively.
OMW will look back in time for two hours to find your next appointment. For example, if you are supposed to be there at 9am then you can send the notification for this until 11am. After 11am it will give up on that one and go look for the next event. I chose two hours because that is a good time [...]
So, I’ve published my first Android application today. This is a program called ‘On My Way’. The idea is that if you are running a few minutes late for work, the phone should know this and notify your boss for you. It is a smart phone, right? The idea is simple enough, and the Android phones on the market have all of the necessary powers. In a perfect execution, the phone wouldn’t even need your input, beyond the initial configuration.
When I sat down to design the exact requirements though, I had to compromise the vision a little bit. Android might be smart, but its not really smart enough to tell the difference between a person being a little late for work and a sick [...]
If your work place is anything like mine then you don’t dare to step away from your computer without locking it. The first time you do you are ruthlessly pranked by your cube neighbors. One popular prank is to flip the display upside down, or replace the desktop with a picture of the desktop, so the icons don’t work. Sometimes your “friendly” co-worker will hop on your email and send an email as you promising to take everyone to lunch.
This project is a trap for those who try these kind of pranks. A reverse prank the pranker type deal. What we do is we make a screensaver, password protected of course, that looks like you’ve left your desktop unlocked. Then when someone tries to [...]
RubberStumble is an extension I wrote for Google Chrome that was inspired by my burning need to Stumble. I quickly fell in love with Chrome when I discovered it, but not having that stumble button was a deal breaker in the early versions of the browser (version 1 and 2). I learned something about my habits in those days… Whenever I finished with the webpage I was on, I moved my mouse without thinking to click Stumble. Then there was a brief moment of confusion when the Stumble button wasn’t there, and I would sigh. Well, as you can imagine, a man can only put up with that for so long. I didn’t plan on changing my habits, so I had to change my browser. [...]
DCLockoutStatus is a user password management tool for windows domains with replication delays between AD sites. [...]
note: many of the pages in versions 3.0 and earlier have been removed or renamed. about:stats for example. The 3.0 pages are not discussed here.
All browsers use special URLs to display troubleshooting and debugging information to advanced users. Google Chrome has a wealth of these. Some are useful, some are interesting, some not very useful for the average user. A few of these are discoverable by clicking on some items in the menus. Others are hidden, and not intended for public consumption. Many of these I discovered from the Chromium source code. These pages are all working on version 4.0.245.0. In earlier versions of chrome, many of the pages either don’t exist, or have a different URL. The sample I have below is [...]
This is an extension for google chrome (4.0+) that will allow you to put in any url that you want to be the newtab page. To set a custom new tab page, open the options page for this extension and you will go to the page where you can change the newtab URL. Install the extension by clicking on the attachment at the bottom of the post, or this link: CustomNewTabPage. If you want to revert to the default newtab page, with the thumbnails, then uninstall the extension.
The code for this extension is rather simple:
option.html
<script type ="text/javascript">// <![CDATA[ function update_homepage () { [...]
An extension that I wrote that will change the color of visited link in Chrome to Red. There are two files in this extension: manifest.json:
{ "name": "RedVisitedLinks", "version": "1.0", "description": "Make visited links red", "content_scripts" : [ { "matches" : ["http://*/*", "https://*/*", "ftp://*/*"], "css" : ["redlinks.css"] } ] }
and redlinks.css:
a:visited { color: red; }
TaDa!
Install by clicking the link below. Requires version 4.0+ of chrome.
RedVisitedLinks
So, I’ve made a few posts already, eager to begin as I was. Reviewing the content so far, I have come to realize that this beginning was not well planned. Allow me a minute or so to Introduce myself and my product.
My name is David Warburton and I’m going to write about scripting, programming, and AutoPowerShell in this blog. (Also, expect pictures of my children occasionally). AutoPowerShell is a program I wrote, a system tray host for Powershell. You can read about it in the first post.
AutoPowerShell launcher
This is the main launcher window for AutoPowerShell. The actions you define will appear as buttons in this window. Just about any [...]
|
|