- Plug in your SD card, HDD, or other block device and then use the following command to see which /dev/diskN node it's located on:
diskutil list
- Unmount the disk where
N
is the number of the disk taken from the above command:
# Take each image, (900x1600) | |
# crop it to 900x900 by translating x=0 and Y=350 | |
# repage - reset canvas | |
# resize then to 300x300 | |
# delay between animated frames | |
# cyclic loop | |
# all *.jpg in the directory to resulting gif | |
magick *.jpg -crop 900x900+0+350 +repage -resize 300x300 -delay 6 -loop 0 *.jpg animated.gif | |
# Further savings: -layers 'optimize' -fuzz 7% |
// International data based on browser preference | |
Intl.DateTimeFormat().resolvedOptions() | |
// Timezone offset to UTC | |
(new Date()).getTimezoneOffset() | |
// Array from browser | |
navigator.languages | |
// Language Attribute if page has it |
#!/usr/bin/env bash | |
## | |
# Commands to get Next.js working with Drupal | |
# | |
# Author: | |
# - Mladen Djuric @MacMladen | |
# | |
# Requirements: | |
# - having DDEV installed https://ddev.readthedocs.io/en/stable/users/install/ddev-installation/ |
### Connecting to SMTP over SSL on 465 | |
openssl s_client -connect smtp.zoho.com:465 | |
# CONNECTED(00000006) | |
# depth=1 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = Thawte TLS RSA CA G1 | |
# verify error:num=20:unable to get local issuer certificate | |
# verify return:0 | |
# --- | |
# Certificate chain | |
# 0 s:/CN=*.zoho.com |
# Generating new SSH key best practice | |
# RSA is most widely used, 4096 bits recommended! | |
# Ed25519 was introduced in OpenSSH 6.5 of January 2014 | |
# Ref: https://goteleport.com/blog/comparing-ssh-keys/ | |
# Ref: https://medium.com/risan/upgrade-your-ssh-key-to-ed25519-c6e8d60d3c54 | |
# List all your keys | |
for key in ~/.ssh/id_*; do ssh-keygen -l -f "${key}"; done | uniq |
SELECT nid, node_field_data.status, type, FROM_UNIXTIME(node_field_data.created) AS Created, title, field_soundcloud_target_id AS mid, name, field_media_oembed_video_value AS Link | |
FROM `node_field_data` | |
LEFT JOIN `node__field_soundcloud` on node_field_data.nid=node__field_soundcloud.entity_id | |
LEFT JOIN `media__field_media_oembed_video` on field_soundcloud_target_id=media__field_media_oembed_video.entity_id | |
LEFT JOIN `media_field_data` on field_soundcloud_target_id=mid | |
WHERE type='article' OR type='episode' | |
ORDER BY nid DESC |
SELECT ID, user_email email, user_registered registered, user_status status, | |
(SELECT meta_value FROM `pltfrm_usermeta` WHERE meta_key='last_activity' AND user_id=u.ID ) as active, | |
(SELECT meta_value FROM `pltfrm_usermeta` WHERE meta_key='first_name' AND user_id=u.ID ) as Name, | |
(SELECT meta_value FROM `pltfrm_usermeta` WHERE meta_key='last_name' AND user_id=u.ID ) as Surname | |
FROM `pltfrm_users` u |
const all = []; | |
document | |
.querySelectorAll('ytd-playlist-video-renderer ytd-thumbnail-overlay-time-status-renderer') | |
.forEach(a => all.push(a.textContent.trim())); | |
let videosLength = 0; | |
all.forEach(a => { | |
const timeSplit = a.split(':'); | |
videosLength += timeSplit[0]*60 + timeSplit[1]*1; |
// similar behavior as an HTTP redirect | |
// window. object can be omitted | |
window.location.replace("https://nisville.com/"); |