Skip to content

Instantly share code, notes, and snippets.

header missing
https://github.com/castwide/vscode-solargraph/issues/78#issuecomment-552675511
@mixin for-phone-s-only {
@media (max-width: 320px) {
@content;
}
}
@mixin for-phone-only {
@media (max-width: 500px) {
@content;
}
### Get all character after START_WITH
(?<=^START_WITH)(.*)
@abzeede
abzeede / sass-resources-loder-webpacker.js
Created April 15, 2020 13:43
config webpacker to support sass-resources-loder
// config/webpack/environment.js
const { environment } = require('@rails/webpacker')
const {
resolved_paths: includePaths,
} = require('@rails/webpacker/package/config')
const getStyleRule = require('@rails/webpacker/package/utils/get_style_rule')
environment.loaders.delete('sass')
environment.loaders.insert(
@abzeede
abzeede / download_pdf_axios.js
Last active May 19, 2023 14:37
download pdf file with axios
export const getPdfInvoice = async () => {
let csrfToken = document.getElementsByName('csrf-token')[0].content
try {
const resp = await axios.get('ENDPOINT', {
responseType: 'blob',
})
// create temp download url
const downloadUrl = window.URL.createObjectURL(resp.data)
@abzeede
abzeede / sitemap
Last active August 27, 2020 02:26
web_knowledge
What're the benefits of Sitemap, answer by google engineer
- https://webmasters.stackexchange.com/questions/4803/the-sitemap-paradox