Skip to content

Instantly share code, notes, and snippets.

View ndkhoa's full-sized avatar

Nguyen Dang Khoa ndkhoa

View GitHub Profile
@ndkhoa
ndkhoa / agnoster-newline.zsh-theme
Created October 31, 2018 09:21 — forked from nweddle/agnoster-newline.zsh-theme
Agnoster ZSH Theme with New Line
# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
# Make sure you have a recent version: the code points that Powerline
@ndkhoa
ndkhoa / noti.sh
Created December 7, 2018 06:55 — forked from John-Almardeny/noti.sh
Create a Notification With Sound with a Given Message and Time in Linux-Like OS
#!/bin/sh
# https://gist.github.com/John-Almardeny/04fb95eeb969aa46f031457c7815b07d
# Create a Notification With Sound with a Given Message and Time
# The Downloaded Sound is from Notification Sounds https://notificationsounds.com/
MSSG="$1"
TIME="$2"
# install wget if not found
@ndkhoa
ndkhoa / README-Template.md
Created April 19, 2019 08:47 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@ndkhoa
ndkhoa / .bashrc
Created July 17, 2019 11:12 — forked from vsouza/.bashrc
Golang setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell, fish or bash.
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
Link full khóa training device driver của embedded Linux ở đây nhé các bạn. Đây là video mình record trong khóa trước, do bị mắc 1 số lỗi về quay phát nên mình sẽ record lại trong khóa hiện tại mình đang dạy.
Bài 1: Kernel module - simple character device.
https://bit.ly/2AzsxrB
Bài 2: Giới thiệu về cơ chế timer trong hệ điều hành.
https://bit.ly/2O2rDpy
Bài 3: Hướng dẫn lập trình điều khiển interrupt trong Linux
kernel. https://bit.ly/2vtenmk
Bài 4: Giới thiệu về cơ chế system call trên Linux.
https://bit.ly/2KkXm32
Bài 5: Giới thiệu về kỹ thuật IPC - Inter Process Communication.
@ndkhoa
ndkhoa / Jenkinsfile
Created October 16, 2019 10:49 — forked from paulmthiebauth/Jenkinsfile
Jenkins Rcov Publisher MetricTarget Syntax
#The snippet generator for RcovPublisher in Jenkins is incomplete.
#When you add in metric values for desired coverage percentages, the generator doesnt provide the syntax.
#Here it is served up on a silver platter.
step([$class: 'RcovPublisher', reportDir: 'coverage/rcov', targets: [[$class: 'hudson.plugins.rubyMetrics.rcov.model.MetricTarget', metric: 'TOTAL_COVERAGE', healthy: 87, unhealthy: 86, unstable:85], [$class: 'hudson.plugins.rubyMetrics.rcov.model.MetricTarget', metric: 'CODE_COVERAGE', healthy: 87, unhealthy: 86, unstable: 85]]])
@ndkhoa
ndkhoa / docker-compose-v1.yml
Created January 7, 2020 08:46 — forked from markheath/docker-compose-v1.yml
Elasticsearch docker compose examples
version: '2.2'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.4.1
container_name: elasticsearch
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
@ndkhoa
ndkhoa / Dockerfile
Created December 2, 2020 04:33 — forked from armand1m/Dockerfile
Yarn cache compatible Dockerfile
FROM alpine
RUN apk add --update --no-cache nodejs
RUN npm i -g yarn
ADD package.json yarn.lock /tmp/
ADD .yarn-cache.tgz /
RUN cd /tmp && yarn
RUN mkdir -p /service && cd /service && ln -s /tmp/node_modules
@ndkhoa
ndkhoa / handling_multiple_github_accounts.md
Created December 24, 2020 02:53 — forked from Jonalogy/handling_multiple_github_accounts.md
Handling Multiple Github Accounts on MacOS

Handling Multiple Github Accounts on MacOS

The only way I've succeeded so far is to employ SSH.

Assuming you are new to this like me, first I'd like to share with you that your Mac has a SSH config file in a .ssh directory. The config file is where you draw relations of your SSH keys to each GitHub (or Bitbucket) account, and all your SSH keys generated are saved into .ssh directory by default. You can navigate to it by running cd ~/.ssh within your terminal, open the config file with any editor, and it should look something like this:

Host *
 AddKeysToAgent yes

> UseKeyChain yes