Skip to content

Instantly share code, notes, and snippets.

View peter-lyons-kehl's full-sized avatar
🏠
Working from home

Peter Lyons Kehl peter-lyons-kehl

🏠
Working from home
View GitHub Profile
@RubenKelevra
RubenKelevra / fast_firefox.md
Last active September 19, 2024 14:37
Make Firefox fast again
@vi
vi / interesting_crates.md
Last active September 10, 2024 02:16
List of crates that improves or experiments with Rust, but may be hard to find

Let's list here crates that enhance Rust as a language.

It not "batteries" like in stdx, but Rust-specific crates for workarounds for various missing features and experimental ideals from non-accepted/postponed RFCs, or just hacky tricks.

The list is supposed to contain (mostly) crates that are internal to Rust, not ones for making Rust deal with "external world" like other languages bindings, file formats, protocols and so on.

Primary focus should be on crates that are not easy to find by conventional means (e.g. no algorithm name, format or protocol to search for).

Note that quality of the listed crates may vary from proof-of-concept to stable-and-widely-used.

@peter-lyons-kehl
peter-lyons-kehl / rust_const_generics.md
Last active March 28, 2024 15:07
Rust Const Generics

Presentation on Const Generics as of 1.50.0 stable and 1.52.0-nightly

Challenges

  • Beware no, or misleading, documentation
  • Syntax may seem arbitrary:
    • Need ::< turbofish at some places, ordinary < elsewhere.
    • Need {...} curly brackets around some const generic parameter values, not around others.
    • Some error messages feel like going in circles.
@peterhs73
peterhs73 / virtualenv_n_jupyter_kernel.md
Last active February 23, 2024 17:37
Python Virtual Environments and Jupyter Notebook Kernel Guide

Create Python Virtual Environment and Install iPython Kernel for researchers working with Jupyter notebooks.

TL;DR

  • Virtual Environment
    • Virtualenv
      virtualenv env_to_create  
      \folder_to_create\Scripts\activate
      
@okitavera
okitavera / userChrome.css
Created January 24, 2018 12:09
Custom userChrome.css for firefox 57 for auto-hiding the navigation bar and bookmark bar
/* Auto-hide toolbar */
:root[uidensity=compact] #navigator-toolbox {
--nav-bar-height: 33px;
}
:root:not([uidensity]) #navigator-toolbox {
--nav-bar-height: 39px;
}
:root[uidensity=touch] #navigator-toolbox {
@hallettj
hallettj / userChrome.css
Last active June 23, 2023 18:05
Customize Firefox Quantum to hide tab bar, and to hide navigation bar when it is not focused. Press Ctrl+L to reveal navigation bar. To make this work you must open about:config and set toolkit.legacyUserProfileCustomizations.stylesheets to true with. This version is tested with Firefox v78.
@-moz-document url(chrome://browser/content/browser.xul),
url(chrome://browser/content/browser.xhtml) {
/* hide horizontal tabs at the top of the window */
#TabsToolbar > * {
visibility: collapse;
}
/* hide navigation bar when it is not focused; use Ctrl+L to get focus */
#main-window:not([customizing]) #navigator-toolbox:not(:focus-within):not(:hover) {
@Noitidart
Noitidart / _git-submodule-tips.md
Last active August 8, 2024 23:59
Tips for working with git submodules

Tips for Working With git Submodules

Cloning Repo with Submodules

  1. Use the --recursive flag:

     git clone https://github.com/aikiframework/json.git --recursive
    

    However if you cannot, as Github desktop app on clone does not use this flag, then do this after clone:

@levand
levand / cider-opinions.md
Last active November 20, 2023 07:50
Why I don't use cider

Why I don't use cider.

This is all personal opinion and a matter of taste. I'm putting it here because people have asked - I'm glad Cider exists and that a lot of people are obviously using it to great effect. This is not an attack on Cider or a an attempt to negate the experience of those who like it, just my own experience.

Also some of the critiques are more properly aimed at nRepl than Cider - I don't use nRepl either, in Emacs. For some reason I have fewer issues with it in Cursive (though I still do have some).

  1. With Cider, there's too much "going on" between Emacs and Clojure. When something glitches, hangs, doesn't return a value, throws an excption, etc (as it does, multiple times a day), I don't know whether the problem is in Emacs, in the Cider client, the nRepl server, one of any of the default middlewares or in my actual program. I run Emacs in inferior lisp using lein trampoline -m clojure.main - if something goes wrong, it's either in Emacs (which is usually obvious) or my program. Mi
(require '[clojure.core.async :as a])
(def xform (comp (map inc)
(filter even?)
(dedupe)
(flatmap range)
(partition-all 3)
(partition-by #(< (apply + %) 7))
(flatmap flatten)
(random-sample 1.0)