Shared posts

16 Jul 00:16

#1756 – Emoji

by Chris

#1756 – Emoji

16 Jul 00:16

Sucker.

It was only a matter of time. If the vacuum didn't get him, the mail carrier would've.
16 Jul 00:16

An Apple for a Dollar

I'd like 0.4608 apples, please.
16 Jul 00:16

Alienware

Alienware I find this plausible.

source: RaphComic


See more: Alienware
12 Jul 17:56

The story of the last survivor of the Atlantic slave trade

by Jason Kottke

In the late 1920s & early 1930s, African-American writer Zora Neale Hurston interviewed an Alabama man named Cudjo Lewis about his life. Lewis was the last survivor of the last slave ship to arrive in America in 1860, decades after the international slave trade had been made illegal in the US. Hurston attempted to publish Lewis’ story as a book, but her extensive use of Lewis’ “unique vernacular” kept publishers away. Last month, Barracoon: The Story of the Last “Black Cargo” was finally published.

In 1927, Zora Neale Hurston went to Plateau, Alabama, just outside Mobile, to interview eighty-six-year-old Cudjo Lewis. Of the millions of men, women, and children transported from Africa to America as slaves, Cudjo was then the only person alive to tell the story of this integral part of the nation’s history. Hurston was there to record Cudjo’s firsthand account of the raid that led to his capture and bondage fifty years after the Atlantic slave trade was outlawed in the United States.

In 1931, Hurston returned to Plateau, the African-centric community three miles from Mobile founded by Cudjo and other former slaves from his ship. Spending more than three months there, she talked in depth with Cudjo about the details of his life. During those weeks, the young writer and the elderly formerly enslaved man ate peaches and watermelon that grew in the backyard and talked about Cudjo’s past-memories from his childhood in Africa, the horrors of being captured and held in a barracoon for selection by American slavers, the harrowing experience of the Middle Passage packed with more than 100 other souls aboard the Clotilda, and the years he spent in slavery until the end of the Civil War.

Cudjo Lewis

Vulture has an excerpt of the book.

De King of Dahomey, you know, he got very rich ketchin slaves. He keep his army all de time making raids to grabee people to sell. One traitor from Takkoi (Cudjo’s village), he a very bad man and he go straight in de Dahomey and say to de king, “I show you how to takee Takkoi.” He tellee dem de secret of de gates. (The town had eight gates, intended to provide various escape routes in the event of an attack.)

Derefore, dey come make war, but we doan know dey come fight us. Dey march all night long and we in de bed sleep. It bout daybreak when de people of Dahomey breakee de Great Gate. I not woke yet. I hear de yell from de soldiers while dey choppee de gate. Derefore I jump out de bed and lookee. I see de great many soldiers wid French gun in de hand and de big knife. Dey got de women soldiers too and dey run wid de big knife and dey ketch people and saw de neck wid de knife den dey twist de head so it come off de neck. Oh Lor’, Lor’! I see de people gittee kill so fast!

There’s an audiobook version as well…I bet it’s amazing to listen to.

Tags: Barracoon   books   Cudjo Lewis   slavery   USA   Zora Neale Hurston
11 Jul 19:01

Netflix Smart Downloads feature will automatically save your next episode

by Evan Selleck

Netflix introduced the ability to download some of its content for offline viewing back in 2016, and it’s getting another new feature to make watching content offline even easier.

If you have ever been in a situation where you’ve forgotten to download the next episode of the show ahead of a trip, Netflix wants to help fix that with a new Smart Downloads feature. This will automatically delete an episode of the TV show you’re watching after you’ve finished it, then automatically download the next episode so that it’s ready to watch when you are.

The download will happen in the background, so it should happen without you having to actually do anything. You will need to be connected to Wi-Fi to download the episode, and because this is a feature specifically designed for TV shows, it won’t work for movies.

According to Netflix, the Smart Downloads feature is rolling out for Android devices right now. It will also be available for iOS users later this year. And if you aren’t a fan of the feature, it can be disabled.

What do you think of Smart Downloads? Will you use it often?

11 Jul 19:01

YouTube for Android is getting an Incognito mode

by Evan Selleck

Google Chrome has had an Incognito mode for quite some time now, and it looks like that particular feature is about to make the jump over to the YouTube app.

The YouTube app for Android will be getting its own Incognito mode today. Similar to the way the feature works for Chrome, Incognito mode on YouTube will mean those who activate the feature will not have to worry about what they watch showing up in their search or viewing history.

