Skip to content

Instantly share code, notes, and snippets.

@kepano
kepano / obsidian-web-clipper.js
Last active May 15, 2024 18:54
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/" */
@dhh
dhh / linux-setup.sh
Last active May 15, 2024 18:53
linux-setup.sh
# CLI
sudo apt update -y
sudo apt install -y \
git curl \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev mupdf mupdf-tools \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils
@modyari
modyari / VectorExtensions.cs
Created September 13, 2021 16:14
(Unity) Modifies a Vector's component and returns it
using UnityEngine;
public static class VectorExtensions
{
/// <summary>
/// Returns a modified version of the vector with one or more components modified
/// </summary>
/// <param name="x">X component to modify</param>
/// <param name="y">Y component to modify</param>
/// <returns>A modified version of the vector with the passed component configurations</returns>
@matinrco
matinrco / ubuntuBBR.md
Created December 7, 2022 11:27
Enable bbr in ubuntu 22.04/20.04

Enable bbr in ubuntu 22.04/20.04

Requirements:

  • Linux kernel version must be greater than 4.19

    to check kernel version, run uname -r. sample output:

    5.4.0-132-generic
    
  • Have the CONFIG_TCP_CONG_BBR and CONFIG_NET_SCH_FQ options compiled and added to the kernel.

@m-ahmadi
m-ahmadi / all-technical-indicators.md
Last active May 15, 2024 18:44
A List of All Technical Indicators
@noqqe
noqqe / bitcoin.sh
Created June 4, 2011 10:32
Bitcoin Mining Script for Debian
#!/bin/bash
### BEGIN INIT INFO
# Provides: BitCoinMining
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# X-Interactive: false
# Short-Description: Start/stop BitCoing Mining poclbm-mod
### END INIT INFO
@jasco
jasco / DialogFragAnim_snippet.java
Created October 5, 2014 00:26
DialogFragment enter/exit animations
// example courtesy of http://adilatwork.blogspot.com/2012/11/android-dialogfragment-enter-and-exit.html
// file location: src/main/java/com/example/
@Override
public void onStart() {
super.onStart();
// safety check
if (getDialog() == null) {
return;
@Kooshaba
Kooshaba / frenzy.js
Created August 3, 2023 10:58
Sky Strife Frenzy Plugin
const {
network: {
match,
},
utils: {
isOwnedByCurrentPlayer,
manhattan,
},
} = networkLayer;
@tbuyle
tbuyle / html_template_controller.js
Last active May 15, 2024 18:32
Load external HTML template and append them to the document body (Stimulus.js)
import { Controller } from "stimulus"
export default class extends Controller {
connect() {
const templates = this.element.import.querySelectorAll("template");
templates.forEach(function(template) {
document.querySelector('body').appendChild(template);
});
}
}
@darkuncle
darkuncle / The_Rules.md
Last active May 15, 2024 18:32
The Rules - guidelines learned through hard experience in operations

(subject to additions, but rarely changes)

rule 0: It has to work.

rule 1: As simple as possible.

rule 2: Use the right tool for the job.

rule 3: Everything is a tradeoff. (see Rule 41)