I wrote this four years ago, so instead use this command:
$ docker rmi $(docker images -q -f dangling=true)
// Lefalet shortcuts for common tile providers - is it worth adding such 1.5kb to Leaflet core? | |
L.TileLayer.Common = L.TileLayer.extend({ | |
initialize: function (options) { | |
L.TileLayer.prototype.initialize.call(this, this.url, options); | |
} | |
}); | |
(function () { | |
#!/bin/bash | |
# Open iPhone Simulator on default location for XCode 4.3 | |
open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app | |
# Open mobile safari | |
echo Open mobile safari on emulator and press return | |
read | |
# Plug debug to MobileSafari.app |
#!/bin/bash | |
echo "Generating an SSL private key to sign your certificate..." | |
openssl genrsa -des3 -out myssl.key 1024 | |
echo "Generating a Certificate Signing Request..." | |
openssl req -new -key myssl.key -out myssl.csr | |
echo "Removing passphrase from key (for nginx)..." | |
cp myssl.key myssl.key.org | |
openssl rsa -in myssl.key.org -out myssl.key |
<?php | |
// -- Only one caveat : The results must be ordered so that an item's parent will be processed first. | |
// -- Simulate a DB result | |
$results = array(); | |
$results[] = array('id' => 'a', 'parent' => '', 'name' => 'Johnny'); | |
$results[] = array('id' => 'b', 'parent' => 'a', 'name' => 'Bobby'); | |
$results[] = array('id' => 'c', 'parent' => 'b', 'name' => 'Marky'); | |
$results[] = array('id' => 'd', 'parent' => 'a', 'name' => 'Ricky'); |
Google cloud's ssh command lets you pass standard ssh flags. To, for example, forward local port 8088 to port 8088 on a vm instance, all you need to do is:
gcloud compute ssh --ssh-flag="-L 8088:localhost:8088" --zone "us-central1-b" "example_instance_name"
Now browsing to localhost:8088 works as it would with standard ssh.
So I built an algorithm that tries to lose tictactoe no matter what. If you'd like to battle your algorithm against mine, I think it would be fun. This is the spec of what your server should accept & return. If you built an algorithm that can beat it, please tweet me @bunsen.
Your server should accept GET requests with the following parameters:
row
col
mark
grid
- will be a url encoded array, like this: [["x",%20"x",%20nil],%20[nil,%20nil,%20"o"],%20[nil,%20"o",%20nil]]
It should return JSON that looks like this:
Chromium OS is cool. Chromium OS with crouton is cooler. Chromium OS with Docker is even cooler. This is specifically a guide for the Chromebook Pixel 2 (2015), but I can't think of any reason it wouldn't work with other devices.
First of all of course get Manjaro: https://manjaro.org/get-manjaro/
I recommend using Etcher to copy the image to your USB: https://etcher.io/
Before installing make sure:
This logging setup configures Structlog to output pretty logs in development, and JSON log lines in production.
Then, you can use Structlog loggers or standard logging
loggers, and they both will be processed by the Structlog pipeline (see the hello()
endpoint for reference). That way any log generated by your dependencies will also be processed and enriched, even if they know nothing about Structlog!
Requests are assigned a correlation ID with the asgi-correlation-id
middleware (either captured from incoming request or generated on the fly).
All logs are linked to the correlation ID, and to the Datadog trace/span if instrumented.
This data "global to the request" is stored in context vars, and automatically added to all logs produced during the request thanks to Structlog.
You can add to these "global local variables" at any point in an endpoint with `structlog.contextvars.bind_contextvars(custom