Something killing locale-gen

Ran pacman -Syu on my PogoPlugv4 this afternoon and noticed that locale-gen was being killed for some reason.

[user@tengu ~]$ sudo pacman -Syu
:: Synchronizing package databases...
...
:: Starting full system upgrade...
...
( 2/36) upgrading glibc
Generating locales...
  en_US.UTF-8.../usr/bin/locale-gen: line 41: 17709 Killed localedef -i $input -c -f $charset -A /usr/share/locale/locale.alias $locale
( 3/36) upgrading libseccomp
...

Ran it manually and saw the same behavior. I could see something was in a bad state as tmux would also refuse to reattach my session.

[user@tengu ~]$ sudo locale-gen
Generating locales...
  en_US.UTF-8.../usr/bin/locale-gen: line 41: 18396 Killed localedef -i $input -c -f $charset -A /usr/share/locale/locale.alias $locale
[user@tengu ~]$ tmux a
tmux: invalid LC_ALL, LC_CTYPE or LANG

My hunch was locale-gen was hitting the memory limit for the PogoPlugv4, which doesn’t have much.

[user@tengu ~]$ free -m
              total        used        free      shared  buff/cache   available
Mem:            117          53           1           0          62          58

Nor was there any configured swap space.

[user@tengu ~]$ swapon --show
[user@tengu ~]$ echo $?
0

The memory we can’t do anything about, but we can use swap space to give us some wiggle room. However, we run into more issues.

[root@tengu ~]$ fallocate -l 512M /swap
fallocate: fallocate failed: Operation not supported
[user@tengu ~]$ mount | grep sda
/dev/sda1 on / type ext3 (rw,relatime,data=ordered)

I guess there’s an issue with fallocate on F2FS or XFS, per archlinux.org, but we’re running ext3.

The man pages for fallocate state “fallocate() is available on Linux since kernel 2.6.23. Support is provided by glibc since version 2.10.” My versions seem to be in line with that.

[user@tengu ~]$ uname -r
4.4.14-1-ARCH
[user@tengu ~]$ /lib/libc.so.6 | grep release
GNU C Library (GNU libc) stable release version 2.25, by Roland McGrath et al.

UPDATE: After some searching it turns out that fallocate does not support ext3, per this Bugzilla ticket. Guess this is what I get for using ext3.

Whatever, we can get around this by using dd.

[root@tengu ~]$ dd if=/dev/zero of=/swap bs=1024 count=524288
524288+0 records in
524288+0 records out
536870912 bytes (537 MB, 512 MiB) copied, 23.8825 s, 22.5 MB/s
[root@tengu ~]$ chmod 600 /swap
[root@tengu ~]$ mkswap /swap
Setting up swapspace version 1, size = 512 MiB (536866816 bytes)
no label, UUID=a938d5b6-7113-4456-a633-7824b73d440d
[root@tengu ~]$ swapon /swap

We can confirm the system now has a swap space.

[root@tengu ~]$ swapon --show
NAME             TYPE SIZE  USED   PRIO
/swap            file 512M  14.5M  -1
[root@tengu ~]$ cat /proc/swaps
Filename         Type            Size    Used    Priority
/swap            file            524284  14816   -1

Now locale-gen should have enough room to do what it needs to do.

[root@tengu ~]$ locale-gen
Generating locales...
  en_US.UTF-8... done
Generation complete.

Done. Now pacman and tmux are happy.

Pogoplugv4

The good, the bad, and something about the Pogoplugv4.

The good

The bad

The something

So far I’m using it for IRC and serving webpages using Nginx and some custom bash scripts.

Baking bread

Forked from r/Breadit.

Ingredients:

Timing:

0:00 Add honey and yeast into warm water. Mix to dissolve.

0:15 Water/yeast should be bubbly now. Combine the flour and salt. Stir in the oil and water. Mix by hand and knead for 5 - 10 minutes. Place dough in a lightly oiled bowl and cover with a cloth. Wait for dough to rise.

1:15 Punch dough down and put into greased loaf pan. Cover with a cloth. Wait for dough to rise again.

