Skip to content

Instantly share code, notes, and snippets.

@wzulfikar
Created September 28, 2016 08:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wzulfikar/6cf0847e435b5727c7b5e962f3d89213 to your computer and use it in GitHub Desktop.
Save wzulfikar/6cf0847e435b5727c7b5e962f3d89213 to your computer and use it in GitHub Desktop.
Snippet I use with Dash app (OSX)
// the format is
// //{description}
// {snippet}
// {sample output}
// display right arrow
>`
// display left arrow
<`
// print console.log("")
clog`
console.log("");
// print current date
date`
Wed, 28 Sep 2016
// print current time
time`
16:07:18 MYT
// print timestamp
timestamp`
Wed, 28 Sep 2016 at 16:07:39 MYT
// print lorem ipsum
lorem`
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
// print project alias for use with terminal
proj-alias`
# myNewProject
alias myNewProject-cd="cd ~/web_projects/myNewProject"
alias myNewProject-subl="myNewProject-cd && subl ."
alias myNewProject-s="myNewProject-cd && artisan serve --host 0.0.0.0 --port 8081"
alias myNewProject-st="myNewProject-cd && st ."
// print open graph meta for HTML
og`
<meta property="og:title" content="..."/>
<meta property="og:description" content="..."/>
<meta property="og:site_name" content="...">
<meta property="og:type" content="website" />
<meta property="og:url" content="http://..."/>
<meta property="og:image" itemprop="image" content="http://..."/>
<meta property="og:image:height" content=""/>
<meta property="og:image:width" content=""/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment