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

@kepano
kepano / obsidian-web-clipper.js
Last active October 27, 2025 04:27
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@SandNerd
SandNerd / containerise_list
Last active May 24, 2025 20:30
Ready list of tons of companies for use with Firefox's Containerise extension https://addons.mozilla.org/en-US/firefox/addon/containerise
@^[^/]+//(?!mail|login|guce\.)(?:[^/]+\.)?yahoo\.ac/ , Yahoo
@^[^/]+//(?!mail|login|guce\.)(?:[^/]+\.)?yahoo\.ae/ , Yahoo
@^[^/]+//(?!mail|login|guce\.)(?:[^/]+\.)?yahoo\.at/ , Yahoo
@^[^/]+//(?!mail|login|guce\.)(?:[^/]+\.)?yahoo\.be/ , Yahoo
@^[^/]+//(?!mail|login|guce\.)(?:[^/]+\.)?yahoo\.bg/ , Yahoo
@^[^/]+//(?!mail|login|guce\.)(?:[^/]+\.)?yahoo\.bh/ , Yahoo
@^[^/]+//(?!mail|login|guce\.)(?:[^/]+\.)?yahoo\.ca/ , Yahoo
@^[^/]+//(?!mail|login|guce\.)(?:[^/]+\.)?yahoo\.cm/ , Yahoo
@^[^/]+//(?!mail|login|guce\.)(?:[^/]+\.)?yahoo\.cn/ , Yahoo
@^[^/]+//(?!mail|login|guce\.)(?:[^/]+\.)?yahoo\.co/ , Yahoo
@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution.md
Last active October 29, 2025 11:37
Fix DNS resolution in WSL2

Permanent WSL DNS Fix (WSL 2.2.1+)

If you're encountering ping github.com failing inside WSL with a Temporary failure in name resolution, you're not alone — this has been a long-standing issue, especially when using VPNs or corporate networks.

This issue is now fixed robustly with DNS tunneling, which preserves dynamic DNS behavior and avoids limitations like WSL’s former hard cap of 3 DNS servers in /etc/resolv.conf.

DNS tunneling is enabled by default in WSL version 2.2.1 and later, meaning that if you're still seeing DNS resolution issues, the first and most effective fix is simply to upgrade WSL. Upgrading WSL updates the WSL platform itself, but does not affect your installed Linux distributions, apps, or files.

To upgrade WSL, follow these steps,

@whizark
whizark / SassMeister-input.scss
Last active January 30, 2019 11:56
Sass: Generating decoupled color schemes #sass
// ----
// Sass (v3.4.1)
// Compass (v1.0.1)
// ----
// Sass: Generating decoupled color schemes
// Helper functions
@function tint($color, $percentage) {
@return mix(white, $color, $percentage);
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@e-river
e-river / gulpfile.js
Last active January 2, 2016 11:19
gulpfile.js using gulp-ruby-sass, gulp-autoprefixer, gulp.spritesmith, gulp-jade, gulp-less, gulp-minify-css, gulp-concat and gulp-uglify, gulp-watch, gulp-plumber, gulp-clean.
var gulp = require('gulp')
, concat = require('gulp-concat')
, uglify = require('gulp-uglify')
, watch = require('gulp-watch')
, sass = require('gulp-ruby-sass')
, autoprefixer = require('gulp-autoprefixer')
, spritesmith = require("gulp.spritesmith")
, minifyCSS = require('gulp-minify-css')
, plumber = require('gulp-plumber')
, jade = require('gulp-jade')
@ryansechrest
ryansechrest / php-style-guide.md
Last active October 20, 2025 07:37
PHP style guide with coding standards and best practices.

PHP Style Guide

All rules and guidelines in this document apply to PHP files unless otherwise noted. References to PHP/HTML files can be interpreted as files that primarily contain HTML, but use PHP for templating purposes.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Most sections are broken up into two parts:

  1. Overview of all rules with a quick example
  2. Each rule called out with examples of do's and don'ts
@elclanrs
elclanrs / email-confirmation.php
Last active July 26, 2024 06:10
Simple e-mail confirmation plugin for WordPress.
<?php
/**
* Plugin Name: Email Confirmation
* Description: Send an email to the user with confirmation code and store form data in database until user confirms.
* Author: Cedric Ruiz
*/
class EmailConfirmation
{
const PREFIX = 'email-confirmation-';
@voxpelli
voxpelli / SASS_Color_Contrast.md
Last active August 21, 2022 11:49
Pure SASS script for calculating contrast ratios of colors. MOVED TO: https://github.com/voxpelli/sass-color-helpers

Pure SASS-adaption of Lea Verou's contrast-ratio javascript. Can be useful when eg. generating colored buttons from a single supplied color as you can then check which out of a couple of text colors would give the best contrast.

This script currently lacks the support for alpha-transparency that Lea supports in her script though.

In addition to the color-contrast adaption there's also some math methods that were needed to be able to calculate the exponent of a number and especially so when the exponent is a decimal number. A 2.4 exponent is used to calculate the luminance of a color and calculating such a thing is not something that SASS supports out of the box and not something I found a good pure-SASS script for calculating and I much prefer pure-SASS over ruby extensions. The math methods might perhaps be unecessary though if you're running Compass or similar as they may provide compatible math methods themselves.

Normal usage: `color: pick_best_color(#f00