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
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
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
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 four_key_firmware.c
/* Snacky2x2 Keyboard Firmware
By @huydotnet
You must select Keyboard from the "Tools > USB Type" menu
*/
#include <Keyboard.h>
const byte ROWS = 2;
const byte COLS = 2;
View base16-ocean-mono.vim
" base16-vim (https://github.com/chriskempson/base16-vim)
" by Chris Kempson (http://chriskempson.com)
" Ocean scheme by Chris Kempson (http://chriskempson.com)
" This enables the coresponding base16-shell script to run so that
" :colorscheme works in terminals supported by base16-shell scripts
" User must set this variable in .vimrc
" let g:base16_shell_path=base16-builder/output/shell/
if !has('gui_running')
if exists("g:base16_shell_path")
@huytd
huytd / d3_realtime_linechart.html
Created Nov 6, 2015
Realtime Line Chart with D3
View d3_realtime_linechart.html
<style>
.axis {
font-family: sans-serif;
fill: #d35400;
font-size: 12px;
}
.line {
fill: none;
View sample-news-data.js
const NEWS_DATA = {"links":[{"body":"","id":988,"source":"medium.com","time":1540522920,"title":"Ứng dụng CSS variables để xây dựng tính năng dark theme","url":"https://medium.com/p/2796644ea1f2"},{"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=\"https://completejavascript.com/tao-dark-theme-voi-css-variable/\">Tạo Dark Theme với CSS Variable</a> appeared first on <a rel=\"nofollow\" href=\"https://completejavascript.com\">Complete JavaScript</a>.</p>\n","id":987,"source":"completejavascript.com","time":1540420240,"title":"Tạo Dark
View firebug-lite-1.2.js
var firebug = {
version:[1.231,20100118],
el:{},
env:{
"css":"http://getfirebug.com/releases/lite/1.2/firebug-lite.css",
"debug":true,
"detectFirebug":true,
"dIndex":"console",
"height":295,
"hideDOMFunctions":false,
View markdown-combine-parser.ts
interface Token {
success: boolean;
value?: string;
rest?: string;
data?: string;
};
interface ParserFn {
(input?: string): Token;
};
You can’t perform that action at this time.