Skip to content

Instantly share code, notes, and snippets.

Avatar
❄️

Mingjie Li limingjie

❄️
View GitHub Profile
@limingjie
limingjie / readme.md
Last active Jan 2, 2020
Run Inscape (0.92) on macOS Mojave (10.14.6)
View readme.md

Run Inkscape (0.92) on macOS Mojave (10.14.6)

Install Inkscape

brew cask install xquartz inkscape

Run Inkscape

@limingjie
limingjie / keymap.c
Last active Aug 31, 2018
Custom Keyboard XD60 - Use RGB Underglow to Indicate Caps Lock and Layers
View keymap.c
#include QMK_KEYBOARD_H
// Helpful Defines
#define _______ KC_TRNS
#define FN_CAPS LT(1, KC_CAPS)
#define LSFT_GRV LSFT_T(KC_GRV)
#define RSFT_SLSH RSFT_T(KC_SLSH)
#define RSFT_UP RSFT_T(KC_UP)
// Mac Keyboard Shorts
View macos_brew.sh
echo "Installing Homebrew and Cask..."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
install brew-cask
echo "Upgrading bash..."
brew install bash
brew install bash-completion
echo "Installing CLI Tools..."
brew install asciiquarium
@limingjie
limingjie / GolangDevEnvWin.md
Last active May 12, 2019
Golang Development Environment - Windows
View GolangDevEnvWin.md

Golang Development Environment - Windows

  1. Install golang.
  • Set env var GOROOT = C:\Go.
  • Set env var GOPATH = C:\GoPath.
  • Append C:\Go\bin to env var PATH.
  1. Install gitbash.
  2. Install vscode.
  • Install vscode extension Go (by lukehoban).
  • Set GOROOT and GOPATH in vscode user settings.
@limingjie
limingjie / TestRandomGenerator.cpp
Last active Aug 23, 2016
Test Random Generator
View TestRandomGenerator.cpp
#include <iostream>
#include <random>
#include <map>
#include <chrono>
int main()
{
// Random Device
std::random_device rd;
@limingjie
limingjie / The Go Programming Language Exercise 1.4
Last active May 27, 2019
The Go Programming Language Exercise 1.4
View The Go Programming Language Exercise 1.4
$ ./dup dup*.txt
[Found in 1 file(s)] yyy
5 hit(s) in dup4.txt
[Found in 2 file(s)] aaa
5 hit(s) in dup1.txt
1 hit(s) in dup2.txt
[Found in 3 file(s)] ccc
1 hit(s) in dup3.txt
1 hit(s) in dup1.txt
1 hit(s) in dup2.txt
View console.txt
$ g++ -Wall -O2 -std=c++11 -o regex_test_perf regex_test_perf.cpp stopwatch.hpp
$ ./regex_test_perf.exe
[regex e1 ] resume...
[regex e1 ] paused. 0m00.306s / 306.031 x 1/1000s
[regex e2 ] resume...
[regex e2 ] paused. 0m00.144s / 144.014 x 1/1000s
[string find ] resume...
[string find ] paused. 0m00.014s / 14.001 x 1/1000s
[regex e1 ] resume...
@limingjie
limingjie / mupdf.archlinux.md
Created Jun 2, 2015
Build MuPDF on Archlinux
View mupdf.archlinux.md
$ uname -a
Linux ArchLinux_MJ 4.0.4-2-ARCH #1 SMP PREEMPT Fri May 22 03:05:23 UTC 2015 x86_64 GNU/Linux
$ pwd
/home/mingjie/Programming/mupdf-1.7a-source
$ sudo make build=release
...
$ sudo make build=release install                                                                                                                        2 ↵
    CC build/release/pdf/pdf-cmap-table.o
    RM build/release/libmupdf.a
@limingjie
limingjie / xfce4.arch.vmware.md
Last active Jan 17, 2016
Install Gnome/Xfce4 on Archlinux (VMware)
View xfce4.arch.vmware.md

###Install X Server

$ sudo pacman -S xorg-server

###Install VMware Drivers

$ sudo pacman -S open-vm-tools xf86-video-vmware xf86-input-vmmouse
View 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.

You can’t perform that action at this time.