Skip to content

Instantly share code, notes, and snippets.

View unlight's full-sized avatar
💭
Casting fireball

Roman Vasilev unlight

💭
Casting fireball
View GitHub Profile
@unlight
unlight / tricks.sh
Last active May 10, 2022 18:30
docker tricks
docker ps | awk '{print $1}' | xargs docker stop
ctrl+\ (near enter) send SIGQUIT signal
@unlight
unlight / slide carousel.js
Created August 8, 2019 18:26
slide carousel
@unlight
unlight / delete all node_modules recursively.sh
Created August 2, 2019 17:51
delete all node_modules recursively
find . -name 'node_modules' -type d -prune -exec rm -rvf '{}' +
@unlight
unlight / Dockerfile
Created July 27, 2019 18:52
multi stage docker image
FROM alpine:3.10.1 AS base
WORKDIR /app
RUN apk add --update --no-cache nodejs
FROM base AS build
# install npm/node-gyp dependencies
# RUN apk add --virtual .gyp python make g++
RUN apk add npm python make g++
# install dependencies
COPY package*.json ./
@unlight
unlight / jq tricks.sh
Created July 3, 2019 10:53
jq tricks.sh
// encode
`echo $i | jq -rR '@uri'`
@unlight
unlight / simplytyped.md
Last active July 16, 2021 18:21
simplytyped types
@unlight
unlight / git pull all subdir.cmd
Created July 1, 2019 07:21
git pull all subdir
for i in */.git; do ( echo $i; cd $i/..; git pull; ); done
@unlight
unlight / webpack.config.js
Last active June 7, 2019 19:59
webpack-circular-dependency
// npm i -D source-map-loader webpack-cli circular-dependency-plugin babel-loader css-loader sass-loader @babel/preset-env @babel/preset-react
// npx webpack --config=~webpack.config.js
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = async (options) => ({
entry: {
app: `${__dirname}/src/index.js`,
},
output: {
path: `${__dirname}/dist`,
@unlight
unlight / index.html
Created June 3, 2019 19:04
index.js in index.html
// index.html
<script type="text/javascript">
//# sourceURL=index.js
</script>