2:15 Preheat oven to 400. When it’s warm, insert bread and drop the temperature to 375.

Bake probably about 20–30 min or until the top looks golden.

Cool in the pan for 5 minutes then transfer to cooling rack.

Climbing

These are miscellaneous notes I’ve taken while reading climbing related books.

Books:

Fundamentals

Feet

Developing good footwork is an attribute that you must make happen via constant foot focus and practice.

Proper alignment of your center of gravity directly over a foothold.

On slab this means your hips are out from the wall and over your feet. With vertical this means keeping your body position in to the wall and straight, while standing on your feet as much as possible.

Hands

Arms play a secondary role in climbing. Grip each handhold with the minimum force required, using the arms mainly for balance and not as a primary source of locomotion, and pushing with the feet in unison with modest arm pulls.

Focus on light touch that yields soft forearms.

Decide how much you need to pull down on a hold, it is imperative that you push with your feet and let the leg muscles carry the load. Think of your arms as points of contact that prevent you from falling backward off the wall.

Exercises

One-arm Traversing

Find a vertical wall, with good holds and 10ft of travel. Overhanging wall for harder difficulty.

Climb onto wall and place a hand behind your back. Begin traversing with small, quick lunges from one handhold to the next. Optimal technique is to draw in your body toward the wall and lunge to the next handhold, doing so all in one smooth motion.

Advance your feet onto new footholds as needed to keep your center of gravity over your feet and maintain balance. Climb both ways for three sets.

One-arm Lunging

Find a 10–25% degree overhang wall.

Climb onto the wall and balance your weight evenly on two footholds. Grip the higher of the two handholds with one hand, place the other hand behind your back. Now drop down, catch the lower handhold, and quickly lunge back up to the higher starting hold.

Continue lunging both arms for three sets.

Last Year In Review

Thoughts and stats of 2016, an idea stolen from jnerula.

Previously

Accomplishments

Books read

Again, I didn’t read as much as I would have liked. Would like to really make a bigger change here this upcoming year.

Side-Projects

Not as many projects as I would have liked, but my focus this year has been mostly on outdoor things. I did manage to release several Chef cookbooks that our company uses under the MIT license.

Succeeded

Limbo

Failed

Regrets

Goals from 2015

Didn’t get many goals done, I think the tech and photo really took a back seat to climbing and fishing. Granted, the climbing was also impacted from a finger injury that I was slow to return from. Father travel will require more planning.

Goals for 2017

I’m going to steal some from last year, they’re too good and I really should have done them. I still really want to learn Japanese and do some film.

Random Stats

Weight: lol?

Commits: 1,576

Bike miles: 402.7

2015 In Review

A first of hopefully many end-of-year posts, an idea stolen from jnerula.

Accomplishments

Books read

Didn’t read as much as I would have liked this year and I have many books in various incomplete states.

Side-Projects

Not a productive year for public projects. Most of my work was done on private repositories, which is unfortunate. I’ve got a decent collection of useful gists, but nothing organized.

Succeeded

Limbo

Failed

Regrets

Goals from 2015

Failed: nil

Success: nil

Goals for 2016

Random Stats

Weight: ?

Commits: 882

Bike miles: 445

Clackamas River

All hatchery programs have been restricted to the lower river in recent years to keep hatchery adults from mixing with wild fish on upper-river spawning beds.

Target water on the Clackamas is found from River Mill Dam downstream, including the Eagle Creek tributary.

The lower Clackamas River (from the mouth at the Willamette River up to Cazadero Dam above Estacada) is open year-round for fin-clipped steelhead.

The Clackamas draws from a large basin in the northern Oregon Cascades. It holds up well with modest rainfall and fishes when smaller streams are too low, but it can take some time to recover after a heavy rainfall.

For ideal conditions for fall through spring fishing, look for the river height to be around 10 to 13 feet at the Estacada gauge. It will drop below that for much of the summer, but fishing is still worthwhile for summer-runs. Below about XX feet, the river is tough on jet boats. Drift boaters access it down to xx feet. Rafters go down all summer.