To turn on Incognito mode, YouTube users will need to head into the Account section within the app, then select the “Turn on Incognito mode” option. Google is now widely rolling out the feature for YouTube on Android, notes 9to5Google, so if you don’t see it right now keep an eye out. Once you do have the feature and you switch it on, there will be a bar that shows at the bottom of the screen to let the viewer know they are in the specific mode.

Incognito mode won’t keep track of your viewing history, with those stats getting wiped when you exit the mode. Incognito mode will automatically deactivate after a set period of inactivity. Google does caution that “your activity might still be visible to your employer, school, or internet service provider”, so keep that in mind.

One other thing to be aware of: While you are using Incognito mode, you can only watch videos from the Trending and Home tabs. You won’t be able to save videos to your playlists and you won’t be able to access your inbox, subscriptions, or your library.

11 Jul 19:01

Wall Art

At first, I moved from pokémon posters to regular oil paintings, but then these really grumpy and unreasonable detectives from the Louvre showed up and took them all. They wouldn't even give me back my thumbtacks!
11 Jul 19:01

RL is the Worst

RL is the Worst

 

LULZ... real life really is the worst...

RL is the Worst


Follow us on:
 

July 11 2018
10 Jul 11:45

iOS 11.4.1 Blocks USB Passcode Cracking Tools

by John Gruber
Dan Jones

This is really cool. I hope it gets copied in Android.

Chris Welch, writing for The Verge:

Apple today released iOS 11.4.1, and while most of us are already looking ahead to all the new stuff coming in iOS 12, this small update contains an important new security feature: USB Restricted Mode. Apple has added protections against the USB devices being used by law enforcement and private companies that connect over Lightning to crack an iPhone’s passcode and evade Apple’s usual encryption safeguards.

Great news and an elegant solution.

09 Jul 23:55

Stargazing 2

I mean, it wasn't exactly MY thesis. When the FAA came to shut down our observatory for using the telescope mirror to shine light at airplanes, I took a thesis and a bunch of doctorates from the supply cabinet on my way out.
09 Jul 23:55

#1755 – Accounting

by Chris

#1755 – Accounting

09 Jul 23:55

Say Your Prayers.

It's my job to help people meet their maker.
09 Jul 23:55

itty.bitty

by Robin Rendle

Mark this down as one of the strangest things I’ve seen in a good long while. Nicholas Jitkoff has made a tool called itty.bitty that creates websites with all of the assets being contained within their own link. You can create a website without any HTML or CSS resources at all because it’s all been base64 encoded into the URL itself.

Take this crazy looking URL, for example:

https://itty.bitty.site/#How_it_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

This link contains all of the HTML and CSS that makes up the website. The really cool thing about this is that you don’t need a server to make an itty.bitty site — once you paste the link above into the browser it’ll fetch some code from the itty bitty domain then extract and inflate the data from there.

I’m not entirely sure how useful this is but it’s certainly a novel concept to me! Go ahead and start making your own itty.bitty sites.

Direct Link to ArticlePermalink

The post itty.bitty appeared first on CSS-Tricks.

07 Jul 00:36

Photo



07 Jul 00:36

Super Mario Rolling Pin

Super Mario Rolling Pin

 

WANT! Turn your kitchen into the Mushroom Kingdom with this awesome Super Mario Molded Rolling Pin! Emboss cookies, pies and fondant with Mario, Luigi, Princess Peach, Yoshi and more...

Super Mario Rolling Pin

Super Mario Rolling Pin

Super Mario Rolling Pin

Super Mario Rolling Pin

Super Mario Rolling Pin

Super Mario Molded Rolling Pin available here!


Follow us on:
 

July 05 2018
07 Jul 00:36

Bot Writes a Bob Ross Video

Bot Writes a Bob Ross Video

 

Ok so this is the best one yet! Keaton Patti (the genius behind the AI Saw script and the AI Olive Garden commercial) forced an AI to watch Bob Ross' show The Joy of Painting over and over and then had it write a script for an episode of it's own...

Bot Writes a Bob Ross Video
Bot Writes a Bob Ross Video
Bot Writes a Bob Ross Video

Source: Keaton Patti

Follow us on:
 

July 05 2018
07 Jul 00:36

Google’s keyword voids

by Tim Carmody

This was a new term for me:

keyword void, or search void, n.: a situation where searching for answers about a keyword returns an absence of authoritative, reliable results, in favor of “content produced by a niche group with a particular agenda.”

