Skip to content

Instantly share code, notes, and snippets.

@tvst
tvst / streamlit_app.py
Last active May 10, 2024 09:06
Simple way to run heavy computations without slowing down other Streamlit users
import streamlit as st
import concurrent.futures # We'll do computations in separate processes!
import mymodule # This is where you'll do the computation
# Your st calls must go inside this IF block.
if __name__ == '__main__':
st.write("Starting a long computation on another process")
# Pick max number of concurrent processes. Depends on how heavy your computation is, and how
# powerful your machine is.
@L422Y
L422Y / osx_automount_nfs.md
Last active May 10, 2024 09:06
Automounting NFS share in OS X into /Volumes

I have spent quite a bit of time figuring out automounts of NFS shares in OS X...

Somewhere along the line, Apple decided allowing mounts directly into /Volumes should not be possible:

/etc/auto_master (see last line):

#
# Automounter master map
#

+auto_master # Use directory service

@matthewjberger
matthewjberger / instructions.md
Last active May 10, 2024 09:05
Install a nerd font on ubuntu

1.) Download a Nerd Font

2.) Unzip and copy to ~/.fonts

3.) Run the command fc-cache -fv to manually rebuild the font cache

@lainosantos
lainosantos / dell_u2723qe.sh
Last active May 10, 2024 09:03
Basic commands for for KVM, PIP and PBP features for Dell Monitor U2723QE on Linux ddcutil
#!/usr/bin/env bash
if [ "$EUID" -ne 0 ] && groups | grep -qwv 'i2c' && getent group i2c &> /dev/null
then
echo "Insuficient permissions, run as root ou join $USER to i2c group."
exit 1
fi
case "$1" in
@jpillora
jpillora / rdiff-example.sh
Created July 6, 2017 06:41
rdiff file example
# $ apt install rdiff
# $ rdiff --help
# Usage: rdiff [OPTIONS] signature [BASIS [SIGNATURE]]
# [OPTIONS] delta SIGNATURE [NEWFILE [DELTA]]
# [OPTIONS] patch BASIS [DELTA [NEWFILE]]
# Options:
# -v, --verbose Trace internal processing
# -V, --version Show program version
# -?, --help Show this help message
@mono0926
mono0926 / commit_message_example.md
Last active May 10, 2024 09:02
[転載] gitにおけるコミットログ/メッセージ例文集100
@skizhak
skizhak / build-static-v8-libs.sh
Last active May 10, 2024 09:01
Build and generate static v8 library
#Run build-v8.sh to setup deps.
gn gen "--args=is_clang=true is_component_build=false v8_static_library=true use_custom_libcxx=false target_cpu=\"x64\"" out.gn/x64.Release
ninja -C out.gn/x64.Release/
@Canop
Canop / broot-neovim-terminator_workflow.md
Created April 12, 2020 07:40
broot + neovim + terminator workflow

Introduction

I document here the new workflow I'm tuning in which I combine broot, neovim and terminator for enjoyable coding. I'll use here as support the exemple of Rust but it works about the same in other environnements.

Goals

  • keep open broot and neovim side to side and use broot as tree viewer and opener for vim
  • have a flexible setup: broot, neovim and terminator are basic tools that you should keep using as you do, this new combinations isn't a different world
  • Keep neovim uncluttered, don't prevent the shortcuts you already use for navigation and opening
@ikuamike
ikuamike / GoogleDorking.md
Created February 22, 2020 20:12 — forked from sundowndev/GoogleDorking.md
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"