Download Famous Art in High Resolution

Theoretically, I could slap my own name on this and no one could stop me. Eat it, Georges Seurat.
Image: Georges Seurat/Art Institute of Chicago

The Art Institute of Chicago recently revamped its website and released a searchable database of high-resolution art. Even better, a lot of the art is in the public domain, meaning you can legally use it however you want, even for commercial purposes. (Check the copyright notice on each artwork’s page.) You’ll notice that while you can zoom in on most of the artworks, only the public-domain art will include a full-resolution download link.

You’ll recognize artworks like “American Gothic,” Picasso’s “The Old Guitarist,” and Monet’s “Stacks of Wheat.” A lot of these, even the ones still under copyright, make for good desktop wallpapers.

Advertisement

For anything in the public domain, like the Monet, you can download the largest version, send it to a service like Framebridge, and have your own framed art print. Well, art print-out. But a classy one.

You could also, theoretically, use the public-domain art in an ad. Imagine the possibilities.

Or don’t.

Art Institute of Chicago online collection | via Metafilter


via Lifehacker
Download Famous Art in High Resolution

Sign Your Address Up For USPS Informed Delivery Before Scammers Do

Photo: Kevork Djansezian/Getty Images

If you haven’t signed up for the US Postal Service’s Informed Delivery service, you might want to do so now.

The service lets you see what’s expected to arrive in your mailbox soon. It’s great for knowing that a check or invite you’ve been waiting for is literally in the mail. And f you don’t sign up for it? You’re opening yourself up to someone signing up for the service as you and swiping your important mail before you ever see it.

On November 6th the Secret Service reportedly sent an internal alert to its law enforcement partners warning them of a scam where criminals would sign up for other people’s mailboxes and then steal credit cards from those people’s mailboxes, reports KrebsOnSecurity.

Advertisement

According to the report, seven people in Michigan used the service to apply for fraudulent credit cards and then steal those cards out of their recipient’s mailboxes. The mailbox owners never knew the cards were even applied for, much less stolen. In that case, the defendants were able to run up nearly $400,000 in charges on the stolen cards.

KrebsOnSecurity notes that any adult that lives at your address can sign up for an account, so if you do want to claim your address you should do so for every eligible person. You can also reportedly opt your address out of the service entirely by emailing eSafe@usps.gov, although the publication did not have any luck getting a response from that address.

It also suggested a credit freeze might help prevent fraudulent signups since USPS uses security questions from Equifax in order to verify accounts. That said, several readers of the site claimed they were able to sign up even though they had credit freezes in place, so your mileage may vary.

Advertisement

And as always, this a good reminder to sign up for alerts for when your credit report changes. If you have alerts set up you’ll find out about fraudulent cards and loans sooner rather than later.


via Lifehacker
Sign Your Address Up For USPS Informed Delivery Before Scammers Do

Watch real-life Iron Men do the first jetpack launch from the ground



XDubai

Iron Man might make flying look easy, but strapping on a jetpack and wings ranks as one of the more dangerous things you could every try. Jetman Yves Rossy and his two protégés (Fred Fugen and Vince Reffet) are bringing you closer to that action with the launch of a documentary called Loft: The Jetman Story.

In a teaser trailer for the film, produced in collaboration with XDubai, the trio show off some formation flying through the Fjords of Norway. It demonstrates the extreme risk (“if something goes wrong you have to react fast,” says Reffet) along with some pretty incredible high-speed visuals. You also get to see the first time the team has launched from a ground-based platform, albeit a high ramp in the mountains, rather than the helicopters or planes they usually use.






via MAKE Magazine
Weekend Watch: Welcome to Shedlandia

Building a Laravel Translation Package – Wrangling Translations



Laravel Tutorials
/
November 02, 2018

Building a Laravel Translation Package – Wrangling Translations

As we’ve discussed earlier in the series, out of the box, Laravel translations are stored in language files. These can be either PHP array-style syntax or straight up JSON files.