License requirements

In addition to a fishing license, steelhead anglers need to purchase a Combined Angling Tag (steelhead, salmon, sturgeon and Pacific halibut).

Anglers also can purchase Hatchery Harvest Tags that authorize the harvest of additional hatchery fish.

http://www.dfw.state.or.us/resources/licenses_regs/docs/fishing_harvest_card_location_codes.pdf

Limits

Locations

Carver

This is the most heavily used ramp on the river, and for good reason. Carver is centrally located in the most productive jet boat water. From Carver downstream to Riverside Park is where the best side-drifting water lies.

It is home to the longest runs on the river, and the least houses, as side-drifting is a new endeavor on the Clackamas and homeowners are less than enthused with its introduction (more on that later). Under high water conditions, there are usually a few steelhead caught in the park immediately below the mouth of Clear Creek.

Other than that, bank fishing opportunities are minimal.

Barton Park

The runs and riffles become more compact, albeit only slightly, and there is much more character and definition to the holding water. This continues to Barton Park, the next launch upstream from Carver.

The Barton to Carver stretch is the most popular float on the river for drift boats. With access for jet boats coming upstream from Carver, this section is also the most crowded portion of the river.

You’ll find numerous pieces of picture-perfect steelhead water, as with the Carver to Riverside stretch, but the spots are smaller and more compact.

Bank fishing at Barton consists of a couple of nice pieces of water immediately above and below the launch ramp.

Adventuresome anglers can park on the west side of the bridge crossing the river and hike downstream to access another quality drift.

Feldheimer

There are numerous braids and shallow bars, yet while this stretch appears to contain excellent steelhead water, the fish seem to transition through it rather quickly, leaving consistent success difficult to achieve.

Some of the best water in the area is the long run immediately in front of, above and below the launch itself.

McIver Park

There are two boat launches in McIver Park, upper and lower. The lower launch is only a short distance above Feldheimer. There is a beautiful run immediately in front of the launch, but the drift offers little else in terms of great quality water.

While not well positioned for boating anglers, McIver Park does offer some of the best bank fishing opportunity on the river. The angler willing to walk a bit can access great water above the upper launch that terminates at Rivermill Dam. The hatchery intake is located just below the launch at Dog Creek and the usual hatchery circus (although this is a tight area) can be found there.

In the direction of the lower launch there are a few good buckets available to the bank angler willing to seek them out.

Eagle Creek

Eagle Creek will blow out of fishing shape quickly following heavy rainfall, but it also will come back into fishable condition well before the much bigger Clackamas will. In fact, it’s often at its best when the Clackamas is running ugly with mud and silt. However, if the Clackamas has fallen into a pretty steelhead green after a dry spell, that most likely means Eagle Creek is low and clear and difficult to fish.

Good areas to fish from the bank are at Bonnie Lure Park near the mouth of the stream. Eagle Fern Park also offers some good access. There are good holes in the park itself, and in the first ½-mile of stream above the park.

A short distance below the park is the lower fish ladder, and the mile of stream below the deadline there really kicks out a lot of fish. There can be a lot of competition here on the weekends, but the fishing is worth putting up with it.

Probably the most productive stretch of the stream open to the public is below the hatchery. Fishermen need to park in the marked lot about ¼-mile below the hatchery. A trail takes anglers down to the public water. This is a large area that offers about 2 miles of great steelhead water, although it is rugged country and the hiking can be difficult.

Although this stretch sees some competition, there is a lot of water for anglers to spread out. This stretch will produce well all the way through March, and provide bright fish the whole time.

Trout

The upper sections of Eagle Creek is stocked with rainbow trout three times a year in July and August. The stream has a few wild cutthroats and rainbows. Resident cutthroat trout exist above the uppermost waterfalls.

Oak Grove Fork between Harriet Lake and Timothy Lake, a stream section without salmon and steelhead. There are roughly 9 to 10 stream miles between these two reservoirs where you can keep up to two trout (rainbows and cutthroat) at least 8 inches long, which potentially could include stocked trout moving out of a reservoir.

