Skip to content

Instantly share code, notes, and snippets.

Code for a Living

Tien Do tiendq

Code for a Living
Block or report user

Report or block tiendq

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
tiendq /
Created Apr 10, 2019
Install the latest CMake on Ubuntu
tiendq /
Created Jan 3, 2019 — forked from myusuf3/
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
This seems to be a more modern version (copied from
# Remove the submodule entry from .git/config
git submodule deinit -f path/to/submodule
# Remove the submodule directory from the superproject's .git/modules directory
rm -rf .git/modules/path/to/submodule
# Remove the entry in .gitmodules and remove the submodule directory located at path/to/submodule
git rm -f path/to/submodule
alias g='git'
alias gst='g status'
# alias gfe='g fetch'
alias gco='g checkout'
# alias gcd='gco develop'
tiendq / VSCode
Last active Apr 3, 2019
View VSCode
Atom One Dark Theme
Debugger for Chrome
Markdown All in One
View css_debugger.js
[]"*"),function(a){"1px solid #"+(~~(Math.random()*(1<<24))).toString(16)})
View getAbsoluteUrl.js
var getAbsoluteUrl = (function() {
var a;
return function(url) {
if(!a) a = document.createElement('a');
a.href = url;
return a.href;
View kilometer-input.js
import React from "react";
const numeral = require("numeral");
const BACKSPACE_KEY = 8, TAB_KEY = 9, ENTER_KEY = 13, NUMBER_0 = 48, NUMBER_9 = 57;
class KilometerInput extends React.Component {
constructor() {
this.keyPressHandler = this.keyPressHandler.bind(this);
tiendq /
Created Mar 7, 2016 — forked from tamitutor/
Fix Mongodb "soft rlimits" Warning On Mac OS X (Yosemite)

If you are seeing Mongo soft rlimits warnings in your logs, or a WARNING: soft rlimits too low. Number of files is 256, should be at least 1000 when you login to mongo shell via mongo from the commandline, or any mysterious/unexplained mongo connection errors... follow this how-to exactly and it will resolve the issue for you.

(Source of this how to found at

First file: sudo vi /Library/LaunchDaemons/limit.maxfiles.plist


You can’t perform that action at this time.