An article by Renee DiResta at Wired uses the example of Vitamin K shots, a common treatment given to newborn babies at hospitals, but whose top search results are dominated by anti-vaccination groups.

There’s an asymmetry of passion at work. Which is to say, there’s very little counter-content to surface because it simply doesn’t occur to regular people (or, in this case, actual medical experts) that there’s a need to produce counter-content. Instead, engaging blogs by real moms with adorable children living authentic natural lives rise to the top, stating that doctors are bought by pharma, or simply misinformed, and that the shot is risky and unnecessary. The persuasive writing sounds reasonable, worthy of a second look. And since so much of the information on the first few pages of search results repeats these claims, the message looks like it represents a widely-held point of view. But it doesn’t. It’s wrong, it’s dangerous, and it’s potentially deadly.

I wondered what other examples of keyword voids might be out there, so I searched for it. Unsurprisingly — in retrosepect — you don’t get a lot of relevant results. It’s mostly programming talk, when you literally want a function to return no results.

Tags: Google   medicine
06 Jul 14:23

Batman’s Wedding

by Tim Carmody

Batman (2016-) 050-024.jpg

Wonder Woman aside, DC’s recent movies haven’t been very good, but their recent comics have been extraordinary. In particular, writer Tom King has two contemporary masterpieces running side by side, the accessible-but-oh-so-intelligent Batman and the experimental/psychological war-and-family comic Mister Miracle.

Batman has been building beautifully towards Batman’s wedding to Catwoman, culminating in this week’s 50th issue. The ending was spoiled three days early in an article in the New York Times’ Vows column — Abraham Riesman has an interview at Vulture with the author, who regrets the spoilage — but the comic holds up beautifully, even if you know how it ends.

It’s filled with gorgeous artwork from artists who’ve played a key part in Batman and Catwoman’s history together, and each page acts as a kind of counterpoint to the one opposite it. (Writers and other important figures from the Batman mythos get their head nods elsewhere, as names of buildings, streets, and rooms in Wayne Manor.) And it has its share of moving moments, like this quiet embrace between Bruce Wayne and Alfred.
Batman (2016-) 050-028.jpg
The real thrill is probably in the run-up, which you can read in trade paperbacks now. My favorite issue might be number 36, where Superman and Batman separately explain to Lois Lane and Catwoman, respectively, what they admire about each other. I mean, this is just superhero nerd gold.

Batman (2016-) 036-018.jpg

This is all to say: despite some blockbuster fatigue, I think we’re still quite far from exhausting superheroes as a concept. Every time I think we’re there, someone comes up with rich, thoughtful, emotionally moving stories that bring me right back again.

Tags: comics   superheroes
06 Jul 14:23

One Talk to rule them all

by CommitStrip

04 Jul 23:34

Cave Drawing

by ray

Cave Drawing

04 Jul 23:33

Rosa Parks’s Arrest Warrant

by Tim Carmody

A courthouse intern on a housecleaning project named Maya McKenzie turned up a slew of rarely-seen original documents of the Montgomery Bus Boycott. They include Rosa Parks’s arrest warrant and court records, as well as a bond posted for Martin Luther King Jr. on charges of conspiracy, and more.

“A lot of times in our schools, when we teach about the movement, it’s all centered around one person, one figure, but what this does is open up that world to give the back story, to let them know that there were so many people that were involved,” said Quinton T. Ross Jr., the president of Alabama State, a historically black university, where a professor once used a mimeograph machine to run off thousands of fliers announcing the boycott.

montgomery-documents-4-superJumbo.jpg

What’s odd is that the records appeared to have already been gathered together, but not for any clear reason. They had never been made public.

Tags: civil rights   history
04 Jul 23:33

#1752 – Hungry

by Chris

#1752 – Hungry

04 Jul 23:33

Classic WTF: Common Sense Not Found

by Ellis Morning
It's the Forth of July in the US, where we all take a day off and launch fireworks to celebrate the power of stack based languages. While we participate in American traditions, like eating hot dogs without buns, enjoy this classic WTF about a real 455hole. --Remy

Mike was a server admin at your typical everyday Initech. One day, project manager Bill stopped by his cube with questions from Jay, the developer of an internal Java application.

“Hello there- thanks for your time!” Bill dropped into Mike’s spare chair. “We needed your expertise on this one.”

“No problem,” Mike said, swiveling to face Bill. “What can I help with?”

