Skip to content

Instantly share code, notes, and snippets.

View mykhailo-petrenko's full-sized avatar
🇺🇦
Slava Ukraïni!

Mykhailo Petrenko mykhailo-petrenko

🇺🇦
Slava Ukraïni!
View GitHub Profile
@mykhailo-petrenko
mykhailo-petrenko / Dockerfile
Last active September 7, 2023 15:23
Error: Failed to launch chrome! spawn .. node_modules/puppeteer/.local-chromium/linux .. /chrome-linux/chrome ENOENT
# Use container with installed chromium and $PUPPETEER_EXECUTABLE_PATH
# https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
FROM node:20.2.0-alpine
RUN apk add --update-cache \
chromium \
nss \
freetype \
harfbuzz \
ca-certificates \
@mykhailo-petrenko
mykhailo-petrenko / run-local-container.sh
Created January 25, 2023 10:06
Make Localhost accessible/available from the Docker Container
docker run -it --rm -p 5000:5000 \
--add-host=host.docker.internal:host-gateway
@mykhailo-petrenko
mykhailo-petrenko / osxvpnrouting.markdown
Created March 18, 2022 16:55 — forked from taldanzig/osxvpnrouting.markdown
Routing tips for VPNs on OS X

Routing tips for VPNs on OS X

When VPNs Just Work™, they're a fantastic way of allowing access to a private network from remote locations. When they don't work it can be an experience in frustration. I've had situations where I can connect to a VPN from my Mac, but various networking situations cause routing conflicts. Here are a couple of cases and how I've been able to get around them.

Specific cases

Case 1: conflicting additional routes.

In this example the VPN we are connecting to has a subnet that does not conflict with our local IP, but has additional routes that conflict in some way with our local network's routing. In my example the remote subnet is 10.0.x.0/24, my local subnet is 10.0.y.0/24, and the conflicting route is 10.0.0.0/8. Without the later route, I can't access all hosts on the VPN without manually adding the route after connecting to the VPN:

echo "Hash;Author;Date;Commit" > 'report.csv'
git log --pretty=format:'%h;%an;%ad;%s' --author='Author 1' >> 'report.csv'
git log --pretty=format:'%h;%an;%ad;%s' --author='Author 2' >> 'report.csv'
#
// npm install -D glob spritesmith spritesheet-templates
const fs = require('fs');
const glob = require('glob');
const Spritesmith = require('spritesmith');
const templater = require('spritesheet-templates');
const icons = glob.sync('./src/icons/*.png');
const spritePath = `${__dirname}/sprite.png`;
const spriteRelativePath = `/sprite.png`;