exiftool
:apt install exiftool
//brew install exiftool
#-- primary toolbc
:apt install bc
//brew install bc
#-- do some math- OSX
gdate
:brew install coreutils
#-- extended gnu-date
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
#/media/cdrom/apks | |
https://dl-cdn.alpinelinux.org/alpine/latest-stable/main | |
https://dl-cdn.alpinelinux.org/alpine/latest-stable/community | |
http://dl-cdn.alpinelinux.org/alpine/edge/main | |
http://dl-cdn.alpinelinux.org/alpine/edge/community | |
@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing |
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
const express = require('express'); | |
express().use('/api', require('./api')).use(express.static('public')).listen(); |
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
[...document.querySelectorAll('div,main,body')].forEach((node)=> { | |
node.style.position = 'relative'; | |
node.style.height = 'auto'; | |
node.style.overflowY = 'visible'; | |
}); | |
[...document.querySelectorAll('button')].forEach((node)=> { | |
node.remove(); | |
}); |
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
const parseParts = ()=> { | |
let products = []; | |
Array.from(document.querySelectorAll('.catalog-products > .catalog-product')).forEach((el, i)=> { | |
const prodID = el.querySelector('.catalog-product-id a').text; | |
const prodName = el.querySelector('.product-title a').text; | |
const description = (el.querySelector('.product-more-info > .catalog-also-known-as:not(:first-child)')) ? el.querySelector('.product-more-info > .catalog-also-known-as:not(:first-child) > .info-row-content').innerHTML.split('<')[0].replace(/^\s*\b(.+)\b\s*$/, '$1').trim() : null; | |
const notes = (el.querySelector('.product-more-info > .catalog-product-note')) ? el.querySelector('.product-more-info > .catalog-product-note > .info-row-content').innerHTML.replace(/\<button.*$/, '').replace(/\<\/?[a-z0-9]+\>/g, '').trim() : null; | |
const url = el.querySelector('.product-image-link').href; | |
const img = el.querySelector('.product-image-link img').src; |
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
f=~/Desktop/ama_stac-x3h-1320s_an.mp4 | |
ffprobe -i $f -of json -show_streams 2> /dev/null | jq --color-output \ | |
--arg created_ts "`stat -f '%B' -t '%s' ${f}`" \ | |
--arg modified_ts "`stat -f '%c' -t '%s' ${f}`" \ | |
--arg exif_ts "`exiftool -fast -quiet -ignoreMinorErrors -s3 -forcePrint -dateFormat '%s' -time:all --File:MDItemContentCreationDate_Ranking --File:MDItemContentModificationDate_Ranking --File:MDItemDateAdded_Ranking --File:MDItemInterestingDate_Ranking ${f} | tr '\n' ',' | sed 's/^\(.*\),$/\[\1\]/g'`" \ | |
'.streams[0]? | | |
.bit_rate = (.bit_rate | tonumber) | | |
.full_seconds = (.duration | tonumber) | | |
.exif_ts = (($exif_ts | gsub(",?0000:00:00 00:00:00,?"; "")) | fromjson) | | |
.tot_frames = (.nb_frames | tonumber) | .file_epoch = ($created_ts | tonumber) | .moddified_epoch = ($modified_ts | tonumber) | |
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
export GIT_{AUTHOR,COMMITTER}_DATE="YYYY-MM-DD HH:MM:SS" | |
git add . | |
git commit -m "" | |
unset GIT_{AUTHOR,COMMITTER}_DATE |
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
tell application "iTunes" | |
set vol to sound volume | |
set vol to vol - 10 | |
if vol is less than 0 then | |
set vol to 0 | |
end if | |
set the sound volume to vol | |
end tell |
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 | |
function heicSE() { | |
#-- org heic arch | |
local bkup_file=~/Pictures/heic.tar | |
#-- args 1: scale (50%) // 2: type (JPG) // 3: quality (80%) | |
local dims_per=50 | |
[[ ! -z "$1" ]] && dims_per=$1 |
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
SELECT * FROM docs WHERE id < | |
(SELECT RAND() * m.maximum AS random_id FROM | |
(SELECT MAX(id) AS maximum FROM docs) AS m) | |
AND your_conditions | |
LIMIT 1 |
NewerOlder