Regulations also allow you to keep as many non-native brook and brown trout as you want, with no size limits. Some brown trout move out of Harriet and into the Oak Grove Fork above, and they can reach good size, and many anglers are more apt to practice catch and release with the browns than the brookies. The latter tend to take over streams and don’t grow as large.

This part of the Oak Grove Fork is followed by National Forest Road 57. It can take some hiking to reach the best waters.

To reach this area, you can take Ripplebrook Road or NF 57 near Ripplebrook Ranger Station and reach the area above Harriet in about 15 minutes or so. The full drive to this area is about an hour and a half from Portland following the Clackamas River upstream through Estacada. You also can follow the Oak Grove Fork downstream from Timothy Lake, which can also be reached off Highway 26 near Clear Lake.

The Clackamas River and all tributaries above Cazadero are restricted to fishing with artificial flies and lures. Fly fishing can be excellent in the Oak Grove Fork and elsewhere up here.

The remainder of the upper Clackamas system, including forks and the Collowash River system, have the potential for some nice catch-and-release trout fishing, now that the stockers are no longer present and angling pressure is far reduced. Try exploring some of these smaller streams in the upper basins.

Steelhead

There are two main runs of steelhead in Oregon, known as “summer” and “winter” runs. The type of steelhead run is determined by the season of the year the fish enter freshwater. Some river systems have both types of runs while other streams may have one or the other. Both winter and summer run fish spawn in the spring, but they each enter the river at different times and at different stages of reproductive maturity.

As their name suggests, summer steelhead begin migrating to their natal streams as early as March in some streams near the coast, and as late as October/November in some rivers in eastern Oregon. They will remain in the river for several months before spawning. All steelhead returning to rivers east of the Cascade Mountains are considered summer run fish.

Winter steelhead migrate into freshwater when they are closer to reproductive maturity and are generally larger than their summer-run cousins. Winter steelhead begin their migration in late fall and early winter with some fish continuing to migrate well into spring. Winter steelhead spawn shortly after entering their natal stream.

Unlike the other salmonids, steelhead are not pre-determined to die after spawning and may live to spawn multiple times. After the eggs have been deposited in the spring, the fry emerge in summer and may spend the next one to three years in fresh water prior to migrating to the ocean.

Summer

The first several dozen summer steelhead show up in March, when fishing often is at a peak for winter steelhead and anglers also are gearing up for the river’s spring chinook fishery. Summer steelhead catches (as well as springer catches) pick up in April and peak from May through July.

By late summer and fall, many anglers are targeting other runs, and spring chinook are dark, but summer steelhead fishing can be worthwhile on the Clackamas right through its popular fall coho run.

The Clackamas once had a summer steelhead fishery beyond compare. Miles upon miles of the upper watershed (above Estacada and North Fork Reservoir) offered excellent fishing in glorious surroundings. The program was halted in the late 1990’s and currently all summer steelhead are released from Clackamas Fish Hatchery at McIver Park.

Clackamas summer steelhead begin to show in the month of April, right along with spring chinook and late winter steelhead. These are beautiful fish at this time, bright, aggressive and fierce fighters.

The run continues well into the summer, but the best fishing throughout the river is up until the river drops to summer levels in mid to late June. Hatchery fish are recycled through the system to offer extra opportunities to catch them and they will respond well to eggs, shrimp, plugs, jigs and spinners.

When the river hits a low summer level, fishing effort concentrates in the McIver Park area where cool upriver water is most available. To be sure, there are steelhead available all summer long on the Clackamas for those willing make the effort.

Winter

Winter steelhead fishing is at its best from the middle of December through February.

The steelhead first start entering Eagle Creek around the end of November but the best fishing opportunity will probably not take place until around the middle of December. It will continue through the first part of March.

Early in the season, anglers should focus their attention below Eagle Creek to go after the early run. The mouth of the creek at Bonnie Lure State Recreation Area is a popular spot to intercept fish preparing to run into the smaller stream.

