Skip to content

Instantly share code, notes, and snippets.

@andraaspar
andraaspar / webpack.debug.config.js
Last active April 19, 2017 11:55
Replace __WEBPACK_IMPORTED_MODULE_ in Webpack output
const baseConfig = require('./webpack.config.js')
const RawSource = require('webpack-sources').RawSource
baseConfig.plugins.push(function() {
this.plugin('emit', (compilation, callback) => {
compilation.chunks.forEach((chunk) => {
chunk.files.filter((filename) => /\.js$/.test(filename)).forEach((filename) => {
var source = compilation.assets[filename].source()
compilation.assets[filename] = new RawSource(source.replace(/__WEBPACK_IMPORTED_MODULE_/g, '__'))
@andraaspar
andraaspar / re.txt
Last active March 21, 2017 08:11
RegEx for replacing quotes with backticks in ES6
'
`
from `([^`]*)`
from '$1'
`([^`]*)`:
'$1':
ᐽи𝔡Ʀẚƽ Ꭾ𐐪ɼᒇτĸ∂
🜁ᴒᕍⴽᓈς ᕈ⧜☈ᖙﺎ🕂⛏Ꮹ
@andraaspar
andraaspar / albums-0-of-3.json
Last active March 11, 2024 12:24
Favourite albums & tracks
[
{
"artistName": "",
"albumTitle": ""
},
{
"artistName": "Godflesh",
"albumTitle": "Purge"
},
{
@andraaspar
andraaspar / keybindings.json
Last active March 20, 2017 11:03
Visual Studio Code settings
// Place your key bindings in this file to overwrite the defaults
[
{ "key": "ctrl+d", "command": "editor.action.copyLinesDownAction", "when": "editorFocus" },
{ "key": "ctrl+shift+d", "command": "editor.action.deleteLines", "when": "editorFocus" },
{ "key": "ctrl+shift+k", "command": "workbench.action.tasks.runTask" },
{ "key": "ctrl+alt+right", "command": "workbench.action.compareEditor.nextChange", "when": "editorFocus" },
{ "key": "ctrl+alt+left", "command": "workbench.action.compareEditor.previousChange", "when": "editorFocus" },
{ "key": "shift+alt+w", "command": "editor.emmet.action.wrapWithAbbreviation", "when": "editorFocus" },
{ "key": "ctrl+shift+n", "command": "workbench.files.action.showActiveFileInExplorer", "when": "editorFocus" },
{ "key": "ctrl+-", "command": "editor.action.commentLine", "when": "editorFocus" },
@andraaspar
andraaspar / .htaccess
Created May 6, 2016 09:12
Serving web fonts such that even Microsoft Edge browser can print them
<IfModule mod_headers.c>
<filesMatch "\\.(woff|woff2|eot)$">
Header set access-control-allow-origin "*"
</filesMatch>
</IfModule>
{
"indent_with_tabs": true,
"indent_size": 4,
"preserve_newlines": true,
"max_preserve_newlines": 1,
"indent_inner_html": true,
"wrap_line_length": 110,
"_default_unformatted": [
"a", "span", "img", "bdo", "em", "strong", "dfn", "code", "samp", "kbd", "var", "cite", "abbr", "acronym", "q", "sub", "sup", "tt", "i", "b", "big", "small", "u", "s", "strike", "font", "ins", "del", "pre", "address", "dt", "h1", "h2", "h3", "h4", "h5", "h6"
],
@andraaspar
andraaspar / jira.js
Last active January 3, 2023 13:20
Tampermonkey: Sets JIRA comment order to ascending & loads all comments.
// ==UserScript==
// @name JIRA
// @namespace andraaspar
// @version 0.10.2
// @description Reverses JIRA comment order & loads all comments, tweaks issue list.
// @author AP
// @match https://ovitas.atlassian.net/*
// @run-at document-idle
// ==/UserScript==
@andraaspar
andraaspar / magyar-hejes-írás.txt
Last active August 4, 2016 13:32
magyar hejes írás – ahoġ lennie kéne
sertés żírral ċak a hüje főz | ? miért nem haṡnálṡ inkább olajat | jobb a ṡívednek is | ! öṡṡefut a ṅál a ṡámban
az eqőm tanáċára lánwával fogtam halat | de a jukas kondérból mind kiúṡott
@andraaspar
andraaspar / magyar-abc.txt
Last active August 4, 2016 13:29
magyar abc – ahogy lennie kéne (és felejtsd el a nagy betűket)
a
á
b
c
cs ċ
d
dz q
dzs w
e
é