Skip to content

Instantly share code, notes, and snippets.

View limingjie's full-sized avatar
❄️

Mingjie Li limingjie

❄️
View GitHub Profile
@limingjie
limingjie / vmware.assign.static.ip.md
Last active January 7, 2024 13:41
VMware Network Configuration

VMware Assign Static IP to Guest

Assign Static IP

  • Find Guest MAC Address

    In Virtual Machine Settings -> Hardware -> Network Adapter, click Advanced... button. I usually modify the MAC address to 00:11:22:33:44:55 for convenience.

  • Locate VMware DHCP Server Configuration File

@limingjie
limingjie / 256 colors.md
Last active April 24, 2024 22:15
256 colors in putty, tmux/screen and vim

#256 colors in putty, tmux/screen and vim There is a detailed answer on stackoverflow. If you are looking for a short one, here it is.

  • putty

    Set Connection -> Data -> Terminal-type string to xterm-256color

  • tmux

Add this line to ~/.tmux.conf

@limingjie
limingjie / terminalcolors.py
Last active November 29, 2023 06:03
check if terminal supports 256 colors
#!/usr/bin/env python
# Copyright (C) 2006 by Johannes Zellner, <johannes@zellner.org>
# modified by mac@calmar.ws to fit my output needs
# modified by crncosta@carloscosta.org to fit my output needs
# Original source: https://github.com/incitat/eran-dotfiles/blob/master/bin/terminalcolors.py
import sys
import os
@limingjie
limingjie / _readme.md
Last active August 29, 2015 14:19 — forked from shime/_readme.md

Having trouble installing the latest stable version of tmux?

I know, official package for your OS/distro is outdated and you just want the newest version of tmux.

Well, this script should save you some time with that.

Prerequisities

  • gcc
@limingjie
limingjie / ncurses.5.9.md
Created April 24, 2015 14:53
Build ncurses 5.9 with MinGW

#Build ncurses 5.9 with MinGW

  • Download
http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz
  • Modify Code
ncurses-5.9\ncurses\lib_keyname.c
line 174/282/284/316, remove newline before \0.
@limingjie
limingjie / libevent2.0.22.md
Last active March 16, 2018 06:19
Build libevent 2.0.22 with MinGW

Build libevent 2.0.22 with MinGW

  • Download
http://jaist.dl.sourceforge.net/project/levent/libevent/libevent-2.0/libevent-2.0.22-stable.tar.gz
  • Build
$ ./configure --prefix=/mingw
$ ./configure && make
$ make install
@limingjie
limingjie / UbuntuProxy.md
Last active March 23, 2023 12:43
Ubuntu Proxy Configuration

Ubuntu Proxy Configuration

Tested under Ubuntu 14.04.2 LTS

Global Proxy

Add proxies in /etc/environment

$ sudo vi /etc/environment
# Proxies
http_proxy="http://proxy.server.com:port/"
https_proxy=$http_proxy