Skip to content

Instantly share code, notes, and snippets.

View hongquan's full-sized avatar
🏠
Working from home

Nguyễn Hồng Quân hongquan

🏠
Working from home
View GitHub Profile
@hongquan
hongquan / Vue3LottieWeb.vue
Created September 20, 2021 11:30
Lottie for Vue 3
<template>
<div ref='container'></div>
</template>
<script lang='ts'>
import { defineComponent, onMounted, PropType, ref, toRefs, watch } from 'vue'
import lottie, { AnimationItem, AnimationConfigWithData } from 'lottie-web'
export default defineComponent({
props: {

Keybase proof

I hereby claim:

  • I am hongquan on github.
  • I am hongquan (https://keybase.io/hongquan) on keybase.
  • I have a public key ASDWDg98bWXaIQm0wvjOoY6PTXyKiOCmj6IEtj7dBfhBTAo

To claim this, I am signing this object:

@hongquan
hongquan / Idea.md
Created June 29, 2018 15:22
Ý tưởng phần mềm Ruabien, sắp lịch Tình nguyện viên bảo tồn động vật hoang dã

Mục đích

Ứng dụng giúp sắp xếp các TNV theo nhóm, mỗi nhóm sẽ làm việc 1 tuần, hoặc số ngày cố định, tùy chương trình.

Action flow

  • Admin tạo chương trình mới, đặt tên, đặt ngày tháng bắt đầu và kết thúc, đặt ngày "mở đăng ký".
  • Sinh khung thời gian làm việc (timeslot). Admin chỉ định số ngày mỗi khung sẽ kéo dài (mặc định là 7). Ứng dụng sẽ dựa vào ngày tháng của chương trình để sinh các slot.
  • Tới ngày mở đơn đăng ký, địa chỉ của đơn đăng ký sẽ có thể được truy cập (public available).
  • Khi truy cập link đăng ký, người dùng sẽ được yêu cầu đăng nhập, hoặc đăng ký nếu chưa có tài khoản.
@hongquan
hongquan / OOPvsFunctional.ipynb
Last active December 25, 2016 03:04
OOP vs Functional programming, Stateful vs Stateless
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hongquan
hongquan / network
Created November 26, 2016 02:12
Sample config for OpenWrt in VirtualBox
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd2c:312f:e853::/48'
config interface 'lan'
@hongquan
hongquan / quan.zsh-theme
Created October 25, 2014 03:05
Oh-my-zsh theme, with folder path being reduced, like in Prezto
local user='%{$fg[magenta]%}%n@%{$fg[magenta]%}%m%{$reset_color%}'
#local pwd='%{$fg[blue]%}%~%{$reset_color%}'
local rvm=''
if which rvm-prompt &> /dev/null; then
rvm='%{$fg[green]%}‹$(rvm-prompt i v g)›%{$reset_color%}'
else
if which rbenv &> /dev/null; then
rvm='%{$fg[green]%}‹$(rbenv version | sed -e "s/ (set.*$//")›%{$reset_color%}'
fi
@hongquan
hongquan / conkyrc
Created April 29, 2014 17:18
Conky snippet to get HDD temperature
${execi 120 echo "mypassword" | sudo -S hddtemp /dev/sda -n --unit=C 2>/dev/null}°C
@hongquan
hongquan / turnon_usb3g.sh
Created April 17, 2014 17:57
Script to switch USB 3G to modem
#!/bin/sh
if ! $(lsusb | grep E173 > /dev/null); then
echo 'Device not plugged'
exit
fi
if $(usb-devices | grep 'Driver=option' > /dev/null); then
echo 'Modem mode has been on'
exit
fi
@hongquan
hongquan / README.md
Last active December 15, 2015 06:48
Upstart job scrips to launch Supybot as multiple IRC bots.

Install

  • Make sure you installed Supybot.

  • These Upstart scripts assume you configured Supybot as:

    • Running under supybot user.
    • Have /home/supbybot/running/ folder to contain data of all running instances (multiple bot).
    • This running folder is divided to many subfolders, each for a channel each bot joins. For example, you want an instance of Supybot to listen on #fossasia channel, you create /home/supbybot/running/fossasia folder. Right in this folder, you can running supybot-wizard command to setup the bot. The name of config file has to be the channel name. For example, fossasia.conf file for #fossasia channel.
  • Upstart scrips are installed in /etc/init/.

  • Document to read more: http://supybook.fealdia.org/latest/, http://supybot.fr.cr/doc/use/index.html