Skip to content

Instantly share code, notes, and snippets.

View zengxianyu's full-sized avatar
🌴
On vacation

zengxianyu

🌴
On vacation
View GitHub Profile
@zengxianyu
zengxianyu / ssh_tunnel.md
Created October 19, 2019 02:22
ssh tunnel

ssh -D port

fq竟然如此简单

@zengxianyu
zengxianyu / android_hotspot_tethering_local.md
Created October 19, 2019 02:12
安卓手机热点和usb共享网络

有安卓手机,ubuntu台式机没有无线网卡,还有个MacBook。目的是要让台式机和笔记本都用手机的流量上网,而且还想要从笔记本ssh到台式机。 (都是因为教研室的网太慢了啥也干不了)

于是我用手机开了个热点,让笔记本连热点。开了个usb共享网络,然后把手机插到台式机usb里。这样台式机和笔记本都能上网了。

但是手机弄出来的热点和usb网络还不在一个局域网里。要想从笔记本ssh台式机的话,可以用proxy server这个软件装到手机上,就能用手机作代理了。

在这个软件上设置把手机某端口的访问都转移到台式机的ip的22端口上就行了。

这样手机得一直插到台式机上了,可以专心学习,防止玩手机

set nocompatible " required
filetype off " required
set ic
let mapleader="\<Space>"
" set the runtime path to include Vundle and initialize
@zengxianyu
zengxianyu / configure_cuda_p70.md
Created July 5, 2018 12:14 — forked from alexlee-gk/configure_cuda_p70.md
Use integrated graphics for display and NVIDIA GPU for CUDA on Ubuntu 14.04

This was tested on a ThinkPad P70 laptop with an Intel integrated graphics and an NVIDIA GPU:

lspci | egrep 'VGA|3D'
00:02.0 VGA compatible controller: Intel Corporation Device 191b (rev 06)
01:00.0 VGA compatible controller: NVIDIA Corporation GM204GLM [Quadro M3000M] (rev a1)

A reason to use the integrated graphics for display is if installing the NVIDIA drivers causes the display to stop working properly. In my case, Ubuntu would get stuck in a login loop after installing the NVIDIA drivers. This happened regardless if I installed the drivers from the "Additional Drivers" tab in "System Settings" or the ppa:graphics-drivers/ppa in the command-line.