Skip to content

Instantly share code, notes, and snippets.

View danieltomasz's full-sized avatar

Daniel Borek danieltomasz

View GitHub Profile
@StirlingBaker
StirlingBaker / obsidian_dataview_callouts.css
Last active November 13, 2022 03:07
Obsidian Callouts Dataview Attributes Custom CSS
.theme-dark {
--dataview-key: #ffc94a;
--dataview-value: #ffffff;
}
.theme-light {
--dataview-key: #000;
--dataview-value: #000;
}
@GitMurf
GitMurf / obsidian.templater.quick-capture.js
Last active June 27, 2024 15:00
Obsidian Quick Capture using templater. Activate from anywhere in your vault to record quick ideas, notes, time logging, etc. The Quick Capture file does NOT need to be open.
<%*
//v1.4: Adding option for including a header for each DNP day to fold
//'first' will add to top of file. 'last' will add to bottom of file
let firstOrLastLine = 'first';
//Name of the Quick Capture file. Do NOT include extension '.md'
let qcFileName = 'Quick Capture';
//Leave this blank if you want to use the default file path location (set to '/' to use root of vault)

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get the length of a string ${#VARNAME}
Get a single character ${VARNAME[index]}
@maml
maml / scapple-cheatsheet.md
Last active February 9, 2023 05:22
scapple shortcuts & cheatsheet

Scapple shortcuts & cheatsheet

Notes

Create a new note by current cursor position:

double click
@deep-introspection
deep-introspection / run_spatio_temporal_maps.py
Last active February 26, 2020 13:44
Plot spatiotemporal maps of Antoine Rémond (60ies).
#!/usr/bin/env python
# coding=utf-8
"""Spatio-temporal maps of evoked activity."""
# ==============================================================================
# title : run_spatio_temporal_maps.py
# description : Plot spatiotemporal maps of Antoine Rémond (60ies).
# authors : Guillaume Dumas
# date : 2020-02-25
# usage : python run_spatio_temporal_maps.py
@vankesteren
vankesteren / lantaarnpaal_utrecht.R
Last active June 29, 2019 05:24
Creating a map with all the lampposts in Utrecht
library(tidyverse)
lights_dat <- read_csv("https://ckan.dataplatform.nl/dataset/83402c68-1c05-4aa5-ab28-2e99d2bc2261/resource/dc10e0ac-351a-49b6-b3db-d0152c29dc02/download/paal-20180906.csv")
pp <-
lights_dat %>%
filter(latitude > 50) %>%
ggplot(aes(x = longitude, y = latitude)) +
geom_point(alpha = 0.03, fill = "#FAFAAB", stroke = 0, pch = 21, size = 1.6) +
geom_point(alpha = 0.8, fill = "#FAFAAB", stroke = 0, pch = 21, size = 0.2) +
@santiagobasulto
santiagobasulto / README.md
Last active May 16, 2021 10:13
Download HumbleBundle books in batch with a simple Python script.

Download HumbleBundle books

This is a quick Python script I wrote to download HumbleBundle books in batch. I bought the amazing Machine Learning by O'Reilly bundle. There were 15 books to download, with 3 different file formats per book. So I scratched a quick script to download all of them in batch.

(Final Result: books downloaded)

@stephenturner
stephenturner / mendeley-scihub.json
Created July 25, 2018 09:57
Sci-Hub look up engine for Zotero. Add to zotero engines file (https://www.zotero.org/support/locate#managing_lookup_engines). Afterwards, relaunch Zotero, make sure the newly added lookup engine is checked under Locate (green arrow) -> Manage Lookup Engines.
[
{
"name": "Sci-Hub Lookup",
"alias": "Sci-Hub",
"icon": "null",
"_urlTemplate": "https://sci-hub.tw/{z:DOI}",
"description": "Sci-Hub full text PDF search",
"hidden": false,
"_urlParams": [],
"_urlNamespaces": {
@boreycutts
boreycutts / i3-gaps_installation_guide.md
Last active January 30, 2024 19:05
A simple installation guide for i3-gaps

Installing i3-gaps

Dependencies

i3-gaps has some packages that are required for it to work so install these things:

sudo apt install libxcb1-dev libxcb-keysyms1-dev libpango1.0-dev libxcb-util0-dev libxcb-icccm4-dev libyajl-dev libstartup-notification0-dev libxcb-randr0-dev libev-dev libxcb-cursor-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev autoconf xutils-dev libtool automake

You also need to install libxcb-xrm-dev, but I got Unable to locate package libxcb-xrm-dev when trying to install from the apt repositories on Ubuntu 16.04. If this happens to you, just install it from source using these commands:

mkdir tmp
## GOAL:
## re-create a figure similar to Fig. 2 in Wilson et al. (2018),
## Nature 554: 183-188. Available from:
## https://www.nature.com/articles/nature25479#s1
##
## combines a boxplot (or violin) with the raw data, by splitting each
## category location in two (box on left, raw data on right)
# initial set-up ----------------------------------------------------------