Skip to content

Instantly share code, notes, and snippets.

View lindstrm's full-sized avatar
🙃

Joachim Lindström lindstrm

🙃
View GitHub Profile
I was able to do this today using sass-resources-loader as per @sqal 's suggestion.
I changed vue-cli's familiar loaders block from the default:
loaders: {
sass: 'vue-style-loader!css-loader!postcss-loader!sass-loader?indentedSyntax=1',
scss: 'vue-style-loader!css-loader!postcss-loader!sass-loader',
}
...to the array/object syntax that you'd use in module.rules.use. Here's my entire block for vue-loader:
@lindstrm
lindstrm / snippets.json
Last active September 15, 2018 09:32
plugins and settings for vscode
{
"Print to console": {
"prefix": "log",
"body": [
"console.log($1);"
],
"description": "Log output to console"
}
}
module.exports = () => {console.log('Hello from Gist')}
@lindstrm
lindstrm / 0_reuse_code.js
Created November 7, 2015 23:36
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge, chrome=1" />
<title>untitled</title>
<link rel="stylesheet" href="" />
</head>
<body>
@lindstrm
lindstrm / gist:4133325
Created November 22, 2012 23:34 — forked from afeld/gist:1254889
YouTube video ID regex
# Parses YouTube URLs directly or from iframe code. Handles:
# * Address bar on YouTube url (ex: http://www.youtube.com/watch?v=ZFqlHhCNBOI)
# * Direct http://youtu.be/ url (ex: http://youtu.be/ZFqlHhCNBOI)
# * Full iframe embed code (ex: <iframe src="http://www.youtube.com/embed/ZFqlHhCNBOI">)
# * Old <object> tag embed code (ex: <object><param name="movie" value="http://www.youtube.com/v/ZFqlHhCNBOI">...)
/(youtu\.be\/|youtube\.com\/(watch\?(.*&)?v=|(embed|v)\/))([^\?&"'>]+)/
$5 #=> the video ID
# test it on Rubular: http://rubular.com/r/eaJeSMkJvo