I hereby claim:
- I am threesquared on github.
- I am threesquared (https://keybase.io/threesquared) on keybase.
- I have a public key whose fingerprint is F03A 0EC2 55E1 E2C7 559A 0D1C 1A1B DA44 EA86 0CA7
To claim this, I am signing this object:
function point_distance($coords, $center) | |
{ | |
$radius = 6378100; // radius of earth in meters | |
$latDist = $center[0] - $coords[0]; | |
$lngDist = $center[1] - $coords[1]; | |
$latDistRad = deg2rad($latDist); | |
$lngDistRad = deg2rad($lngDist); | |
$sinLatD = sin($latDistRad); | |
$sinLngD = sin($lngDistRad); | |
$cosLat1 = cos(deg2rad($center[0])); |
I hereby claim:
To claim this, I am signing this object:
<?php | |
namespace App\Services; | |
use Aws\Credentials\CredentialProvider; | |
use Aws\Credentials\Credentials; | |
use Aws\ElasticsearchService\ElasticsearchPhpHandler; | |
use Elasticsearch\ClientBuilder; | |
use Laravel\Scout\Engines\ElasticsearchEngine; |
Microsoft Intune can enforce some pretty crazy password policies. Fortunately if you have root access you can disable the policy and reset your password to whatever you want with the following command:
$ sudo pwpolicy clearaccountpolicies
Then you can change your password as normal with:
echo | openssl s_client -showcerts -servername sni-domain.com -connect webserver.com:443 2>/dev/null | openssl x509 -inform pem -noout -text | grep "Subject:"
#!/bin/sh | |
# Save file as /etc/update-motd.d/01-custom and make executable. Requires figlet. | |
export TERM=xterm-256color | |
read one five fifteen rest < /proc/loadavg | |
echo "$(tput setaf 2) | |
`figlet -f graffiti "d-formed" | sed 's/^/ /'` | |
$(tput setaf 7) |
tar --exclude 'node_modules' --exclude '.git' --exclude 'vendor' --exclude '.sass-cache' --exclude '.idea' --exclude 'coverage' --exclude 'cache' --exclude 'bower_components' --exclude 'Pods' --exclude '.gradle' --exclude 'zip-cache' --exclude '.webpack' --exclude 'venv' --exclude 'external-modules' --exclude '.terraform' -vczf projects.tar * |
The new PostgreSQL 14.4 release fixes an issue with all versions of PostgreSQL 14 that can lead to silent corruption of indexes. You can find out if any indexes are affected with pg_amcheck:
CREATE EXTENSION amcheck;
GRANT EXECUTE ON FUNCTION verify_heapam(relation regclass, on_error_stop boolean, check_toast boolean, skip text, startblock bigint, endblock bigint, blkno OUT bigint, offnum OUT integer, attnum OUT integer, msg OUT text) TO root;
GRANT EXECUTE ON FUNCTION bt_index_check(regclass) TO root;
GRANT EXECUTE ON FUNCTION bt_index_check(regclass, boolean) TO root;