Skip to content

Instantly share code, notes, and snippets.

@Heziode
Heziode / dataviewjs_wordcount_obsidian.js
Created April 8, 2023 14:47
Word and Character Count of multiple notes in Obsidian, using dataviewjs.
// Word Count Dashboard
// a dataviewjs snippet by @pseudometa, https://gist.github.com/chrisgrieser/ac16a80cdd9e8e0e84606cc24e35ad99
// version 1.10.2
// last update: 2022-01-25
//----------------------------------------------------
// Import configuration
//----------------------------------------------------
const source = dv.current();
const sourceFolder = source.sourceFolder;
@Lordmau5
Lordmau5 / userscript.js
Last active March 28, 2025 08:03
Keygenmusic.tk Improvements
// ==UserScript==
// @name Keygenmusic.tk Improvements
// @namespace http://tampermonkey.net/
// @version 1.3.1
// @description Various extra functionality and fixes for the amazing site Keygenmusic.tk (Volume slider, Seekbar, Loop toggle, List fixes)
// @author Lordmau5
// @match https://keygenmusic.tk/
// @icon https://www.google.com/s2/favicons?sz=64&domain=keygenmusic.tk
// @grant none
// @require https://unpkg.com/[email protected]/dist/hyperlist.js
<!DOCTYPE html>
<html>
<head>
<title>Example App</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
table, th, td {
@rmi1974
rmi1974 / git_annex_useful_commands.md
Last active March 12, 2025 06:12
Git-annex useful commands #git #git-annex #commandlinefu

Git-annex useful commands

[git-annex][1]

git-annex allows managing files with git, without checking the file contents into git. While that may seem paradoxical, it is useful when dealing with files larger than git can currently easily handle, whether due to limitations in memory, time, or disk space.

Getting content

Get all content from backup remote:

@stewartknapman
stewartknapman / Find what code changed the DOM.md
Last active April 1, 2025 12:15
Find what code changed the DOM

Have you ever tried to track down which piece of javascript modified the DOM? Use a mutationObserver to monitor the DOM for changes. Then run console.trace() inside the callback. This will log a stack trace all the way back to the code that did the DOM modification. Basically copy and paste this code.

@jthuraisamy
jthuraisamy / highlight_calls.py
Created April 4, 2018 01:39
IDAPython Script to highlight function calls.
"""
IDAPython Script to highlight function calls.
Re-implemented by jthuraisamy (not the original author).
Install to %IDADIR%\plugins\highlight_calls.py.
Run by pressing Ctrl+Alt+H or go to Options -> Highlight Call Instructions.
"""
class HighlightHandler(idaapi.action_handler_t):
@petitviolet
petitviolet / nginx_deployment.yaml
Created March 11, 2018 11:04
sample Nginx configuration on Kubernetes using ConfigMap to configure nginx.
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-conf
data:
nginx.conf: |
user nginx;
worker_processes 3;
error_log /var/log/nginx/error.log;
events {

Demo:

Spoiler warning

Spoiler text. Note that it's important to have a space after the summary tag. You should be able to write any markdown you want inside the <details> tag... just make sure you close <details> afterward.

console.log("I'm a code block!");
@telamon
telamon / init.vim
Created August 16, 2017 13:25
My amazing Neovim configuration.
" Tony's Settings
" Usage:
" Download and install nvim, then install 'dein' the vim-package manager.
" During installation of dein it will output a sample configuration, take the
" two lines that `set runtimepath=PATH` and `dein#begin(PATH)` and replace the
" ones in this file online 14 and 17. Restart nvim and Happy Vimming!
"dein Scripts-----------------------------
if &compatible
set nocompatible " Be iMproved
@cmendible
cmendible / Roslyn.CodeGeneration.Program.cs
Created August 16, 2017 09:30
Create a class with dotnet core and roslyn with using statements outside the namespace
using System;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
namespace Roslyn.CodeGeneration
{
public class Program
{
public static void Main(string[] args)