Skip to content

Instantly share code, notes, and snippets.

Avatar
🌴
On vacation but coding

Lockevn Thach Nguyen lockevn

🌴
On vacation but coding
View GitHub Profile
@lockevn
lockevn / head.js
Created Jul 26, 2020
Inject an inline JavaScript in to head of page rendered by Nuxt
View head.js
/**
* All of these can be overrided in each page component via define method https://nuxtjs.org/api/pages-head/
* E.g.: head() { return { title: "", meta: [] } }
*/
export default {
titleTemplate: "%s - " + _WhiteLabel.brandname,
title: "Shop",
meta: [
{ "http-equiv": "utf-8" },
{ charset: "X-UA-Compatible", content: "IE=edge" },
@lockevn
lockevn / gurucore.net.ts
Created Jun 19, 2018
Download image (and binary file) to a file on disk, using axios
View gurucore.net.ts
const axios = require('axios')
/**
* Download url to a file on disk
* @param url
* @param destFile
*/
async function downloadAxios(url: string, destFile: string) {
const response = await axios({
method: 'GET',
View new_gist_file.xml
<test>
<entry>
<id>1</id>
<value>test</value>
</entry>
</test>
@lockevn
lockevn / 2_keyboard_shortcuts.md
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 2_keyboard_shortcuts.md

Create documentation for your projects. Like so:


Most popular keyboard shortcuts within GistBox

  • Up/Down - Previous/Next Gist
  • Ctrl+e - Edit a selected Gist
  • Ctrl+s - Save Gist