Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

Huy Tr. huytd

I may be slow to respond.
Block or report user

Report or block huytd

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
huytd / vscode-espresso-custom.json
Created Jul 14, 2019
View vscode-espresso-custom.json
"workbench.colorCustomizations": {
"sideBar.background": "#fafafa",
"activityBar.background": "#fafafa",
"statusBar.background": "#fafafa",
"tab.inactiveBackground": "#fafafa",
"tab.border": "#fafafa",
"editorGroupHeader.tabsBackground": "#fafafa",
"editorLineNumber.foreground": "#dddddd",
"editorCursor.foreground": "#6ab04c",
"diffEditor.removedTextBackground": "#F8E5E1",
huytd / slack-arc-dark.css
Created Apr 17, 2019
Arc dark theme for Slack, with Threads screen fix
View slack-arc-dark.css
body { background: #404552; color: #d3dae3; }
a { color: #90939b; }
a:link, a:visited { color: #90939b; }
a:hover, a:active, a:focus { color: #90939b; }
hr { border-bottom: 1px solid #454c5c; border-top: 1px solid #404552; }
h1, h2, h3, h4 { color: #d3dae3; }
h1 a { color: #d3dae3; }
h1 a:active, h1 a:hover, h1 a:link, h1 a:visited { color: #d3dae3; }
.bordered { border: 1px solid #2a2f39; }
.top_border { border-top: 1px solid #2a2f39; }
View slack-style-join-left-message.js
const Join = 1;
const Leave = -1;
const JoinedAndLeft = 2;
const Rejoined = -2;
const toStatus = n => {
switch (n) {
case Join: return 'joined';
case Leave: return 'left';
case JoinedAndLeft: return 'joined and left';
View attractions-in-sf.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View route-data.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
huytd / emacs.init.el
Last active Apr 17, 2019
Emacs config with no Evil
View emacs.init.el
;; Package configs
(require 'package)
(setq package-enable-at-startup nil)
(setq package-archives '(("org" . "")
("gnu" . "")
("melpa" . "")))
;; Bootstrap `use-package`
(unless (package-installed-p 'use-package)
huytd / ffmpeg-compress-mp4
Created Dec 18, 2018 — forked from lukehedger/ffmpeg-compress-mp4
Compress mp4 using FFMPEG
View ffmpeg-compress-mp4
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4
View keyboard-prototype.c
/* Snacky2x2 Keyboard Firmware
By @huydotnet
You must select Keyboard from the "Tools > USB Type" menu
Change Log:
- v2: Fixes debounce problem by adding key state checking.
Reset the debounce timer when key state changed.
- v3: Snap the processing to every 1 millisecond.
- v4: Implement a different debouncing algorithm.
REGISTER_DELAY is a time before key can be registered
at each frame. REPEAT_DELAY is a time before a new frame
huytd /
Created Nov 16, 2018 — forked from pesterhazy/
Using ripgrep in Emacs using helm-ag (Spacemacs)


Ripgrep is a fast search tool like grep. It's mostly a drop-in replacement for ag, also know as the Silver Searcher.

helm-ag is a fantastic package for Emacs that allows you to display search results in a buffer. You can also jump to locations of matches. Despite the name, helm-ag works with ripgrep (rg) as well as with ag.


View sample-news-data.js
const NEWS_DATA = {"links":[{"body":"","id":988,"source":"","time":1540522920,"title":"Ứng dụng CSS variables để xây dựng tính năng dark theme","url":""},{"body":"<p>Dark theme, dark mode hay night mode,&#8230; là một tính năng khá thú vị. Mình hay chuyển theme (trình duyệt, IDE) về chế độ này. Vì đơn giản là trông nó có vẻ chuyên nghiệp và mang màu sắc bí ẩn &#8211; kiểu hacker ấy. Mà nói vậy chứ, thực ra mình để vậy cho đỡ chói mắt thôi. Không phải làm màu đâu nhé! À, thế bạn biết cách xây dựng nhiều theme cho một trang web không? Mình thì không chắc đâu. Nhưng sau khi tìm hiểu về CSS variable xong, mình đã nảy ra một ý tưởng. [&#8230;]</p>\n<p>The post <a rel=\"nofollow\" href=\"\">Tạo Dark Theme với CSS Variable</a> appeared first on <a rel=\"nofollow\" href=\"\">Complete JavaScript</a>.</p>\n","id":987,"source":"","time":1540420240,"title":"Tạo Dark
You can’t perform that action at this time.