Another popular lower-river access point is at the mouth of Clear Creek, on the south side at Carver, which can be a little better than much of the lower river when flows are on the high side. Other lower river access points include High Rocks (Gladstone) and Riverside Park (Clackamas).

By mid-winter, steelhead will be found in good numbers throughout the lower up to the Estacada area. One of the best places to get at them is Milo McIver State Park, where ODFW’s Clackamas Hatchery is located and where a good portion of late-returning smolts are released. McIver is off Springwater road, across the river and just downstream from Estacada, and offers a ton of riverfront access.

Coho

Coho Salmon begin to enter the Clackamas River in August. They spawn in October and early November. Most of the Silver Salmon average about 5 to 10 pounds and head straight for the Eagle Creek hatchery.

Maps

Lower Clackamas Upper Clackmas Eagle Creek

Fishing

Thoughts, notes, and lists relating to fishing.

Gear

Locations

Dorman Pond, OR

40ms outside of Portland. Good bank access, but lots of water vegitation. Stocked with trout and bass, but I didnt see any. Lots of Bluegill, they’ll bite anything.

Used a Trout Magnet against the Bluegill with good success. Wasnt sure how to attack the middle of the pond. It was really hot, so I’m guessing the bigger fish are down low to beat the heat?

Wasnt sure where to find trout or bass. Dealt with a lot of salad on the hook. Didn’t run any treble hooks.

Metolius River, OR

The first couple of miles below Bridge 99 offer good opportunity to catch fish. Beyond Candle Creek Campground (two miles below Bridge 99), the Warm Springs Indian Reservation occupies the west bank and river access is denied. Route 1499 continues for 11 miles on the east bank, where fishing is legal for the adventurous who like to hike or bike to fishing holes.

Perhaps even more remote, wild, and rugged is the Metolius River downstream of Bridge 99. Highlighted by roaring rapids, and by thick brush and giant ponderosa pine trees along its banks, this stretch of the Metolius is home to big bull trout, redband trout and whitefish.

Relatively few anglers venture that far downstream, so it is possible to target fish that have experienced less pressure from fishermen than on more-popular sections of the river closer to U.S. Highway 20.

The Metolius below Bridge 99, about 15 miles north of Black Butte Ranch, is restricted to artificial flies and lures, while upstream of the bridge is restricted to fly angling only. Catch-and-release is the only fishing permitted on the entire river.

Crooked River, OR

Deschutes River, OR

Upper

Middle

Lower

Subaru Outback

Information that I have collected for my 2005 Subaru Outback XT Limited.

Update: Engine has blown. Currently at Horizontal Motor Sports.

Engine

DOHC - Double Over Head Cam

EJ255 Version 1: Used in the 2005 and 2006 Legacy, as well as the 2004 and 2005 Forester. This engine uses the AB440 shortblock, which is the same shortblock as the 2004–2006 STI EJ257. The heads on these EJ255 are the AB650s, while the US 04–06 STI is the familiar AB640/910. The cams are the same between the EJ255 Version 1 and the EJ257.

Maintenance

A list of things to check and/or change out.

Banjo bolt

Oil and filter

Popular recommendation seems to be Full Synthetic with turbo cars.

Fluid Change

Transmission and Rear differential

Both use synthetic 75W–90 gear oil. Make sure its GL–5 rated.

You’ll need 4QTs of fluid for the front and 1QT for the rear.

You will need a T70 Torx bit to take off the front drain plug. Remove dipstick, remove and clean plug, drain fluid, re-install plug, use funnel and fill, then re-install dipstick. Check levels afterwards.

The rear plugs are 1/2". A pump will be useful for flushing the rear fluids. Remove both plugs, drain, then pump/fill until fluid runs clean out of bottom hole, insert bottom plug, pump until fluid comes out of top hole, then plug top hole.

If you have a torque wrench:

Video of process Link to more information

Modifications

Uppipe

The stock uppipe comes with a catalytic converter that is known to disintegrate and send pieces into your turbo, which then feeds into your engine.

It should be replaced with an uppipe that does not have a catalytic converter and it does not require a ‘bung’ for the EGT sensor.

