Skip to content

Instantly share code, notes, and snippets.

View limingjie's full-sized avatar
❄️

Mingjie Li limingjie

❄️
View GitHub Profile
@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
@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 / 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 / _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 / 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 / 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 / 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 / colors.sh
Last active August 29, 2015 14:20
colors.sh
#!/bin/bash
#
# This file echoes a bunch of color codes to the
# terminal to demonstrate what's available. Each
# line is the color code of one forground color,
# out of 17 (default + 16 escapes), followed by a
# test use of that color on all nine background
# colors (default + 8 escapes).
#
@limingjie
limingjie / introrx.md
Last active August 29, 2015 14:20 — forked from staltz/introrx.md

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called Reactive Programming, particularly its variant comprising of Rx, Bacon.js, RAC, and others.

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

@limingjie
limingjie / xfce4.arch.vmware.md
Last active January 17, 2016 21:04
Install Gnome/Xfce4 on Archlinux (VMware)

###Install X Server

$ sudo pacman -S xorg-server

###Install VMware Drivers

$ sudo pacman -S open-vm-tools xf86-video-vmware xf86-input-vmmouse