This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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/) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "database/sql" | |
| "fmt" | |
| "net/url" | |
| "os" | |
| "reflect" | |
| "regexp" | |
| "strconv" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 <> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 \ | |
| \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. Somewhere on your machine clone the project. | |
| ``` | |
| > git clone https://github.com/facebook/react-devtools.git | |
| > cd react-devtools | |
| ``` | |
| 2. Switch to the v3 branch | |
| ``` | |
| > git checkout v3 | |
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| sudo port -v install dnsmasq | |
| sudo port -v load dnsmasq | |
| sudo mkdir /etc/resolver | |
| echo -n "nameserver 127.0.0.1" | sudo tee /etc/resolver/dev | |
| echo "address=/dev/127.0.0.1" | sudo tee -a /opt/local/etc/dnsmasq.conf | |
| echo "address=/test/127.0.0.1" | sudo tee -a /opt/local/etc/dnsmasq.conf | |
| sudo kill -9 $(pgrep dnsmasq) | |
| sleep 1 |