500 stories
·
67 followers

introducing folder profiles for bash and powershell (secretGeek.net)

1 Share
ok

Summary: a .ok file holds a bunch of handy one-liners, specific to the folder it is in. It can be viewed or executed with a simple command. It makes you smarter and more efficient.

I work on lots of little projects and each one has its own nuances and tricks. Context switching from one project to the next is hard on the brain. Some projects are brand new, some are ten years old. Some are in Windows, some are in Linux.

Every time I go to resume work on a project there is that moment of confusion as the brain tries to reload a dusty tape of facts from cold storage.

To make it easier to recall all pertinent facts, I've started putting a little file called ".ok" in each project. This file holds any relevant shell commands I use with that project. (I have a powershell version and a bash version)

For example here's the .ok file from my "Today I Learned" project:

.\quick.ps1; .\deploy.ps1; # quick-build, prepare to deploy
.\build.ps1 # complete build, after which you can see preview
_book\index.html # see preview
.\wordcount.ps1 # custom word count script

If I type the command "ok" then I will see a listing of this file with a number against each line:

> ok
1. .\quick.ps1; .\deploy.ps1; # quick-build, prepare to deploy
2. .\build.ps1 # complete build, after which you can see preview
3. _book\index.html # see preview
4. .\wordcount.ps1 # custom word count script

And if I type "ok 3" then it will run line number 3, like this:

> ok 3
> _book\index.html # see preview

