Skip to content

Instantly share code, notes, and snippets.

View vitalibondar's full-sized avatar

Vitali Bondar vitalibondar

View GitHub Profile
@vitalibondar
vitalibondar / scrapbox-new-card.js
Last active January 18, 2023 12:12 — forked from i386net/scrapbox-new-card.js
for Scrapbox.io | UA localization
const diffDate = (date, diff) => {
// date: '1993-09-11'
// diff: +1, -1
console.log('input', date);
console.log('diff', diff);
date.setDate(date.getDate() + diff);
console.log('output', date);
const a = [
date.getFullYear(),
('00' + (1 + date.getMonth())).slice(-2),
@vitalibondar
vitalibondar / sublime_text4_default_text_editor.txt
Last active May 21, 2021 17:39 — forked from wishfoundry/gist:7036457
Set OSX default text editor to sublime text 4 instead of TextEdit
defaults write com.apple.LaunchServices LSHandlers -array-add '{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.sublimetext.4;}'