Skip to content

Instantly share code, notes, and snippets.

View zudochkin's full-sized avatar
😻

Dmitry Zudochkin zudochkin

😻
View GitHub Profile
@zudochkin
zudochkin / mdCalendar.js
Created January 3, 2024 10:49
Calendar Builder for Obsidian
// get DailyNotes template settings for weekly and daily notes
const periodicNotes = app.plugins.plugins["periodic-notes"];
const periodicNotesSetings = periodicNotes.settings;
function mdCalendar(year, month, mondayFirst) {
if (mondayFirst === undefined) mondayFirst = false;
//Step 1: build an array of the abbreviated weekday names
let dd = new Date(2022, 1, 27); //a Sunday
let wnames = [];
for (let i = 0; i < 8; i++) {
@QWxleA
QWxleA / Readme.md
Last active May 28, 2024 09:27
Obsidian zotero template for use with "obsidian-zotero-integration" plugin

QWxlea's over-engineered zotero template

Faq

What are these %% begin id-pn2xitti%% and %% end id-pn2xitti %% and ^pn2xitti? These are the persistance-markers of the indivual highlights, and the reference-id to that highlight.

The markers are meant for the importer. It will skip all text within those markers, so they stay when updating a zotero-import. Removing a marked block does not work well, it will not be reimported. Don't know how to fix that. If you want to reimport a highlight-block, best is to change the highlight in zotero (for example change the color). This will update the id, and on the next import the new highlight will be imported.

The reference-id is used like this: [[@name-of-the-note#^pn2xitti]]

@obfusk
obfusk / break.py
Last active July 16, 2024 11:26
python "breakpoint" (more or less equivalent to ruby's binding.pry); for a proper debugger, use https://docs.python.org/3/library/pdb.html
import code; code.interact(local=dict(globals(), **locals()))
@denisshevchenko
denisshevchenko / CV.hs
Last active August 27, 2018 20:41
Моё резюме, написанное на Haskell
{-
Денис Шевченко, 2015
-}
module Main where
import Control.Monad.Writer.Lazy
import Data.Functor ((<$>))
import Data.List (dropWhileEnd)
import Data.Char (isSpace)
@zudochkin
zudochkin / etc_init.d_unicorn_example.co.uk
Created August 18, 2012 20:40 — forked from rubysolo/etc_init.d_unicorn_example.co.uk
Ruby on Rails server setup on Ubuntu 11.04 with Nginx, Unicorn, Rbenv
#! /bin/bash
### BEGIN INIT INFO
# Provides: unicorn
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the unicorn web server
# Description: starts unicorn
# as we’re going to use Unicorn as the application server
# we’re not going to use common sockets
# but Unix sockets for faster communication
upstream shop {
# fail_timeout=0 means we always retry an upstream even if it failed
# to return a good HTTP response (in case the Unicorn master nukes a
# single worker for timing out).
# for UNIX domain socket setups:
server unix:/tmp/shop.socket fail_timeout=0;