Learn NodeJS by building 10 projects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |