Let's say you want to host domains first.com
and second.com
.
Create folders for their files:
#!/bin/ruby | |
require 'json' | |
require 'optparse' | |
require 'net/http' | |
require 'pry' | |
require 'yaml' | |
auth_token = ENV['SCALEWAY_AUTH_TOKEN'] | |
uri = URI('https://api.scaleway.com/servers') |
$ npm install --save babel-cli babel-preset-es2015
$ npm install --save-dev jasmine
.babelrc:
{
"presets": ["es2015"]
The standard names for indexes in PostgreSQL are:
{tablename}_{columnname(s)}_{suffix}
where the suffix is one of the following:
pkey
for a Primary Key constraint;key
for a Unique constraint;excl
for an Exclusion constraint;idx
for any other kind of index;
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
$ ssh [email protected] | |
Warning: Permanently added '45.55.11.xxx' (ED25519) to the list of known hosts. | |
CoreOS stable (717.3.0) | |
core@rethink-cluster-sfo1 ~ $ |
This is an example usage of registering an update_hook
to a SQLite connection. The motivation for exploring this feature is to test out various implementations of data monitoring interfaces.
A few notable properties of the implementation:
INSERT
and UPDATE
operation requires a subsequent SELECT
to get the row data.bufsize
under heavy workloads will improve throughput, but the SQLite library is single-threaded by design.from django.db.models import SubfieldBase | |
from django.core.exceptions import ImproperlyConfigured | |
from django_extensions.db.fields import ShortUUIDField | |
class XidField(ShortUUIDField): | |
""" | |
XID stands for external ID. | |
Randomly generated IDs (base62 encoded UUID) used for public display purposes. | |
The random ID gets a short textual prefix for improved legibility, like Stripe's IDs. |