Skip to content

Instantly share code, notes, and snippets.

@selfboot
selfboot / ntfs_mount.py
Last active Jul 13, 2019
mac os x:自动挂载ntfs硬盘为读写权限。 只要ntfs硬盘连接到电脑即可使用 ./ntfs_mount_auto.py 挂载ntfs磁盘为可读写,ntfs_unmount.py 为卸载磁盘。 ntfs_mount.py 是较早的版本,只有电脑先识别除硬盘,在/Volumes 可读到硬盘内容时才可以使用此脚本挂载为可读写。 建议使用./ntfs_mount_auto.py
View ntfs_mount.py
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import subprocess
import re
ntfs_pattern = re.compile(r'File System Personality: NTFS')
ntfs_device_node = re.compile(r'.*Device Node:.*')
device_dict = {}
@mislav
mislav / bashrc
Last active Nov 23, 2016
Basic vimrc and tmux config for servers
View bashrc
PS1='\[\033[31m\]\w\[\033[0m\] $ '
export EDITOR=vim
alias st='git status -sb'
@mjdietzx
mjdietzx / waya-dl-setup.sh
Last active Jul 8, 2020
Install CUDA Toolkit v8.0 and cuDNN v6.0 on Ubuntu 16.04
View waya-dl-setup.sh
#!/bin/bash
# install CUDA Toolkit v8.0
# instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network))
CUDA_REPO_PKG="cuda-repo-ubuntu1604_8.0.61-1_amd64.deb"
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/${CUDA_REPO_PKG}
sudo dpkg -i ${CUDA_REPO_PKG}
sudo apt-get update
sudo apt-get -y install cuda
@jdhao
jdhao / autocommands.vim
Last active Jun 19, 2020
My Neovim configurations for both terminal and gui (using nvim-qt). Repo: https://github.com/jdhao/nvim-config
View autocommands.vim
"{ Auto commands
" Do not use smart case in command line mode,
" extracted from https://goo.gl/vCTYdK
augroup dynamic_smartcase
autocmd!
autocmd CmdLineEnter : set nosmartcase
autocmd CmdLineLeave : set smartcase
augroup END
" Set textwidth for text file types
You can’t perform that action at this time.