The EGT sensor is only there to monitor whether the cat is working properly. You can disconnect the sensor and use a resistor to trick the ECU to not throw a code.

Skid plate

Lift

Sway bar

Turbo

AccessPort

Wheels

Tires

Learn you some Systems

OSI levels

Open Systems Interconnection model, 1984

  1. Application Layer
  2. Presentation Layer
  3. Session Layer
  4. Transport Layer
  5. Network Layer
  6. Data Link Layer
  7. Physical Layer

1: Physical Layer

Transmission and reception of raw bit streams over a physical medium

2: Data Link Layer

Reliable transmission of data frames between two nodes connected by a physical layer

3: Network Layer

Structuring and managing a multi-node network, including addressing, routing and traffic control

4: Transport Layer

Reliable transmission of data segments between points on a network, including segmentation, acknowledgement and multiplexing

5: Session Layer

Managing communication sessions, i.e. continuous exchange of information in the form of multiple back-and-forth transmissions between two nodes

6: Presentation Layer

Translation of data between a networking service and an application; including character encoding, data compression and encryption/decryption

7: Application Layer

High-level APIs, including resource sharing, remote file access, directory services and virtual terminals

Responsibility

Where is your server running?

The levels of responsibility will vary between providers.

A provider often deals with the first four, sometimes five, levels.

As a Systems Engineer, I should know how to traverse the OSI model in to order to diagnose issues into their respective levels.

It is important to know which level an issue at so we can communicate with the appropriate people.

Tools

dig

Berkeley Internet Name Domain (BIND) package, 1984

$ dig @8.8.8.8 copiousinc.com +short
45.79.162.208
$ dig @8.8.8.8 copio.us any

; <<>> DiG 9.8.3-P1 <<>> @8.8.8.8 copio.us any
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2589
;; flags: qr rd ra; QUERY: 1, ANSWER: 16, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;copio.us.                      IN      ANY

;; ANSWER SECTION:
copio.us.      1799    IN      TXT     "google-site-verification="
copio.us.      1799    IN      MX      20 alt1.aspmx.l.google.com.
copio.us.      1799    IN      MX      30 aspmx5.googlemail.com.
copio.us.      1799    IN      MX      30 aspmx2.googlemail.com.
copio.us.      1799    IN      MX      10 aspmx.l.google.com.
copio.us.      1799    IN      MX      30 aspmx3.googlemail.com.
copio.us.      1799    IN      MX      20 alt2.aspmx.l.google.com.
copio.us.      1799    IN      MX      30 aspmx4.googlemail.com.
copio.us.      1799    IN      A       45.79.162.208
copio.us.      21599   IN      NS      ns10.dnsmadeeasy.com.
copio.us.      21599   IN      NS      ns14.dnsmadeeasy.com.
copio.us.      21599   IN      NS      ns11.dnsmadeeasy.com.
copio.us.      21599   IN      NS      ns15.dnsmadeeasy.com.
copio.us.      21599   IN      NS      ns12.dnsmadeeasy.com.
copio.us.      21599   IN      NS      ns13.dnsmadeeasy.com.
copio.us.      21599   IN      SOA     ns10.dnsmadeeasy.com.

;; Query time: 87 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Tue May 17 18:21:08 2016
;; MSG SIZE  rcvd: 468

See also: whois, nslookup, host

ping

Mike Muuss, 1983

The Internet Control Message Protocol (ICMP) is one of the main protocols of the Internet.

64$ ping -c3 45.79.162.208
PING 45.79.162.208 (45.79.162.208): 56 data bytes
64 bytes from 45.79.162.208: icmp_seq=0 ttl=48 time=83.227 ms
64 bytes from 45.79.162.208: icmp_seq=1 ttl=48 time=83.087 ms
64 bytes from 45.79.162.208: icmp_seq=2 ttl=48 time=82.906 ms

--- 45.79.162.208 ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 82.906/83.073/83.227/0.131 ms

See also: traceroute, arp

curl

Daniel Stenberg, 1997 (Wget was 1996)

