Skip to content

Instantly share code, notes, and snippets.

@taneltm
taneltm / README.md
Last active April 12, 2024 08:47
Obsidian timeline CSS snippet

Obsidian timeline

This is a CSS snippet for Obsidian.md to create a timeline in your daily notes.

To include the timeline in your daily note, add the following to your daily note template:

<div data-timeline="{{date:DDD}}"></div>

Preview can be found here: https://codepen.io/taneltm/pen/eYyeyBe

@seyonv
seyonv / fm_token_file.txt
Created May 24, 2020 03:33
File to store current login token for Focusmate
1590289120
randomstartingotokentext
@seyonv
seyonv / Focusmate_num_sessions_v1.rb
Last active January 19, 2022 15:08
File to get the current total number of sessions in Focusmate
require 'json'
require 'pry'
require 'uri'
require 'net/http'
class FocusMateNumSessions
# Step 1. Create a file somewhere in your filesystem.
# Call it fm_token_file.txt. Insert the path to the file into the line below
# Make sure to look at the reference .txt file and just paste
# that over.
+ <- -
´ <- =
å <- [
¨ <- ]
' <- \
æ <- ;
ø <- '
, <- ,
. <- .
- <- /
@manigandham
manigandham / rich-text-html-editors.md
Last active March 13, 2024 23:51
Rich text / HTML editors and frameworks

Strictly Frameworks

Abstracted Editors

These use separate document structures instead of HTML, some are more modular libraries than full editors

@Zenexer
Zenexer / Mac Keyboard Symbols.md
Last active April 6, 2024 07:40
List of Mac/Apple keyboard symbols
@JadenGeller
JadenGeller / Random.swift
Last active May 25, 2017 20:23
Random Numbers in Swift
struct Random {
static func within<B: protocol<Comparable, ForwardIndexType>>(range: ClosedInterval<B>) -> B {
let inclusiveDistance = range.start.distanceTo(range.end).successor()
let randomAdvance = B.Distance(arc4random_uniform(UInt32(inclusiveDistance.toIntMax())).toIntMax())
return range.start.advancedBy(randomAdvance)
}
static func within(range: ClosedInterval<Float>) -> Float {
return (range.end - range.start) * Float(Float(arc4random()) / Float(UInt32.max)) + range.start
}
@anthonyholmes
anthonyholmes / bootstrap-sass-mixin-cheatsheet.scss
Created October 10, 2014 08:13
Bootstrap Sass Mixin Cheatsheet
// Alerts
@include alert-variant($background, $border, $text-color);
// Background Variant
@include bg-variant($parent, $color);
// Border Radius
@include border-top-radius($radius);
@include border-right-radius($radius);
@include border-bottom-radius($radius);
@Nagyman
Nagyman / workflows-in-django.md
Last active January 27, 2024 08:29
Workflows in Django

Workflows (States) in Django

I'm going to cover a simple, but effective, utility for managing state and transitions (aka workflow). We often need to store the state (status) of a model and it should only be in one state at a time.

Common Software Uses

  • Publishing (Draft->Approved->Published->Expired->Deleted)
@rwest
rwest / README
Created January 9, 2012 16:42 — forked from symposion/README
Convert OS X Keychain exported entries into logins for 1Password import
These two files should help you to import passwords from mac OS X keychains to 1password.
Assumptions:
1) You have some experience with scripting/are a power-user. These scripts worked for me
but they haven't been extensively tested and if they don't work, you're on your own!
Please read this whole document before starting this process. If any of it seems
incomprehensible/frightening/over your head please do not use these scripts. You will
probably do something Very Bad and I wouldn't want that.
2) You have ruby 1.9.2 installed on your machine. This comes as standard with Lion, previous
versions of OS X may have earlier versions of ruby, which *may* work, but then again, they