Skip to content

Instantly share code, notes, and snippets.

/*
* Roam template PoC by @ViktorTabori
* 0.1alpha
*
* forked by @everruler12
* v1 2020-08-07
* include moment.js and replace ::current_time:: and ::today:: variables in template
*
* How to install it:
* - go to `roam/js` page`
Copy this to roam/js page, including the "{{[[roam/js]]}}" node:
- {{[[roam/js]]}}
- ```javascript
/*
* Roam template PoC by @ViktorTabori
* 0.1alpha
*
* How to install it:
* - go to `roam/js` page`
# GIT heart FZF
# -------------
is_in_git_repo() {
git rev-parse HEAD > /dev/null 2>&1
}
fzf-down() {
fzf --height 50% --min-height 20 --border --bind ctrl-/:toggle-preview "$@"
}
@JordanReiter
JordanReiter / crontab
Last active July 11, 2023 10:39
Remind yourself of what you did over the past day and week by reading a summary of all of your git commits.
0 22 * * 1,2,3,4,5 /path/to/git_changes.sh /path/to/projects/ # Sends 5 PM EST if server time is UTC
0 21 * * 5 /path/to/git_changes.sh -w /path/to/projects # Sends Friday @ 4PM EST if server time is UTC
@scottsb
scottsb / casesafe.sh
Last active January 16, 2024 08:47 — forked from Hais/workspace.sh
Create and manage a case-sensitive disk-image on macOS (OS X).
#!/bin/bash
# ---------------------------------------------------------
# Customizable Settings
# ---------------------------------------------------------
MOUNT_POINT="${CASE_SAFE_MOUNT_POINT:-${HOME}/casesafe}"
VOLUME_PATH="${CASE_SAFE_VOLUME_PATH:-${HOME}/.casesafe.dmg.sparseimage}"
VOLUME_NAME="${CASE_SAFE_VOLUME_NAME:-casesafe}"
VOLUME_SIZE="${CASE_SAFE_VOLUME_SIZE:-60g}"
@oelmekki
oelmekki / doc.md
Created December 30, 2015 19:37
Rails + Browserify + React + es7

1. Gemfile

gem 'browserify-rails', '1.5.0' # until fix: https://github.com/browserify-rails/browserify-rails/issues/101
gem 'react-rails'

Browserify-rails allows to use browserify within assets pipeline. React-rails is here only to allow to use #react_component (and thus, prerendering).

Note that jquery-rails can be removed from Gemfile, the npm version of jquery and jquery-ujs will be used instead.

@bishboria
bishboria / springer-free-maths-books.md
Last active March 22, 2024 11:19
Springer made a bunch of books available for free, these were the direct links
@cszentkiralyi
cszentkiralyi / context_quick_scope.vim
Last active April 16, 2016 07:15
Only enable the quick-scope plugin's highlighting when using the f/F/t/T movements
" Insert into your .vimrc after quick-scope is loaded.
" Obviously depends on <https://github.com/unblevable/quick-scope> being installed.
" Thanks to @VanLaser for cleaning the code up and expanding capabilities to include e.g. `df`
let g:qs_enable = 0
let g:qs_enable_char_list = [ 'f', 'F', 't', 'T' ]
function! Quick_scope_selective(movement)
let needs_disabling = 0
@kshenoy
kshenoy / CapsUnlocked.ahk
Created June 12, 2015 07:37
Use CapsLock as Control/Escape in Windows
; This is a complete solution to map the CapsLock key to Control and Escape without losing the ability to toggle CapsLock
; We use two tools here - any remapping software to map CapsLock to LControl and AutoHotkey to execute the following script
; This has been tested with MapKeyboard (by Inchwest)
; This will allow you to
; * Use CapsLock as Escape if it's the only key that is pressed and released within 300ms (this can be changed below)
; * Use CapsLock as LControl when used in conjunction with some other key or if it's held longer than 300ms
; * Toggle CapsLock by pressing LControl/CapsLock + RControl
~*LControl::