Skip to content

Instantly share code, notes, and snippets.

@font-face {
font-family: "Fira Code Nerd Font";
font-style: normal;
font-weight: 200;
src: url('https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/patched-fonts/FiraCode/Light/complete/Fira%20Code%20Light%20Nerd%20Font%20Complete.ttf') format('truetype');
}
@font-face {
font-family: "Fira Code Nerd Font";
font-style: normal;
font-weight: 400;
@yanghu
yanghu / patch-edid.md
Created November 25, 2015 02:54 — forked from ejdyksen/patch-edid.md
A script to fix EDID problems on external monitors in Mac OS. Source: http://embdev.net/topic/284710

patch-edid.rb

A script to fix EDID problems on external monitors in Mac OS.

  1. Connect the problem monitor.

  2. Download this script into your /System/Library/Displays/Overrides (note: this file is only writeable by root, so some commands require sudo).

@yanghu
yanghu / assembly.md
Last active August 29, 2015 14:27
CSAPP

##IA32 Registers:

  • Eight registers(first six are general purpose):

    • eax(ax/ah/al)
    • ecx
    • edx
    • ebx
    • esi/si
  • edi/di
@yanghu
yanghu / build_YCM_on_windows.md
Last active July 10, 2018 11:30
How to build YCM on windows.

Instructions for compiling YCM with Clang support

Now prebuilt Clang snapshots are available on the LLVM snapshot builds site. you don't need to compile it yourself, get latest Windows snapshot build from that page.

  1. Install all requirements from the instructions above. Dont compile anything yet. (visual studio 2012 sdk, cmake)
  2. Create a build directory and cd into it. (using MS Visual studio developer command prompt)
  3. Suppose you are've successfully installed Clang from installer in a C:\LLVM dir. Now, run cmake -G "Visual Studio 11" -DPATH_TO_LLVM_ROOT=C:\LLVM . <USERFOLDER>\vimfiles\bundle\YouCompleteMe\third_party\ycmd\cpp. Dont forget to change a VS version and a path to Clang build dir if you are using different VS version or build path.
  4. Open the solution in visual studio and build the whold solution. If you are getting errors like:
  • 'boost::bind' : ambiguous call to overloaded function. This issue was fixed, try updating to the latest version of YCM
@yanghu
yanghu / 0_reuse_code.js
Created June 24, 2014 15:50
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@yanghu
yanghu / git-commands.md
Last active July 10, 2016 15:34
Useful Git commands

##Useful Git Commmands and Tips

Ignore files locally###

add the files you want to ignore to .git/info/exclude, this file will not be shared with other remotes, so only the local repo will ignore those files.

###Show information###

  • git log/show command
git log --graph --oneline #show history