Bill’s pen hovered over the yellow notepad in his lap. He frowned down at some notes already scribbled there. “The WAS HTTP server- that’s basically an Apache server, right?”

HTTP Error 455 - User is a Jackass

“Basically,” Mike answered. “Some IBM customizations, but yeah.”

“So it has a… HT Access file, or whatever it’s called?” Bill asked.

He meant .htaccess, the config file. “Sure, yeah.”

“OK.” Bill glanced up with wide-eyed innocence. “So we could put something into that file that would allow a redirect, right?”

“Um… it’s possible.” Uneasiness crept over Mike, who realized he was about to discuss a custom solution to a problem he didn’t know about, on a server he was responsible for. “What’s going on?”

“Well, Jay wants a redirect in there to send people to another server,” Bill replied.

Mike frowned in confusion. “We just stood this server up. Now he wants another domain?”

“Huh? Oh, no, It’s not our domain. It’s someone else’s.”

“OK… I’m lost,” Mike admitted. “Let’s start at the beginning. What’s the problem Jay wants to fix?”

“Well, he has this broken link in his app, and he wants to redirect people to the correct site,” Bill explained.

Mike stared, dumbfounded for several moments. “Excuse me?”

“Yeah. He has this link that points off to some external federal website- IRS, I think- and the link is broken. He wants to automatically redirect users to the correct site so they don’t get a 404 error. We started looking into it, and found that Apache has this HT Access file thingy. It looks like that’s what we need.”

“You’re kidding, right?” Mike blurted ahead of discretion.

“No. Why?” Bill’s eyes widened. “Something wrong?”

Mike swiveled around to retrieve his coffee mug, and a measure of composure. “Why doesn’t he just fix the link within the app so it points to the right URL?”

“Well, that’s what I asked him. But he thinks it’d be more convenient to redirect people.”

“If the link is updated, they won’t need to be redirected.”

“I realize that.”

Mike took a long swig. “That’s not what the .htaccess file is for. It’s meant to redirect an incoming request to a different server of your own, not someone else’s.”

“Oh.” Bill scribbled this down on his notepad, then stared hard at the scribbles. Every moment of silence ratcheted Mike’s nervousness higher.

“So you’re saying we can’t do the HT Access thing?” Bill finally asked, looking up again.

“To fix a broken link?”

“Yeah!” Bill’s eyes lit up. Apparently, Mike’s clarifying question had given him new hope.

“No.” Mike crushed that hope as mercilessly as he could.

“OK, so the HT Access thing won’t work. Hmm, OK.” Bill frowned back down at his notes, falling silent again. Mike sensed, and dreaded, another inane line of questioning about to follow.

“Well, another thing Jay mentioned was a custom error page,” Bill’s next foray began. “Can we do that in Apache?”

Mike hesitated. “…Yes?”

“Great! I’ll tell him that. He can develop a custom 404 page with some Javascript in it or something to redirect people to the correct site.”

“Huh?”

“Not the prettiest solution, I know, but Jay said he can make it work.”

Mike spoke slowly. “He’s going to create a custom 404 error page… for that broken link of his?”

“Yeah.”

“And that 404 page is supposed to display… when his broken link sends users off to some IRS web server?”

“Yeah.”

“The IRS web server, when it gets a request for a page that doesn’t exist, is gonna display Jay’s custom 404 error page. Is that what you’re telling me?”

Bill’s confidence faltered. “Um… I think so.”

Mike dropped the bomb. “How’s he gonna get that custom page onto their server?”

“Well, it’d be on our server.”

“Right! So how would that custom 404 error get displayed?”

“When the user clicks the broken link.”

“I asked how. You just answered when.”

“Well, OK, I don’t know! I’m not the developer here.” Bill’s hands rose defensively. “Jay said he could make it work.”

“He’s wrong!” Mike snapped.

“He was pretty confident.”

Mike hesitated a moment before his shoulders dropped. Facts and common sense were not to prevail that day. “OK then. Lemme know when it works.”

Bill perked up. “Really? You’ll put it on the server?”

“Sure. Just have him fill out a service request and I’ll deploy it.”

“Excellent! Thank you!” Bill jumped up with pleasant surprise, and left the cube.


A few days later, Mike was completely unsurprised to find Jay frowning into his cube. “My 404 page isn’t displaying!”

Mike created a new email addressed to Jay, then copied and pasted a link to the IRS Help and Resources page. “Sorry- you’ll have to take it up with the taxman.”

