Skip to content

Instantly share code, notes, and snippets.

View dangkhoasdc's full-sized avatar

Le Tan Dang Khoa dangkhoasdc

View GitHub Profile
@dangkhoasdc
dangkhoasdc / 0_reuse_code.js
Created November 29, 2013 00:58
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
Remove osxfuse if installed via homebrew:
> brew uninstall osxfuse
Install osxfuse binary and choose to install the MacFUSE compatibility layer:
http://sourceforge.net/projects/osxfuse/files/latest/download?source=files
Reboot (optional but recommended by osxfuse)
Install ntfs-3g via homebrew:
> brew update && brew install ntfs-3g
@dangkhoasdc
dangkhoasdc / ct-strings.cc
Created April 18, 2017 02:54 — forked from daniel-j-h/ct-strings.cc
Compile-time strings and string concatenation
#include <stdexcept>
#include <utility>
class Str {
public:
template <std::size_t N>
constexpr Str(const char(&a)[N]) : p(a), s(N - 1) {}
constexpr char operator[](std::size_t n) const {
@dangkhoasdc
dangkhoasdc / optimizers.py
Created May 4, 2018 05:54 — forked from kastnerkyle/optimizers.py
Theano optimizers
# Authors: Kyle Kastner
# License: BSD 3-clause
import theano.tensor as T
import numpy as np
import theano
class rmsprop(object):
"""
RMSProp with nesterov momentum and gradient rescaling
@dangkhoasdc
dangkhoasdc / .ctags
Created February 26, 2019 07:35 — forked from romainl/.ctags
My ctags config
--langmap=javascript:.js.es6.es.jsx
--javascript-kinds=-c-f-m-p-v
--regex-javascript=/^[ \t]*(var|let|const)[ \t]+([A-Za-z0-9_$]+)[ \t]*=[ \t]*\[/\2/A,Array,Arrays/
--regex-javascript=/^[ \t]*(var|let|const)[ \t]+([A-Z][A-Za-z0-9_$]+)[ \t]*=[ \t]*function/\2/C,Class,Classes/
--regex-javascript=/^[ \t]*class[ \t]+([A-Za-z0-9_$]+)/\1/C,Class,Classes/
--regex-javascript=/^[ \t]*export[ \t]?({[ \t]*)*([A-Za-z0-9_\*]*[ \t]as[ \t])([A-Za-z0-9_]+)/\3/E,Export,Exports/
--regex-javascript=/^[ \t]*export[ \t]?({[ \t]*)*([A-Za-z0-9_\*]*[ \t]as[ \t])*([A-Za-z0-9_]+),[ \t]*([A-Za-z0-9_\*]*[ \t]as[ \t])([A-Za-z0-9_]+)/\5/E,export,Exports/
@dangkhoasdc
dangkhoasdc / ArchLinuxWSL2.md
Last active May 25, 2024 03:47 — forked from ld100/ArchLinuxWSL2.md
Steps for setting up Arch Linux on WSL2

Upgrading to WSL 2

  • Download WSL2 Kernel
  • run wsl --set-default-version 2 in windows command line, so that all future WSL machine will use WSL2.

Installing Arch Linux

Basic installation