$ curl -IL --header 'Host: www.copio.us' 45.79.162.208
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Wed, 18 May 2016 01:04:25 GMT
Content-Type: text/html
Content-Length: 178
Connection: keep-alive
Keep-Alive: timeout=20
Location: http://copio.us/

HTTP/1.1 200 OK
Server: nginx
Date: Wed, 18 May 2016 01:04:25 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Keep-Alive: timeout=20
...

See also: wget, lynx

ps

Branko Lankester, 1994

$ ps -f -u www-data,reid
UID        PID  PPID  C STIME TTY          TIME CMD
www-data  1044  1043  0  2015 ?        00:00:00 php-fpm: pool www
www-data  1045  1043  0  2015 ?        00:00:00 php-fpm: pool www
www-data  1046  1043  0  2015 ?        00:00:00 php-fpm: pool www
www-data  1047  1043  0  2015 ?        00:00:00 php-fpm: pool www
reid     32261     1  0  2014 ?        00:00:12 SCREEN
reid     32262 32261  0  2014 pts/2    00:00:00 /bin/bash

See also: top, htop, pgrep

netcat

Hobbit or Giovanni Giacobbi (GNU netcat), 1995

$ netcat -v cache3.dfw.z.com 6383
Connection to cache3.dfw.z.com 6383 port [tcp/*] succeeded!
>KEYS *
*264
$65
zc:k:alphanumericDB_PDO_MYSQL_DDL_z_saleswarp_order_status_1
$41
zc:k:zzZend_LocaleC_nb_NO_language_nb
^C

$ netcat -v cache3.dfw.z.com 6386
netcat: connect to cache3.dfw.z.com port 6386 (tcp) failed: Connection refused

See also: telnet

netstat

Fred Baumgarten, 1999

deploy@cache3:~$ sudo netstat -plnt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address      Foreign Address State
PID/Program name
tcp        0      0 10.150.0.20:6381   *:*             LISTEN 7523/redis-server
tcp        0      0 10.150.0.20:6382   *:*             LISTEN 7532/redis-server
tcp        0      0 10.150.0.20:6383   *:*             LISTEN 7541/redis-server
tcp        0      0 10.150.0.20:6384   *:*             LISTEN 7550/redis-server
tcp        0      0 10.150.0.20:6385   *:*             LISTEN 11365/redis-server
tcp6       0      0 [::]:6381          [::]:*          LISTEN 13392/redis-server
tcp6       0      0 [::]:6382          [::]:*          LISTEN 13424/redis-server
tcp6       0      0 [::]:6383          [::]:*          LISTEN 13462/redis-server
tcp6       0      0 [::]:6384          [::]:*          LISTEN 13500/redis-server

See also: lsof

Homework

Information

Chicken Tikka Masala

Prep time: 15 mins

Cook time: 8 hours

Total time: 8 hours 15 mins

Serves: 6–8

Ingredients

Instructions

Place everything up to the bay leaves in a large bowl. With a spatula, stir to combine everything and make sure the chicken is coated well.

Gently place the mixture in the insert of the crockpot and add the two bay leaves.

Cover and cook for 8 hours on low (or 4 hours on high).

When done, in a medium bowl, whisk together heavy cream and corn starch, then pour the mixture into the crockpot and gently stir. Let cook an additional 20 minutes to thicken up. Squeeze half a lemon over the mixture then stir to incorporate.

Serve hot over a bed of white (or brown) rice.

Store leftovers in an airtight container in the fridge for up to 5 days.

Bishop

Clothing

long johns

boxers

shorts

pants

socks

shirts

jacket

puffy

beanie/hoodie

slip-in shoes/strapped sandals

Food

mug

plate/fork

knife

stove

gas

coffee grinder

coffee filters

drip cup

space food

mini weber and briquettes

Breakfast

black tea

coffee

oats

peanut butter

Snack

apples

bananas

dried fruit

peanut butter

nutella

protein bars

jerky

pb and j sandwiches

green tea

Dinner

beans

sausages

beef

mac and cheese

Camp

5gal water

water bottle

chair

hatchet

headlamp

pillow

sleeping bag

sleeping pad

tent

tent foot

shovel

hammock

trash bags

newspaper and firewood

lighter

Hygiene

dish/clothes detergent

wet wipes

pack towel

bandages

hair ties

toe clippers

hand salve

tooth brush

tooth paste

chapstick

toilet paper

Off day

sunglasses

books

camera and film

swim trunks

tennis ball

frisbee

pen and journal

Climbing items

crag bag

guide book

shoes

harness

helmet

chalk

crash pads

belay gloves

belay glasses

rope

quadlette

stick clip

PAS

ATC w/ autoblock

quick-draws

tape

Using Let’s Encrypt

Go use Let’s Encrypt, it’s an free and easy method of creating trusted certificates.

Installation

#TODO

Automatic Renewal

Here’s a small cron script to automatically renew a certificate at 00:00 on the first day of every month.

$ cat /etc/cron.d/letsencrypt-renewal
0 0 1 * * root systemctl stop nginx && sleep 1 && letsencrypt certonly -t --standalone -d colbyolson.com --email colby@colbyolson.com --renew-by-default && systemctl start nginx

Recovering a PogoPlug

Several weeks ago I made a few untested sshd config changes and managed to lock myself out of my PogoPlugv4. Due to the PogoPlug not having a display port, I had to resort to editing the files on my MacBookPro.

The problem here is that my laptop is running x64, but the PogoPlug is running ARM. So using Virtualbox wont work, it only supports x86 and x64. However, we can use QEMU to emulate a machine with ARM architecture.

This post assumes you’re using OSX for your host computer and that you’ve installed your PogoPlug OS on a SATA drive.

If you’re using Linux, replace brew with whatever package manager you have. These directions might work as-is if you installed the PogoPlug OS on a USB drive.

Dependencies

How

Go install brew, then use it to install QEMU.

$ brew install qemu

Download an ARM OS image, kernel, and initrd.

$ wget https://people.debian.org/~aurel32/qemu/armel/debian_wheezy_armel_standard.qcow2
$ wget https://people.debian.org/~aurel32/qemu/armel/vmlinuz-3.2.0-4-versatile
$ wget https://people.debian.org/~aurel32/qemu/armel/initrd.img-3.2.0-4-versatile

Here are the hashes if you’re that sort of person.

4b830c500591181e3af2d832da39f1ba  debian_wheezy_armel_standard.qcow2
ed7c39ec86e759240bdddd783248ed8b  initrd.img-3.2.0-4-versatile
3bdf3393243e65bd862b1398a494134a  vmlinuz-3.2.0-4-versatile

Plug the SATA drive into the host machine using the USB adaptor. OSX might not recognize the drive, that’s ok. Once it’s plugged in, search for it’s location.

$ diskutil list

Run QEMU with the USB drive attached. In this case /dev/disk1s1 means disk1 with partition 1. This could be different for you.

$ sudo qemu-system-arm -M versatilepb -kernel vmlinuz-3.2.0-4-versatile -initrd initrd.img-3.2.0-4-versatile -hda debian_wheezy_armel_standard.qcow2 -append "root=/dev/sda1" -usbdevice disk:/dev/disk1s1

Now ssh into the VM as root, the password is root. Find, mount, and chroot the USB drive. <USB> being the USB drive.

$ fdisk -l
$ mkdir /tmp/pogo
$ mount /dev/<USB> /tmp/pogo
$ chroot /tmp/pogo /bin/bash

Maybe you need to fix sshd_config, like I did.

$ vim /etc/ssh/sshd_config

Unmount the drive and shutdown the VM. The USB drive will then return to the host machine, where we can safely eject it using Disk Utility.

$ umount /tmp/pogo
$ shutdown -h now

Go plug that SATA drive back into your PogoPlug and pray to Stallman that everything works.

Big thanks to aurel32 for hosting. If the files linked above go missing, you can download them from me, under /media/assets/*. Yes, I’m purposely not linking to them because of crawlers.