Skip to content

Instantly share code, notes, and snippets.

@FeralFlora
FeralFlora / 01 Zotero Integration import template and more!.md
Last active July 25, 2024 10:30
Zotero import template for the Zotero integration plugin for Obsidian. Screenshots and usage guide over in the Obsidian forum here: https://forum.obsidian.md/t/zotero-integration-import-templates/36310/105?u=feralflora
  • ZI-main.md
    • The main Zotero Integration template
  • runImport.md
    • Template that enables updating literature notes at the click of a button, and much more.
  • Meta bind button template
    • Template for in-note button that executes runImport.md
@peterchester
peterchester / swap.sh
Last active April 13, 2024 20:22
A simple little shell script that executes the digital ocean swap file tutorial.
#/bin/sh
# Creates a 1gb swap image.
# @see https://www.digitalocean.com/community/tutorials/how-to-configure-virtual-memory-swap-file-on-a-vps
if [ -f /var/swap.img ]; then
echo "Swap file already exists."
else
touch /var/swap.img
chmod 600 /var/swap.img
# 'root' character string of directory to search
# 'file_typs' character vector of file types to search
# 'omit_blank' logical indicating of blank lines are counted
# 'recursive' logical indicating if all directories within 'root' are searched
# 'lns' logical indicating if lines are counted, use F for counting characters
# 'trace' logical for monitoring progress
file.lens <- function(root, file_typs, omit_blank = F, recursive = T,
lns = T, trace = T){
require(reshape2)
anonymous
anonymous / gist:7452196
Created November 13, 2013 16:42
Basic income vs basic jobs model
from pylab import *
from scipy.stats import *
num_adults = 227e6
basic_income = 7.25*40*50
labor_force = 154e6
disabled_adults = 21e6
current_wealth_transfers = 3369e9
def basic_income_cost_benefit():
@Eric-Guo
Eric-Guo / gist:2011069
Created March 10, 2012 10:20
Sublime Text 2 - Useful Shortcuts (Windows 7 CHS)

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands used most towards the top. Sublime also offer full documentation.

Editing

Ctrl+⇧+K delete line
Ctrl+↩ insert line after
Ctrl+⇧+↩ insert line before
Ctrl+⇧+↑ move line (or selection) up