Skip to content

Instantly share code, notes, and snippets.

View thinh105's full-sized avatar
😁

Thinh Nguyen thinh105

😁
  • Hanoi - Vietnam
  • 10:22 (UTC +07:00)
View GitHub Profile
// create a bookmark and use this code as the URL, you can now toggle the css on/off
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3
javascript: (function() {
var styleEl = document.getElementById('css-layout-hack');
if (styleEl) {
styleEl.remove();
return;
}
styleEl = document.createElement('style');
styleEl.id = 'css-layout-hack';
@i-hardy
i-hardy / actions.js
Last active July 29, 2020 12:06
Streamlining Vuex actions with async/await and higher-order functions
import axios from 'axios';
export const fetchSomeData = async (store, params) => {
try {
const res = await axios.get(`endpoint/${params.id}`);
return store.commit('SET_SOME_DATA', res.data.result);
} catch (error) {
console.error(error.message);
}
};
@ktrysmt
ktrysmt / .zshrc
Created May 26, 2017 15:37
using zplug in zsh
if [[ ! -d ~/.zplug ]];then
git clone https://github.com/zplug/zplug ~/.zplug
fi
source ~/.zplug/init.zsh
zplug "plugins/git", from:oh-my-zsh
zplug "plugins/git", from:oh-my-zsh
zplug "plugins/sudo", from:oh-my-zsh
zplug "plugins/command-not-found", from:oh-my-zsh
zplug "zsh-users/zsh-syntax-highlighting"
zplug "zsh-users/zsh-history-substring-search"
@lucduong
lucduong / learn_nodejs_by_building_10_project.md
Created February 24, 2017 01:21
Learn NodeJS by building 10 Projects

Learn NodeJS by building 10 projects

Project 1: Simple Web Server

Project 2: Basic Express Website

Project 3: User Login System

Project 4: Node Blog Systems