Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.
You've got two main options:
| #!/bin/bash | |
| #Variable Declaration - Change These | |
| HOSTED_ZONE_ID="XXXXXXXX" | |
| NAME="example.com." | |
| TYPE="A" | |
| TTL=60 | |
| #get current IP address | |
| IP=$(curl http://checkip.amazonaws.com/) |
| package main | |
| import ( | |
| "database/sql" | |
| "fmt" | |
| "net/url" | |
| "os" | |
| "reflect" | |
| "regexp" | |
| "strconv" |
| CREATE EXTENSION btree_gist; | |
| CREATE TABLE room_reservations ( | |
| room_id integer, | |
| reserved_at timestamptz, | |
| reserved_until timestamptz, | |
| canceled boolean DEFAULT false, | |
| EXCLUDE USING gist ( | |
| room_id WITH =, tstzrange(reserved_at, reserved_until) WITH && | |
| ) WHERE (not canceled) |
| CREATE UNLOGGED TABLE exclude_test(id integer primary key); | |
| INSERT INTO exclude_test(id) SELECT generate_series(1,50000); | |
| CREATE UNLOGGED TABLE exclude AS SELECT x AS item FROM generate_series(1,40000,4) x; | |
| -- Horrific AND list, takes 80s to plan and execute here: | |
| EXPLAIN ANALYZE SELECT id FROM exclude_test WHERE id <> 1 AND id <> 5 AND id <> 9 AND id <> 13 AND id <> 17 AND id <> 21 AND id <> 25 AND id <> 29 AND id <> 33 AND id <> 37 AND id <> 41 AND id <> 45 AND id <> 49 AND id <> 53 AND id <> 57 AND id <> 61 AND id <> 65 AND id <> 69 AND id <> 73 AND id <> 77 AND id <> 81 AND id <> 85 AND id <> 89 AND id <> 93 AND id <> 97 AND id <> 101 AND id <> 105 AND id <> 109 AND id <> 113 AND id <> 117 AND id <> 121 AND id <> 125 AND id <> 129 AND id <> 133 AND id <> 137 AND id <> 141 AND id <> 145 AND id <> 149 AND id <> 153 AND id <> 157 AND id <> 161 AND id <> 165 AND id <> 169 AND id <> 173 AND id <> 177 AND id <> 181 AND id <> 185 AND id <> 189 AND id <> 193 AND id <> 197 AND id <> 201 AND id <> 205 AND id <> |
| FROM postgres:13-alpine | |
| LABEL maintainer="Jordan Gould <[email protected]>" | |
| # Based on https://github.com/andreaswachowski/docker-postgres/blob/master/initdb.sh | |
| ENV PG_JOBMON_VERSION v1.3.3 | |
| ENV PG_PARTMAN_VERSION v4.4.0 | |
| # Install pg_jobmon | |
| RUN set -ex \ | |
| \ |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: | |
| The above copyright notice and this permission notice shall be included in | |
| all copies or substantial portions of the Software. |
| MIT License | |
| Copyright (c) 2021 Daniel Ethridge | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: |
| var express = require('express'); | |
| var redis = require('redis'); | |
| var db = redis.createClient(); | |
| var app = express(); | |
| // track users online (replace UA string with user id) | |
| app.use(function(req, res, next){ | |
| var ua = req.headers['user-agent']; |
| function(number, fractionSize) { | |
| if (number === null) return null; | |
| if (number === 0) return "0"; | |
| if (!fractionSize || fractionSize < 0) fractionSize = 1; | |
| var abs = Math.abs(number); | |
| var rounder = Math.pow(10, fractionSize); | |
| var isNegative = number < 0; | |
| var key = ""; |