[Advertisement] Continuously monitor your servers for configuration changes, and report when there's configuration drift. Get started with Otter today!
02 Jul 21:38

Build-Your-Own Casket Kit

by info@dudeiwantthat.com Erin Carstens
02 Jul 20:53

Hidden treasures of Amsterdam’s river

by Tim Carmody

Amsterdam Objects.png

Between 2003 and 2012, civil engineers in Amsterdam excavated a brand-new North-South metro line along the banks of the river Amstel. A website (thankfully available in Dutch and English) documents what they found.

Rivers in cities are unlikely archaeological sites. It is not often that a riverbed, let alone one in the middle of a city, is pumped dry and can be systematically examined. The excavations in the Amstel yielded a deluge of finds, some 700,000 in all: a vast array of objects, some broken, some whole, all jumbled together. Damrak and Rokin proved to be extremely rich sites on account of the waste that had been dumped in the river for centuries and the objects accidentally lost in the water. The enormous quantity, great variety and everyday nature of these material remains make them rare sources of urban history. The richly assorted collection covers a vast stretch of time, from long before the emergence of the city right up to the present day. The objects paint a multi-facetted [sic] picture of daily life in the city of Amsterdam. Every find is a frozen moment in time, connecting the past and the present. The picture they paint of their era is extremely detailed and yet entirely random due to the chance of objects or remains sinking down into the riverbed and being retrieved from there. This is what makes this archaeological collection so fascinating, so poetically breathtaking and abstract at one and the same time.

If you don’t love browsing through lost IDs, credit cards, and everyday coins, a section called “Object Stories” highlights the more noteworthy finds: batteries from the 19th century, stoneware jugs and tankards from the 16th century, pieces of samurai swords, and more.

Tags: Amsterdam
02 Jul 20:52

Overdrawn.

It took me three months to complete the painting featured in this comic.
02 Jul 15:29

Hudson & Nintendo’s Obscure Japanese PC Games

I always learn something new after watching the Gaming Historian.

source: YouTube


See more: Hudson & Nintendo’s Obscure Japanese PC Games
02 Jul 12:41

CodeSOD: An Eventful Career Continues

by Remy Porter

You may remember Sandra from her rather inglorious start at Initrovent. She didn't intend to continue working for Karl for very long, but she also didn't run out the door screaming. Perhaps she should have, but if she had- we wouldn't have this code.

Initrovent was an event-planning company, and thus needed to manage events, shows, and spaces. They wrote their own exotic suite of software to manage that task.

This code predates their current source control system, and thus it lacks any way to blame the person responsible. Karl, however, was happy to point out that he used to do Sandra's job, and he knew a thing or two about programming. "My fingerprints are on pretty much every line of code," he was proud to say.

if($showType == 'unassigned' || $showType == 'unassigned' || $showType == 'new') { ... }

For a taster, here's one that just leaves me puzzling. Were it a long list, I could more easily see how the same value might appear multiple times. A thirty line conditional would be more of a WTF, but I can at least understand it. There are only three options, two of them are duplicates, and they're right next to each other.

What if you wanted to conditionally enable debugging messages. Try this approach on for size.

foreach($current_open as $key => $value) { if ($value['HostOrganization']['ticket_reference'] == '400220') { //debug($value); } }

What a lovely use of magic numbers. I also like the mix of PascalCase and snake_case keys. But see, if there's any unfilled reservation for a ticket reference number of 400220, we'll print out a debugging message… if the debug statement isn't commented out, anyway.

With that in mind, let's think about a real-world problem. For a certain set of events, you don't want to send emails to the client. The planner wants to send those emails manually. Who knows why? It doesn't matter. This would be a trivial task, yes? Simply chuck a flag on the database table- manual_emails and add a code branch. You could do that, yes, but remember how we controlled the printing of debugging messages before. You know how they actually did this:

$hackSkipEventIds = array('55084514-0864-46b6-95aa-6748525ee4db'); if (in_array($eventId, $hackSkipEventIds)) { // Before we implement #<redacted>, we prefer to skip all roommate // notifications in certain events, and just let the planner send // manual emails. return; }

Look how extensible this solution is- if you ever need to disable emails for more events, you can just extend this array. There's no need to add a UI or anything!

[Advertisement] Utilize BuildMaster to release your software with confidence, at the pace your business demands. Download today!
01 Jul 23:48

SOG CashCard Folding Knife

by info@dudeiwantthat.com Erin Carstens