ls -klsh ~/Library/Containers/com.docker.docker/Data/vms/0/Docker.raw
du -h ~/Library/Containers/com.docker.docker/Data/vms/0/Docker.raw
$ports = "135","389","636","3268","53","88","445","3269" | |
$dcs = Get-ADDomainController -Filter * | |
ForEach($dc in $dcs) | |
{ | |
Foreach ($p in $ports) | |
{ | |
$_test = Test-NetConnection $dc.Hostname -Port $p -WarningAction SilentlyContinue | |
If ($_test.tcpTestSucceeded -eq $true) |
public static final BigInteger B = BigInteger.ONE.shiftLeft(64); // 2^64 | |
public static final BigInteger L = BigInteger.valueOf(Long.MAX_VALUE); | |
public static BigInteger convertToBigInteger(UUID id) | |
{ | |
BigInteger lo = BigInteger.valueOf(id.getLeastSignificantBits()); | |
BigInteger hi = BigInteger.valueOf(id.getMostSignificantBits()); | |
// If any of lo/hi parts is negative interpret as unsigned |
On the shared machine: | |
Download http://code.google.com/p/selenium/downloads/detail?name=selenium-server-standalone-2.33.0.jar&can=2&q= | |
$ brew install chromedriver | |
$ java -jar selenium-server-standalone-2.33.0.jar | |
On the local machine: | |
Set `CHROME_HOSTNAME` in your `.env`, `.rbenv_vars`, or per run. |
# Rotation matrix function | |
def rotate_matrix (x, y, angle, x_shift=0, y_shift=0, units="DEGREES"): | |
""" | |
Rotates a point in the xy-plane counterclockwise through an angle about the origin | |
https://en.wikipedia.org/wiki/Rotation_matrix | |
:param x: x coordinate | |
:param y: y coordinate | |
:param x_shift: x-axis shift from origin (0, 0) | |
:param y_shift: y-axis shift from origin (0, 0) | |
:param angle: The rotation angle in degrees |
""" | |
Lyle Scott, III // lyle@ls3.io | |
Multiple ways to rotate a 2D point around the origin / a point. | |
Timer benchmark results @ https://gist.github.com/LyleScott/d17e9d314fbe6fc29767d8c5c029c362 | |
""" | |
from __future__ import print_function | |
import math |
#!/bin/bash | |
TODAY=$(date +%Y%m%d) | |
YESTERDAY=$(date --date '1 day ago' +%Y%m%d) | |
# Backup Mastodon database | |
docker exec -it $(docker ps | grep mastodon_postgresql | awk '{print $1}') bash -c 'rm -rf /var/lib/postgresql/data/'${YESTERDAY}' || true' | |
docker exec -it $(docker ps | grep mastodon_postgresql | awk '{print $1}') bash -c 'mkdir /var/lib/postgresql/data/'${TODAY}' || true' | |
docker exec -it $(docker ps | grep mastodon_postgresql | awk '{print $1}') bash -c 'pg_dumpall -c -U mastodon > /var/lib/postgresql/data/'${TODAY}'/mastodon-dump.sql' |
/* | |
Project: Interfacing SIM7600 GSM Module with Maker UNO | |
Item used: | |
- Maker UNO https://www.cytron.io/p-maker-uno | |
- SIM7600 https://www.cytron.io/p-4g-3g-2g-gsm-gprs-gnss-hat-for-raspberry-pi | |
*/ | |
#include <SoftwareSerial.h> | |
#include "Adafruit_FONA.h" |
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks. | |
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/) | |
(() => { | |
const SHOW_SIDES = false; // color sides of DOM nodes? | |
const COLOR_SURFACE = true; // color tops of DOM nodes? | |
const COLOR_RANDOM = false; // randomise color? | |
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com) | |
const MAX_ROTATION = 180; // set to 360 to rotate all the way round | |
const THICKNESS = 20; // thickness of layers | |
const DISTANCE = 10000; // ¯\\_(ツ)_/¯ |
PurpleSystemAppPort | |
PurpleSystemEventPort | |
UIASTNotificationCenter | |
com.apple.ABDatabaseDoctor | |
com.apple.AppSSO.service-xpc | |
com.apple.AuthenticationServicesCore.AuthenticationServicesAgent | |
com.apple.CARenderServer | |
com.apple.ClipServices.clipserviced | |
com.apple.CoreAuthentication.daemon | |
com.apple.DeviceAccess.xpc |