Skip to content

Instantly share code, notes, and snippets.

@deerwood-mccord-jr
deerwood-mccord-jr / Extensions.InvariantString.cs
Created September 12, 2022 02:21 — forked from sandrock/Extensions.InvariantString.cs
C# Returns an invariant, roundtrip-safe string representation numeric values
namespace System
{
using System.Globalization;
// source: https://gist.github.com/sandrock/6fe3298b8ac6d9d0d9872dd811a63908
/// <summary>
/// Extension methods for common types that provide ToInvariantString() capability.
/// </summary>
@kepano
kepano / obsidian-web-clipper.js
Last active December 15, 2025 17:11
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/[email protected]?module'), import('https://unpkg.com/@tehshrike/[email protected]'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@sandrock
sandrock / Extensions.InvariantString.cs
Last active February 7, 2025 00:08
C# Returns an invariant, roundtrip-safe string representation numeric values
namespace System
{
using System.Globalization;
// source: https://gist.github.com/sandrock/6fe3298b8ac6d9d0d9872dd811a63908
/// <summary>
/// Extension methods for common types that provide ToInvariantString() capability.
/// </summary>
@darrenjrobinson
darrenjrobinson / Remove Powershell ISE AddOn.ps1
Created October 11, 2016 23:07
Remove Powershell ISE Vertical AddOn Tools
# list ISE Vertical AddOn Tools
$psISE.CurrentPowerShellTab.VerticalAddOnTools
# Add on name from the list retreived above
$addOnName = 'PowerGist'
# Check you've spelled it right and remove
$exists = $psISE.CurrentPowerShellTab.VerticalAddOnTools | where { $_.Name -eq $addOnName }
if ($exists) {
$psISE.CurrentPowerShellTab.VerticalAddOnTools.Remove($exists)
@thinkingserious
thinkingserious / fluent.py
Created March 5, 2016 02:44
Fluent Interface in Python Using Method Chaining and Reflection
class Fluent:
def __init__(self, cache=None):
self._cache = cache or []
# Build the cache, and handle special cases
def _(self, name):
# Enables method chaining
return Fluent(self._cache+[name])
# Final method call
@a-r-d
a-r-d / convert-and-split.sh
Last active November 22, 2024 21:02
How to take an annoying APE + CUE file cd rip and convert it into a set of FLAC or MP3 files on ubuntu.
#first install all the things:
sudo apt-get install flac ffmpeg mp3splt libav-tools shntool
# Okay first lets do an MP3:
# input files:
# --> cd.ape
# --> cp.cue
# (there are other options, like bitrate, but this is just the bare bones)
avconv -i cd.ape cd.mp3
@jittagornp
jittagornp / ImageDominantColor.java
Last active August 14, 2025 12:27
for find dominant color of image
package com.pamarin.api.util;
import java.awt.image.BufferedImage;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
/**
@stefanbirkner
stefanbirkner / ReadmeDrivenDevelopment.md
Created May 26, 2014 16:46
Readme Driven Development

Readme Driven Development

Problem

Build software that helps people.

Solution

@natelandau
natelandau / .bash_profile
Last active November 9, 2025 04:02
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@mnzk
mnzk / PowerShell_ODAC.ps1
Last active September 4, 2019 23:04
Example Of PowerShell (V3) & Oracle Data Access Components & ADO.net DbProviderFactory
#
# PowerShell (v3.0) + ODAC (and ADO.net)
#
function Load-DbProviderFactory([ScriptBlock[]]$loaders){
$fa = $loaders | foreach {
try{
(& $_)| ? {$_ -is [System.Data.Common.DbProviderFactory]}
}catch{}
} | Select -First 1