Skip to content

Instantly share code, notes, and snippets.

@Ryan1729
Ryan1729 / alacritty.toml
Last active October 1, 2024 20:15
alacritty config
# goes in ~/.config/alacritty/alacritty.toml
[bell]
animation = "EaseOutQuad"
color = "0xffb937"
duration = 500
[colors.bright]
black = "0x666666"
blue = "0x0037ff"
@Ryan1729
Ryan1729 / prompt-to-run
Created December 19, 2019 15:49
prompt-to-run script that allows editing command before executing.
# example usage:
# $ prompt-to-run 'echo hi'
prompt_acc=''
read -p 'run `'"$1"'`
' -i "$1" -e prompt_acc
eval "$prompt_acc"
@Ryan1729
Ryan1729 / old_gold_hold.js
Last active October 20, 2019 09:00
Generating interesting variants on a classic Dr. Seuss poem with a quick and dirty script
//
// SO copy-pasta
//
function perm(xs) {
let ret = [];
for (let i = 0; i < xs.length; i = i + 1) {
let rest = perm(xs.slice(0, i).concat(xs.slice(i + 1)));
if(!rest.length) {
@Ryan1729
Ryan1729 / .bashrc
Last active May 18, 2020 04:24
dotfiles
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
be () {
source be-impl $@
}
@Ryan1729
Ryan1729 / template.html
Created August 28, 2019 04:31
Dark Background HTML List Template
<!DOCTYPE html>
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><style type="text/css">body{
margin:40px auto;
max-width:650px;
line-height:1.6;
font-size:18px;
color:#888;
background-color:#111;
padding:0 10px
@Ryan1729
Ryan1729 / -ColourScheme.md
Last active December 7, 2024 23:25
Colour Scheme

Base colors

// purportedly colour-blind friendly colours
black:   '0x222222'
red:     '0xde4949'
green:   '0x30b06e'
yellow:  '0xffb937'
blue:    '0x3352e1'
magenta: '0x533354'
cyan:    '0x5a7d8b'

white: '0xeeeeee'

@Ryan1729
Ryan1729 / notes.md
Last active April 7, 2020 09:53
Theming Git-Gui on windows

As far as i can tell there is no way to change the theme of git-gui as packaged in git for windows without editing .tcl files.

When you use the Git GUI here context menu option, the .tcl files that are interpreted are those in C:\Users\USERNAME\AppData\Local\Programs\Git\mingw64\lib\tk8.6\ttk. You can confirm this with Process Monitor. You'll want to filter for wish.exe if you do so. Oddly enough there is a totally separte copy of these files in Program Files/Git.

Hello world

A .tcl file that git-gui interprets directly is ttk.tcl. To demonstrate that this is the case add the following line ttk.tcl somewhere at the top level.

tk_messageBox -type ok -icon info -message "Hello world" -title "Info"
@Ryan1729
Ryan1729 / Add Alacritty to Context Menu.reg
Created November 25, 2018 22:46
A .reg file adding a call to a command, (in this case alacritty.exe) to the windows explorer context menu and passing it the current directory
Windows Registry Editor Version 5.00
; created by Ryan Wiedemann
;
; right-clicking directly on a directory
;
[HKEY_CLASSES_ROOT\Directory\shell\alacrittymenu]
@="Open Alacritty Here"
@Ryan1729
Ryan1729 / multi-selection.diff
Created November 13, 2017 06:42
diff against geany/geany @ dd58ab6
diff --git a/src/editor.c b/src/editor.c
index 460c832a..0cee854c 100644
--- a/src/editor.c
+++ b/src/editor.c
@@ -315,15 +315,7 @@ static gboolean on_editor_button_press_event(GtkWidget *widget, GdkEventButton *
}
if (event->type == GDK_BUTTON_PRESS && state == GEANY_PRIMARY_MOD_MASK)
{
- sci_set_current_position(editor->sci, editor_info.click_pos, FALSE);
-
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index bafe23e..c01717a 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -230,11 +230,6 @@
// Tell the compiler to link to either panic_abort or panic_unwind
#![needs_panic_runtime]
-// Always use alloc_system during stage0 since we don't know if the alloc_*
-// crate the stage0 compiler will pick by default is available (most