Skip to content

Instantly share code, notes, and snippets.

// inches
const sheetSizes = {
A0: { width: 46.81, height: 33.11 },
A1: { width: 33.11, height: 23.4 },
A2: { width: 23.4, height: 16.5 },
A3: { width: 16.5, height: 11.7 },
A4: { width: 11.7, height: 8.3 },
A5: { width: 8.3, height: 5.8 },
A6: { width: 5.8, height: 4.1 },
A7: { width: 4.1, height: 2.9 },
@szydan
szydan / gist:fb987ba33a47336a8ba372eb5dd20e2d
Created August 17, 2024 14:59
Backup iphone to external drive
rm -rf ~/Library/Application\ Support/MobileSync/Backup
ln -s /Volumes/T7_1T_red/Backup ~/Library/Application\ Support/MobileSync/Backup
open finder select iphone and press backup now
@szydan
szydan / gist:fc28e2a4e487b6c73c7e126722a06c0f
Created August 6, 2024 09:51
port forward to use 3000 as socks5 proxy
ssh -fND 127.0.0.1:3000 username@server
from https://blog.lasne.pro/posts/bypass_country_restrictions_with_ssh/
@szydan
szydan / gist:63441efa713fca22d3466feb6578694e
Created July 17, 2024 15:16
How to reopen a pull-request from github?
You need the rights to reopen pull requests on the repository.
The pull request hasn't been merged, just closed.
Go to Pull requests add filter `is:closed` choose PR you want to reopen. Select from checkbox and mark as Open.
@szydan
szydan / gist:9e89286f539cc9f7ce3e538c11bf8e6e
Created July 5, 2024 15:05
elasticsearch workaround for root.memory issue
siren.memory.root.limit: 25769803776
siren.memory.job.limit: 25769803776
siren.memory.task.limit: 25769803776
https://www.elastic.co/guide/en/elasticsearch/reference/current/red-yellow-cluster-status.html
@szydan
szydan / gist:6d144a9b1d0c27a4b99fbf1f2420e090
Created May 30, 2024 16:38
query git about changes in the last n months about specific folder
git log -p -M --since="12 month ago" src/siren_core_plugins/NAME > plugin-changes.txt
@szydan
szydan / gist:9433821ec855d055a0460557e87edb9b
Created May 19, 2024 23:11
When copying large number of small files
better
zip -0r A.zip A
copy A.zip ...
unzip A.zip
@szydan
szydan / rosetta-mac-m3.md
Last active May 23, 2024 12:52
Run shell mac m1 m2 m3

Install roseta

/usr/sbin/softwareupdate --install-rosetta --agree-to-license

Create following aliase in .zshrc

alias arm="env /usr/bin/arch -arm64 /bin/zsh --login"
@szydan
szydan / gist:700466d44254b41a578ea170ed855c5e
Created May 13, 2024 13:09
zip not including hidden files
When packing a folder which has some hidden top level folders inside like
A+
+.yarn
+.rc
zip -rqq A.zip A
will pack those hidden top level folders while