Skip to content

Instantly share code, notes, and snippets.

View sokolovstas's full-sized avatar
🎄

Stanislav sokolovstas

🎄
View GitHub Profile
@sokolovstas
sokolovstas / gist:a31ff0d5142b047b1d6db3a855f273fd
Last active July 14, 2022 04:12
html preprocess for Angular
//////// extra-webpack.config.js ////////
module.exports = async (config, options) => {
process.env.MODE = config.mode;
...
config.resolveLoader.alias = {
'raw-loader': path.resolve(__dirname, 'utils/build/test-tag-purge.js'),
};
};
static parseBoolean(str: any): boolean {
if (str === true) {
return true;
}
if (str === false) {
return false;
}
if (str === 1) {
return true;
}
@sokolovstas
sokolovstas / .eslintrc.js
Last active April 5, 2019 05:36
VUE + ESlint + TypeScript + Prettier + ChromeDEV FIX
module.exports = {
root: true,
env: {
node: true
},
extends: ["plugin:vue/essential", "@vue/prettier", "@vue/typescript"],
rules: {
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
quotes: ["error", "single"],
@sokolovstas
sokolovstas / getsentry.go
Created April 28, 2017 20:09 — forked from choonkeat/getsentry.go
Support for github.com/pkg/errors's stacktrace to github.com/getsentry/raven-go kudos to @pierrre
// Package ravenerrors adds support for github.com/pkg/errors's stacktrace to github.com/getsentry/raven-go.
//
// https://github.com/getsentry/raven-go/issues/88#issuecomment-269002948
//
// It works as a replacement for github.com/getsentry/raven-go.CaptureError*.
// Stacktraces are extracted from the error if available and replace raven's default behavior.
package ravenerrors
import (
"reflect"
--langdef=Go
--langmap=Go:.go
--regex-Go=/func([ \t]+\([^)]+\))?[ \t]+([a-zA-Z0-9_]+)/\2/f,function/
--regex-Go=/var[ \t]+([a-zA-Z_][a-zA-Z0-9_]*)/\1/v,variable/
--regex-Go=/type[ \t]+([a-zA-Z_][a-zA-Z0-9_]*)/\1/t,typedef/
--langdef=Typescript
--langmap=Typescript:.ts
--regex-Typescript=/^[ \t]*(export)?[ \t]*class[ \t]+([a-zA-Z0-9_]+)/\2/c,class/
--regex-Typescript=/^[ \t]*(export)?[ \t]*module[ \t]+([a-zA-Z0-9_]+)/\2/n,module/

Keybase proof

I hereby claim:

  • I am sokolovstas on github.
  • I am sokolovstas (https://keybase.io/sokolovstas) on keybase.
  • I have a public key whose fingerprint is 4F14 9190 E07C 7DF1 904F 3A3E EE5F F6C4 96BB 0DFB

To claim this, I am signing this object: