Skip to content

Instantly share code, notes, and snippets.

View lessmost's full-sized avatar

lessmost lessmost

  • Alibaba
  • Hangzhou China
View GitHub Profile
[global]
index-url = https://mirrors.aliyun.com/pypi/simple/
# Based on https://gist.github.com/bastibe/c0950e463ffdfdfada7adf149ae77c6f
# Changes:
# * Instead of overriding cd, we detect directory change. This allows the script to work
# for other means of cd, such as z.
# * Update syntax to work with new versions of fish.
# * Handle virtualenvs that are not located in the root of a git directory.
function __auto_source_venv --on-variable PWD --description "Activate/Deactivate virtualenv on directory change"
status --is-command-substitution; and return
@lessmost
lessmost / venv.fish
Last active March 11, 2024 02:57 — forked from tommyip/venv.fish
Automatically activate/deactivate virtualenv in fish shell
# Based on https://gist.github.com/bastibe/c0950e463ffdfdfada7adf149ae77c6f
# Changes:
# * Instead of overriding cd, we detect directory change. This allows the script to work
# for other means of cd, such as z.
# * Update syntax to work with new versions of fish.
# * Handle virtualenvs that are not located in the root of a git directory.
function __auto_source_venv --on-variable PWD --on-event fish_prompt --description "Activate/Deactivate virtualenv on directory change"
status --is-command-substitution; and return
acpi
acpid
adobe-source-han-sans-cn-fonts
adobe-source-han-sans-jp-fonts
adobe-source-han-sans-kr-fonts
adobe-source-sans-fonts
adw-gtk-theme
alacarte
apparmor
autoconf
@lessmost
lessmost / init.lua
Last active November 30, 2021 07:13
neovim config
-- vim: set ts=2 sw=2 tw=2 et :
-- vim api helper
local helper = {}
helper.map = function(mode, lhs, rhs, opts)
local options = {noremap = true, silent = true}
if opts then
options = vim.tbl_extend("force", options, opts)
end
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
@lessmost
lessmost / Vagrantfile
Last active December 18, 2020 09:54
How to create a VirtualBox machine with encrypted storage with Vagrant (2.2.7)
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Forked from https://gist.github.com/gabrielelana/9189eab5df963deba30f
# Works with Vagrant 2.2.7 (trigger)
# After the first `vagrant up` stop the VM and execute the following steps
# Take the identifier of the storage you want to encrypt
# > HDD_UUID=`VBoxManage showvminfo <VM_NAME> | grep 'SATA.*UUID' | sed 's/^.*UUID: \(.*\))/\1/'`
# Store your usernname (whitespaces are not allowed) in a variable
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.user.service.remind</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/remind</string>
<string>-z</string>
#defaults write -app DingTalk SUEnableAutomaticChecks 0
#defaults write -app DingTalk SUAutomaticallyUpdate 0
#defaults write -app DingTalk SUAllowsAutomaticUpdates 0
#defaults write -app DingTalk SUFeedURL https://example.com/appcast.xml
echo "Please install DingTalk from App Store"
{
// Defines VS Code's display language.
// See https://go.microsoft.com/fwlink/?LinkId=761051 for a list of supported languages.
"locale":"en" // Changes will not take effect until VS Code has been restarted.
}
abusaidm.html-snippets
akamud.vscode-theme-onedark
alefragnani.Bookmarks
alefragnani.project-manager
bam.vscode-file-templates
batisteo.vscode-django
christian-kohler.npm-intellisense
christian-kohler.path-intellisense
codezombiech.gitignore
DavidAnson.vscode-markdownlint