Skip to content

Instantly share code, notes, and snippets.

-- This file configures basedpyright for nvim-lspconfig
-- This is not the complete lspconfig configuration - lazy.nvim
-- configuration merging gathers multiple files for the complete lspconfig configuration.
-- global function to silence this thing
function SilenceBasedpyright()
local function filter_diagnostics(diagnostic)
if diagnostic.source == 'basedpyright' then
# activate venv
# Usage: venv [ENVNAME]
#
# If there is only one venv in the current directory, activates it
# If there are multiple, shows a list where you select.
#
# Dependencies: external program gum for the selection menu
venv()
{
# optional path to environment
#!/bin/bash
if [[ "$1" == +* ]]; then
PYVERSION=(-p "${1#+}")
shift
else
PYVERSION=()
fi
UVARGS=( "$@" )
@bluss
bluss / flextelescope.lua
Last active June 20, 2024 21:23
Telescope find_files/live_grep but with support for toggling no-ignore/hidden
-- Flextelescope
--
-- Copyright bluss; Apache 2.0 license
--
-- Replace telescope builtins find_files and live_grep
-- with wrappers that support toggling no-ignore/hidden
local M = {}
local this_plugin = "flextelescope"
#!/usr/bin/env python3
"""
Start a version sensitive ipython3 that also goes into "foreign" virtualenvs.
Rye-enabled ipython: an ipython that follows your pinned python version and is usable
in all rye managed projects.
"""
from pathlib import Path
<html>
<head>
<title>Cargo Build Timings — ndarray 0.12.1</title>
<meta charset="utf-8">
<style type="text/css">
html {
font-family: sans-serif;
}
#!/usr/bin/python3
import sys
import functools
import re
from collections import namedtuple, OrderedDict
Rec = namedtuple("Rec", "name time line")
def file_to_records(filename):
@bluss
bluss / git-st
Created January 11, 2017 09:24
#!/bin/sh
# Display a git status, without touching or
# displaying any untracked files;
# just display the diffstat for index and worktree
USAGE="[<directory>]"
LONG_USAGE="Display diffstat for staging area and working directory, relative to current directory (or the given directory, -t for top)"
SUBDIRECTORY_OK=y
; ModuleID = 'id_result.cgu-0.rs'
source_filename = "id_result.cgu-0.rs"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%"core::result::Result<u64, i64>" = type { i64, [0 x i64], [1 x i64] }
; Function Attrs: uwtable
define void @id_result(%"core::result::Result<u64, i64>"* noalias nocapture sret dereferenceable(16), %"core::result::Result<u64, i64>"* noalias nocapture dereferenceable(16)) unnamed_addr #0 {
entry-block:
@bluss
bluss / -
Created December 12, 2016 16:07
This file has been truncated, but you can view the full file.
rust-nightly-x86_64-unknown-linux-gnu/
rust-nightly-x86_64-unknown-linux-gnu/cargo/
rust-nightly-x86_64-unknown-linux-gnu/cargo/manifest.in
rust-nightly-x86_64-unknown-linux-gnu/cargo/bin/
rust-nightly-x86_64-unknown-linux-gnu/cargo/bin/cargo
rust-nightly-x86_64-unknown-linux-gnu/cargo/lib/
rust-nightly-x86_64-unknown-linux-gnu/cargo/lib/cargo/
rust-nightly-x86_64-unknown-linux-gnu/cargo/share/
rust-nightly-x86_64-unknown-linux-gnu/cargo/share/zsh/
rust-nightly-x86_64-unknown-linux-gnu/cargo/share/zsh/site-functions/