(And in this case I'll see a HTML preview of the current state of the book)

To make "ok" extra useful, I've setup my system so that every time I navigate into any folder (via cd), the command "ok" is run immediately. So if there is a ".ok" file I'll immediately see the available commands. (I did this by removing the "cd" alias, and making a custom "cd" function that does a set-location followed by a call to "ok")

If I want to add a command to the file, it is the work of a moment. I can do it immediately by editing the ".ok" file with "ed" or any standard editor.

Source code is here:

"ok" folder profiles for bash

And here:

"ok" folder profiles for powershell

Sometimes I write a thing and slowly stop using it. Other times I use it more and more, day after day, year after year, as happened with NimbleText. So far, "ok" seems to be one of those "use it more and more" solutions. So I think you would do well to give it a try.

Any issues, lemme know.

Next → ← Previous

My book "Choose Your First Product" is available now.

It gives you 4 easy steps to find and validate a humble product idea.

Learn more.

Read the whole story
joshuapoehls
133 days ago
reply
Texas, Earth
Share this story
Delete

The DIY Astronaut

1 Share

Ever since he was a kid, Cameron Smith has wanted to go into space. This desire persisted into adulthood, and the Portland State archaeology professor has spent the past several years constructing a series of homemade pressurized spacesuits to achieve that dream. In this video, Smith talks about his quest and we witness his preparations for testing a spacesuit he built for under $1000 by taking it up in a balloon to a height of 63,000 feet.

You can read more about Smith and his project in the Journal of Critical Space Studies.

Smith’s journey to the upper atmosphere calls to mind the devil-may-care mindset typical of the early days of space exploration, when air force pilots on both sides of the Iron Curtain risked their neck to advance human spaceflight and secure military advantage in orbit. These pilots were the first humans to test experimental new pressure suits that were meant to sustain life in the upper atmosphere and beyond, and there was little assurance that they would ever return from these crucial tests alive.

And yes, you can totally buy old Russian and Soviet spacesuits on eBay.

Tags: Cameron Smith   space   video
Read the whole story
joshuapoehls
161 days ago
reply
Texas, Earth
Share this story
Delete

How seared is our nation’s conscience that she tolerates this cruelty?

1 Comment and 2 Shares

Two items have appeared in the news this week out of Virginia that ought to shock every decent person who sees them. Both of them involve elected officials in Virginia arguing for infanticide. And, no, I’m not being hyperbolic. I want you to see this for yourself to establish exactly what happened.

First, Virginia State Delegate Kathy Tran has proposed a bill that would guarantee a right to abortion even when the mother is in the process of giving birth in the 40th week. Republican legislator Todd Gilbert pressed the point in a hearing with Tran. You can watch the exchange above or read below:

Gilbert: So how late in the third trimester could a physician perform an abortion if he indicated it would impair the mental health of the woman?

Tran: Or physical health.

Gilbert: Okay. I’m talking about mental health.

Tran: I mean, through the third trimester. The third trimester goes all the way up to 40 weeks.

Gilbert: So to the end of the third trimester?

Tran: Yes. I don’t think we have a limit in the bill.

Gilbert: So where it’s obvious that a woman is about to give birth, she has physical signs that she’s about give birth, would that still be a point at which she could still request an abortion if she was so certified? [pause] She’s dilating?

Tran: Mr. Chairman, you know, that would be a decision that the doctor, the physician, and the woman would make.

Gilbert: I understand that. I’m asking if your bill allows that.

Tran: My bill would allow that, yes.

Yes, you read that correctly. Tran argues that it ought to be legal to kill a child at the 40th week as the child is coming through the birth canal. If it is surprising to you that such a thing is legal (even if rarely done), be surprised no more. This is exactly what Roe v. Wade and its companion decision Doe v. Bolton have established. Roe makes this kind of barbarism into a “constitutional right” through every stage of pregnancy—right up until the point of birth.

Second, if Tran’s testimony didn’t send chills up your spine, then this certainly will. The Democratic Governor of Virginia Ralph Northam went on a radio program this morning to defend Tran’s 40-week abortion bill. The host asked Governor Northam about Tran’s remarks the previous day. He was asked specifically about whether the bill allows a woman to have an abortion after she has gone into labor at the 40th week of pregnancy. This is what the Governor said:

If a mother is in labor, I can tell you exactly what would happen. The infant would be delivered. The infant would be kept comfortable. The infant would be resuscitated if that’s what the mother and the family desired, and then a discussion would ensue between the physicians and the mother. [emphasis mine]

You can watch Gov. Northam’s statement below:

Now just think about what this means. Governor Northam is going even further than Tran. He is saying that a fully delivered baby could be left to die on the operating table if that is what the mother and the physician want. A fully delivered baby!

How did we get to the point that we are considering whether or not to throw away the life a fully delivered baby? How did we get to the point that a fully delivered baby’s life may not be protected in law? I thought every person had an inviolable right to life under our Constitution? Well, apparently not according to Governor Northam.

If you have been paying attention to the abortion debate in America at all, none of this will be surprising to you. The pro-choice position excludes the unborn from the human community. It gives no consideration at all to the human life that is growing inside a mother’s womb. It says that a woman’s so-called “right to choose” trumps the right of another person not to be killed. That is the pro-choice position. It is no surprise that we now have a governor who is saying that a fully delivered baby’s life is disposable and subject to a woman’s “right to choose” as well.

The United States of America has the most liberal abortion laws on the planet, and that is due to Roe v. Wade. That infamous decision makes it legal to kill unborn people at any point during pregnancy up to and including the point of birth. Because of that, Roe v. Wade has presided over the killing of 60 million unborn human beings since 1973. That is the holocaust times ten. And now there is a Democratically elected governor who would expand this barbarism to include those children who survive birth. How seared is our nation’s conscience that she tolerates this cruelty?

The state of New York has recently passed a similar bill, and the state legislature cheered after its passage. It was an abominable display. I hope and pray that the same ugliness won’t make its way to the state of Virginia. If you live in Virginia, you need to call your representatives and oppose this with all your might. You need to flood their phone lines until this bill is stopped.

I am reminded that the pro-life cause has a long way to go. So many people in our nation have hardened their heart to the humanity and dignity of the weakest among us. Today is proof of that.


UPDATE: Senator Ben Sasse is virulent in his response to Governor Northern, and I sympathize with his consternation. He writes,

This is morally repugnant. In just a few years pro-abortion zealots went from ‘safe, legal, and rare’ to ‘keep the newborns comfortable while the doctor debates infanticide.’ I don’t care what party you’re from — if you can’t say that it’s wrong to leave babies to die after birth, get the hell out of public office.

Read the whole story
joshuapoehls
260 days ago
reply
Texas, Earth
Share this story
Delete
1 public comment
duerig
260 days ago
reply
As soon as the party of 'grab them by the pussy' and separating then neglecting actual children to death at our border repudiates Trump, I'll start taking their moral repugnance seriously again. Until then, they have about as much moral standing as a Pharisee.

Flight videos deconstructed

1 Share

This week’s post isn’t entirely scientific, but I thought I’d upload it anyway since it’s related to animals and patterns in nature. When I worked in an insect lab as an undergrad, I helped out with an experiment about mosquito larvae. As part of the process we used a Matlab program to manually input the larva’s location during thousands of video frames.

It was a fun experiment, and I wanted to make something similar from Youtube videos. I found slow-motion videos of five flying species, and mapped out specific points on the wings during one wingbeat. I ended up with 15 frames per wingbeat, and I connected every frame using imaginary curves that went through all of the 15 mapped points. Of course, 15 frames isn’t nearly enough for any kind of factual conclusion, so this week’s post is just an art exercise. But hopefully you can enjoy this as an artistic pattern based on real life.

Read the whole story
joshuapoehls
262 days ago
reply
Texas, Earth
Share this story
Delete

See the Millions of Places Migrating Birds Have Gone—in One Gif

1 Comment and 2 Shares

Ever wondered what bird migration looks like across the entire Western Hemisphere? Well, thanks to the visionaries at the Cornell Lab of Ornithology, now we know:

The gif is kind of hypnotizing, and definitely fun to watch. But what exactly are we looking at?

The dots are showing 118 different species of birds as they travel between their breeding and wintering grounds in North, Central, and South America. The routes are based off of millions of eBird observations from 2002 to 2014, mapped out and analyzed by Cornell scientists in a recent paper in Proceedings of the Royal Society B. (A numbered key for all the species is available.)  

By blending all the birds’ trajectories into one animation, the researchers were able to pick out four major migration patterns: clockwise, counterclockwise, intersecting, and transoceanic. They found that most species choose a clockwise loop that takes them over water and land (come September, watch how a big mass of dots leaps off the East Coast and into the ocean, before arching back over the tip of South America). Though this may seem like a detour, it’s actually the fastest track for birds, since it lets them ride some powerful tailwinds to their destinations. The clockwise migrators—Black-billed Cuckoos, Cape May Warblers, and Veerys, to name a few—tend to mix things up, too. They fly wide in fall, and take a more inland path in spring (see how fewer dots are venturing over the Atlantic in the first half of the year). Meanwhile, species that stick to a straighter route—Brown-chested Martins, Crowned Slaty Flycatchers, and Rusty Blackbirds are three examples—use the same itinerary to and from their breeding grounds. To test this trend, just pick a dot and follow it from start to beginning. If it moves along a steady slope—and doesn’t make you dizzy—then you’ve probably chosen an "intersecting" bird.

Finally, notice how a lot of the straight shooters are funneling through the Yucatan? That's because they're sidestepping geographic obstacles, like the Sierra Madre Mountains. Knowing that this bottleneck exists is really important: It can help us pinpoint where a big chunk of species are resting during migration, so we can make sure those habitats are up to snuff. And to state the obvious—it shows us that the isthmus is a top-notch birding spot.

Wow . . . all that from citizen science—and one very nifty gif.

Read the whole story
joshuapoehls
262 days ago
reply
Texas, Earth
Share this story
Delete
1 public comment
fxer
262 days ago
reply
Couple years old but I still love watching it
Bend, Oregon

Visualizing the Speed of Light

3 Shares

Light is fast! In a recent series of animations, planetary scientist James O’Donoghue demonstrates just how fast light is…and also how far away even our closest celestial neighbors are. Light, moving at 186,000 mi/sec, can circle the Earth 7.5 times per second and here’s what that looks like:

It can also travel from the surface of the Earth to the surface of the Moon in ~1.3 seconds, like so:

That seems both really fast and not that fast somehow. Now check out light traveling the 34 million miles to Mars in a pokey 3 minutes:

And Mars is close! If O’Donoghue made a real-time animation of light traveling to Pluto, the video would last over 5 hours. The animation for the closest undisputed galaxy, Seque 1, would last 75,000 years and 2.5 million years for the Andromeda galaxy animation. The farthest-known objects from Earth are more than 13 billion light years away. Light is slow!

See also The Leisurely Pace of Light Speed.

Tags: James O’Donoghue   astronomy   light   physics   science   space   video
Read the whole story
joshuapoehls
266 days ago
reply
Texas, Earth
Share this story
Delete
Next Page of Stories