Adrian Collier - Archive

schtasks



schtasks is a windows command line utility that allows you create tasks and perform them at specified intervals. I wrote a batch script to backup my data and needed a method to run it once every night. Here's an example I used.


schtasks /create /SC DAILY /TN Backup /TR "\"C:\backup.bat\"" /ST 03:00


Here's how it works. schtasks is the command and /create sets a new scheduled command. /SC DAILY specifies the frequency and /TN Backup specifies a name which identifies your scheduled task. /TR "\"C:\backup.bat\"" specifies the path and file name of the task to be run at your set schedule. The important thing to keep in mind is to escape the quotes. /ST 03:00 sets the start time in the 24-hour format.


January 30, 2011


Cisco ASA: Configuring Connection Limits



The Cisco ASA Firewall is capable of protecting your network from Denial of Service attacks (DoS), SYN floods, and TCP excessive connection attacks. In this example we will learn how to configure connection limits towards a specific host on your LAN.


configure terminal
access-list example-acl extended permit ip any 192.168.1.1 255.255.255.255
class-map example-map
match access-list example-acl
policy-map example-policy
class example-map
set connection conn-max 10
service-policy example-policy global


The set connection has a few options.


set connection {[conn-max n] [embryonic-conn-max n]
[per-client-embryonic-max n] [per-client-max n] [random-sequence-number {enable | disable}]}


conn-max sets the maximum number of simultaneous TCP and/or UDP connections allowed.
embryonic-conn-max sets the maximum number of simultaneous embryonic connections allowed per client.
per-client-embryonic-max sets the maximum number of simultaneous embryonic connections allowed per client.
per-client-max sets the maximum nuber of simultaneous connections allowed per client.


January 21, 2011


Bok Choy, Chicken, and Mushroom Kebabs



3 large garlic cloves
1/2 cup soy sauce
1/3 cup dry Sherry
1/4 cup brown sugar
1 tablespoon grated ginger
2 teaspoons sesame oil
1 1/2 pound chicken breast cut into 2-inch pieces


Mash garlic with salt. Boil soy sauce, Sherry, and brown sugar in a saucepan over medium heat, reduce. Stir in garlic, ginger, and sesame oil, cool to room temperature. Marinate chicken in sauce overnight.

Halve bok choy lengthwise and blanch for 2 minutes. Transfer bok choy to ice bath, pat try, skewer, season with salt. Toss mushrooms with vegetable oil, skewer, season with salt. Skewer marinated chicken.

Grill chicken, mushrooms, and bok choy until done.


January 21, 2011


Save Password with Mac OS X Snow Leopard's built in Cisco IPSec VPN



One of my favorite features of Mac OS X is the built in Cisco IPSec VPN Client. No longer do I need to use Cisco's out dated Cisco VPNClient application. With the built in client you can save the username and password in your Keychain. The problem is every time you try to connect OS X asks you for the password. I thought it was saved in my Keychain!?! Well it is, you've encountered a bug with an easy fix.

Open the Keychain Access Application, select System, and locate the saved IPSec XAuth Password item. Double click to open it, then on the Access Control tab click the + symbol to add another application. Press Command-Shift-G, enter /usr/libexec, then select configd. Save your changes and the saved password should now work.


January 20, 2011


Robocopy



I was sleeping the other night when all of a sudden my 20 Terabyte storage server started beeping away. At first I thought my house was on fire and after waking up and realizing what was going on I knew exactly what it was. Enterprise grade RAID cards are built for the datacenter. Data centers are extremely loud and require one heck of a beep before you can distinguish something audible amongst all the fans and air conditioners. A hard drive had died and I was franticly trying to mute the alarm. One thing to note, it was a Western Digital 2TB Green Drive, my 3rd failure of its kind to be exact. I had known good backups so I wasn't too worried about losing another drive in my RAID 5 Array. On the other hand I had lost faith in the ability of the 2TB line of green drives to protect my data.

After implementing my new and hopefully superior backup strategy I needed a way to copy all of my files to the new array. For that I used Robocopy, or "Robust File Copy", a command line utility built into newer versions of Windows. I prefer this method over others because it tolerates network interruptions and resumes copying. It also continuously updates the progress via command line so you can see exactly what file it's copying at that moment in time. The command itself has many options, here's the one I used.


robocopy "D:" "E:" /copyall /b /v /mir /W:0 /R:0


Here's how it works. robocopy is the command itself. "D:" and "E:" are the source and destination folders respectively. /copyall copies all file info. /b copies the files in backup mode. /v produces a more verbose output log, also showing you skipped files. /mir mirrors the directory tree recursively and purges unnecessary files. And /W:0 /R:0 manipulates the number of retries on failed copies and wait time between those retires.


January 19, 2011


Admiralty Inlet

  • Sunday
    12/17/2017
  • 11:51 AM - Slack Flood
  • 3:23 PM - Slack Ebb
  • 11:32 PM - Slack Flood

  • Monday
    12/18/2017
  • 6:06 AM - Slack Ebb
  • 12:37 PM - Slack Flood
  • 3:53 PM - Slack Ebb

  • Tuesday
    12/19/2017
  • 12:04 AM - Slack Flood
  • 6:41 AM - Slack Ebb
  • 1:23 PM - Slack Flood
  • 4:21 PM - Slack Ebb

  • Wednesday
    12/20/2017
  • 12:35 AM - Slack Flood
  • 7:15 AM - Slack Ebb
  • 2:10 PM - Slack Flood
  • 4:50 PM - Slack Ebb

  • Thursday
    12/21/2017
  • 1:08 AM - Slack Flood

The Narrows

  • Sunday
    12/17/2017
  • 6:05 AM - Slack Ebb
  • 11:38 AM - Slack Flood
  • 4:31 PM - Slack Ebb
  • 11:39 PM - Slack Flood

  • Monday
    12/18/2017
  • 6:42 AM - Slack Ebb
  • 12:22 PM - Slack Flood
  • 5:05 PM - Slack Ebb

  • Tuesday
    12/19/2017
  • 12:16 AM - Slack Flood
  • 7:18 AM - Slack Ebb
  • 1:04 PM - Slack Flood
  • 5:39 PM - Slack Ebb

  • Wednesday
    12/20/2017
  • 12:51 AM - Slack Flood
  • 7:53 AM - Slack Ebb
  • 1:46 PM - Slack Flood
  • 6:14 PM - Slack Ebb

  • Thursday
    12/21/2017
  • 1:25 AM - Slack Flood

Current & Tide
Predictions


Current
Corrections



Previous