Skip to content

Instantly share code, notes, and snippets.

View predragnikolic's full-sized avatar

Предраг Николић predragnikolic

View GitHub Profile
@2color
2color / test.yaml
Last active April 10, 2024 18:57
How to run integration tests with PostgreSQL and Prisma on GitHub Actions
# .github/workflows/test.yaml
name: test
on: push
jobs:
test:
runs-on: ubuntu-latest
# Service containers to run with `container-job`
services:
# Label used to access the service container
postgres:
import sublime, sublime_plugin
import re
import threading
# This is an example plugin that simulates a completion interaction with an
# LSP server, while correctly apply any edits that are received from the
# server. This is trickier than you'd expect, due to the async nature the
# server communication, the async auto complete system in Sublime Text, and
# the use of row+col offsets within the LSP protocol.
@eeropic
eeropic / nestedproxy.js
Created September 25, 2019 18:42
nested object proxy handler from Michał Perłakowski & James Coyle at https://stackoverflow.com/questions/41299642/how-to-use-javascript-proxy-for-nested-objects
const handler = {
get(target, key) {
if (key == 'isProxy')
return true;
const prop = target[key];
if (typeof prop == 'undefined')
return;
if (!prop.isProxy && typeof prop === 'object')
target[key] = new Proxy(prop, handler);
@w33zy
w33zy / jpg-png-optimize.md
Created January 4, 2018 20:39 — forked from VirtuBox/jpg-png-optimize.md
Optimize your jpg & png images with jpegoptim and optipng on linux

JPG and PNG image bulk optimization

Install jpegoptim and optipng

apt update && apt install jpegoptim optipng -y

JPG optimization

cd /path/to/your/image/folder