Skip to content

Instantly share code, notes, and snippets.

View kamilhism's full-sized avatar

Kamil Hismatullin kamilhism

View GitHub Profile
@hellais
hellais / gist:4552537
Last active March 9, 2024 13:34
Clear the logs of the all the files you downloaded in OSX (ref: www.tuaw.com/2012/02/14/mac-os-xs-quarantineevents-keeps-a-log-of-all-your-downloads/)
# To delete all the currently stored files
sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* 'delete from LSQuarantineEvent where LSQuarantineEventIdentifier like "%%";'
# To never store such information you can sym link it to dev null
ln -s /dev/null ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2
@AlexSnet
AlexSnet / example.py
Created September 8, 2017 14:38
Yandex.Maps Polyline encoder & decoder
base = 'NTA9AtcdVAMYiQIABuT-__pO___OP_7_ziv9_yGx__9dq_7_PwYBAMhNAADwFwEAN18AAOJb__8MtQAApLz___bfAAAkYwAAAFP__xNjAAA='
assert yandex_to_human_decoder(yandex_to_human_encoder(yandex_to_human_decoder(base))) == yandex_to_human_decoder(base)
assert yandex_to_human_encoder(yandex_to_human_decoder(base)).decode() == base
assert yandex_to_human_decoder(base) == [(37564469, 55844311),(37730637, 55771613),(37685319, 55656875),(37499925, 55636684),(37412722, 55703819),(37432634, 55775483),(37457009, 55733469),(37503357, 55716225),(37560691, 55741605),(37516403, 55766968)]