15,025 karma · joined Apr 22, 2012 (14y ago) · 2,479 submissions
comment 9y ago · link · parent
vim can be thought of as a visual and interactive helper for your text-processing utilities. The "intended scope" of vim is text editing, and while you're editing you may want to run commands on the text in your buffer, or just parts of it, and have the results apply immediately without writing and reloading the file, or exiting.
For example, in vim, you may be writing a list somewhere in your document, and you realize you want it sorted alphabetically. You can visually select the range of lines ('<,'>) that comprise the list and then sort them by calling the sort utility [1]:
:'<,'>!sort
And then you can continue adding to the list.What would your workflow be for the above? Some like this...?
1. write the file you are working on in your EDITOR
2. make a mental note of the absolute line numbers for the list in the document
3. open new terminal
4. call an awk command that uses `sort`, or some other script, passing in your line numbers, and the file name
5. switch back to EDITOR and reload file
----
[1] Of course vim has its own `sort` command, so you can leave out the '!' in that example to do the same.
vi did not have its own `sort`, so people used the external `sort`. vi also didn't have the visual selection, so people could pick lines using ranges:
:.,+10!sort
i.e. sort from the current line to the line 10 lines down, inclusive1952.
Demolition of Tianjin’s old city(bricoleurbanism.org ↗)
2 points · by oftenwrong · 9y ago · discuss
1953.
Bikeshare company Bluegogo may launch in San Francisco without permits(sfexaminer.com ↗)
1 points · by oftenwrong · 9y ago · discuss
comment 9y ago · link · parent
68g, 20L, silnylon
http://www.seatosummit.com/product/?item=Ultra-Sil%26reg%3B+...
Possibly my favourite of my many backpacks. It scrunches up to the size of a clementine, making it an ideal secondary bag to keep in one's main bag when travelling. It can be worn under a jacket to inconspicuously carry a laptop in areas with pickpockets.
1957.
Why Washington DC's Metro should not have bought the 7000 series railcars(ggwash.org ↗)
3 points · by oftenwrong · 9y ago · 1 comment
comment 9y ago · link · parent
Developers are often aware of solutions that do not occur to the business people. A business person might think we are being as efficient as we can be in process P, but then a developer may come along and say we can automate parts of process P by implementing solution S, for example.
A lot of the time this sort of thing does not happen in the scheduled, structured meetings, or in email chains, or in video conferences. It happens when people in the office approach each other "out of the blue" and decide to grab a conference room and work something through face-to-face.
comment 9y ago · link · parent
[1] http://www.lowtechmagazine.com/2008/10/led-light-cfl-b.html
comment 10y ago · link · parent
comment 10y ago · link · parent
1972.
Abuse Protocols to Load Files, Bypass the HTML5 Sandbox, Open Popups and More(brokenbrowser.com ↗)
5 points · by oftenwrong · 10y ago · discuss
comment 10y ago · link · parent
comment 10y ago · link · parent
--
Concrete example:
I am in Massachusetts. Currently, Massachusetts observes two UTC offsets during the year. Eastern Daylight Time (EDT), which is UTC-4, and Eastern Standard Time (EST), which is UTC-5. EDT is our time zone for Daylight Savings Time (DST).
Currently, there is some discussion about how much this arrangement sucks due to the early sunsets we experience being on the edge of the time zone. Some (including myself) are pushing for Massachusetts to switch to Atlantic Standard Time (AST), which would keep us at UTC-4 all year.
So, let's say I want to schedule a meeting for November 18th, 2019 at 12pm in Cambridge, Massachusetts. I want a reminder 15 minutes before the meeting so that I do not miss it. I put that into your scheduling system, and you store it as the UTC datetime 2019-11-18T17:00:00Z because Massachusetts' current time zone observance rules say it will be in UTC-5 on November 18th, 2019.
Now, let's say I get my wish, and Massachusetts switches to AST year-round some time between now and my scheduled meeting. When 2019-11-18 comes around, Massachusetts will not be in UTC-5, as predicted, but in UTC-4! I will receive my meeting reminder at 12:45pm local time, a full hour after I wanted to receive it, and I will have missed my meeting.
--
There are different ways around this, such as storing the datetime with the predicted UTC offset, or storing a localtime (time-zone-less datetime) and the location of the event. The key point is that you need to be able to account for calendar changes.
Of course, there is no fool-proof way to store a future date. For all we know, 12pm November 18th, 2019 may not ever occur in Massachusetts because some decision may cause the commonwealth to switch forward past that time entirely. A calendar change could cause even more bizarre situations. In the British Empire, the day after September 2nd, 1752 was September 14th, 1752 due to the adoption of the Gregorian Calendar. Realistically, you are not going to be able to account for that sort of calendar change, but time zone observances change all the time.
comment 10y ago · link · parent
comment 10y ago · link · parent
There's no way to stop autoplay if we allow free, programmatic access to videos (without blocking js too, which I use noscript for).
I had the same problem with the 'loop' attribute. I wanted videos to not loop. I found that some sites loop videos without using the 'loop' attribute. I would disable 'loop' on the <video>, but the <video> would be replaced by a new autoplaying <video> when the original video ended.
This is about the point that I gave up on my extension.
comment 10y ago · link · parent
When I'm outdoors and active, I am so much happier. If I am on a multi-day outdoor trip to hike or rock climb, I feel like a completely different person. This is especially true on long trips that last more than a week. I have much less stress. I smile compulsively, instead of baring my usual strained expression. I have more energy. You might think at first that is simply because I am on vacation and I don't have to think about work obligations, but when I am on a normal (non-outdoor) type of vacation, I don't get the same feeling at all. I think it has more to do with the outdoor environment and physical activity.
I recently met someone who works as a park ranger, and I became envious of her job. I would love to patrol the woods all day as a ranger, or to be a mail carrier walking from house to house. I make much more money as a programmer, but "money cannot buy happiness", and I wonder often if I should change course.