The Laravel Translation package interacts with the files in order to achieve the following:

  • List all languages
  • Add a language
  • List all translations
  • Add a translation
  • Update existing translations

The plan for the package is, much like many features of Laravel, to expose multiple drivers to power the translation management. The first driver will utilize Laravel’s existing file-based translations with plans to later add a database driver. With this in mind, we first define a contract to which driver will implement to ensure all the required methods are available to the package.

The file driver needs to interrogate the filesystem in order to return the data in the required format. This involves a lot of filtering, mapping and iterating, so we will lean quite heavily on Laravel’s collections.

Listing languages

To generate a collection of languages, we use the filesystem to get an array of directories from the configured language path, wrapping the result in a collection.

$directories = Collection::make($this->disk->directories($this->languageFilesPath));

Next, we utilize the mapWithKeys function to iterate over the directories, stripping the language from the path (it will be the last segment) and returning a key => value array.

return $directories->mapWithKeys(function ($directory) {
    $language = basename($directory);
    return [$language => $language];
});

The result looks something like this:

// $this->allLanguages()->toArray();

[
    ‘en’ => ‘en’,
    ‘fr’ => ‘fr’,
    ‘es’ => ‘es’,
];

Adding languages

To create a new language, we need to add a new directory and empty JSON file to the configured language path and name it after the language we’re adding.

$this->disk->makeDirectory(“{$this->languageFilesPath}/$language”);

if (! $this->disk->exists(“{$this->languageFilesPath}/{$language}.json”)) {
    $this->disk->put(
        “{$this->languageFilesPath}/$language.json”,
        json_encode((object) [], JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT)
    );
}

Then, we use the filesystem to add a new file to the language path containing an empty JSON encoded array.

Using the JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT constants ensure the generated JSON is in the right format.

Listing translations

When listing translations we want to ensure we differentiate the group (array style) translations from the single (JSON style).

Group
To get the group translations, we can use the filesystem to get all the files from the language directory.

$groups Collection($this->disk->allFiles(“{$this->languageFilesPath}/{$language}“));

Then, to get the translations, we can iterate over all the files in the directory and use the filesystem’s getRequire method to require the file giving us direct access to the array.

$groups->mapWithKeys(function ($group) {
    return [$group->getBasename(‘.php’) => $this->disk->getRequire($group->getPathname())];
});

The result looks something like this:

[
    ‘auth’ => [
        ‘failed’ => ‘These credentials do not match our records’,
    ],
]

Single

We can get the single translations by using json_decode on the contents of the file.

if ($this->disk->exists($this->languageFilesPath.“/$language.json”)) {
    return new Collection(json_decode($this->disk->get($singlePath), true));
}

The result looks something like this:

[
    ‘hello’ => ‘hello’,
]

Adding/updating translations

Translations are added and updated in largely the same fashion. First, we get the contents of the file the translation should be added to in array format. Then, we check whether or not the key to be added already exists. If it does, we update the value and if not, we append the new key and value to the array. Finally, the whole array is written back to the file.

Group

$translations = $this->getGroupTranslationsFor($language);
$values = $translations->get($group);
$values[$key] = $value;
$translations->put($group, $values);
$this->disk->put(
    “{$this->languageFilesPath}/{$language}/{$group}.php”,
    “<?php\n\nreturn “.var_export($translations, true).‘;’.\PHP_EOL
);

Single

$translations = $this->getSingleTranslationsFor($language);
$translations->put($key, $value);
$this->disk->put(
    “{$this->languageFilesPath}/$language.json”,
    json_encode((object) $translations, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT)
);

Some of the code samples have been truncated for clarity. You can see the full code for the files mentioned in the article below:

Driver Interface
File Driver

This driver lays the foundation from which we can build upon. Next time, we’ll build out the user interface which will ship with the package. It utilizes a combination of Tailwind CSS and Vue.js, two frameworks which have been widely adopted by the Laravel community.


via Laravel News
Building a Laravel Translation Package – Wrangling Translations