Skip to content

Instantly share code, notes, and snippets.

View deepsweet's full-sized avatar

Kir Belevich deepsweet

View GitHub Profile
@stokito
stokito / howto_webdav_lighttpd_openwrt.md
Last active October 22, 2023 11:46
WebDAV with Lighttpd on OpenWRT
@sindresorhus
sindresorhus / esm-package.md
Last active November 17, 2024 12:06
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.

How to enable page translator in Firefox

Firefox has a page translator (similar to one in Chrome) turned off by default. Even though it is a bit buggy, it works well enough for a normal user.

Here is how to enable it:

  1. Сreate Yandex.Translate API key*:
  • Make yourself familiar with Yandex Translator API Terms of Use.
  • Create a Yandex Translator API key (you gonna need a Yandex account).
  1. Go to about:config and:
@arainho
arainho / zoom_uninstall_macos.sh
Last active January 26, 2024 11:46
uninstall zoom.us and disable nasty features
#!/usr/bin/env bash
# sources
https://drive.google.com/drive/folders/1MP0cNLyJjzPLNrvNDCZv9hRuif091f0c
https://apple.stackexchange.com/questions/358651/unable-to-completely-uninstall-zoom-meeting-app
https://medium.com/bugbountywriteup/zoom-zero-day-4-million-webcams-maybe-an-rce-just-get-them-to-visit-your-website-ac75c83f4ef5
echo Stopping Zoom...
pkill "zoom.us"
@tkrotoff
tkrotoff / FrontendFrameworksPopularity.md
Last active November 8, 2024 20:14
Front-end frameworks popularity (React, Vue, Angular and Svelte)
@davidgilbertson
davidgilbertson / http2.js
Last active October 15, 2024 02:20
HTTP2 server with compression and caching
const http2 = require('http2');
const fs = require('fs');
const path = require('path');
const zlib = require('zlib');
const brotli = require('brotli'); // npm package
const PORT = 3032;
const BROTLI_QUALITY = 11; // slow, but we're caching so who cares
const STATIC_DIRECTORY = path.resolve(__dirname, '../dist/');
const cache = {};
@WebReflection
WebReflection / esm-in-nodejs.md
Last active October 20, 2021 14:54
Solving the "ESM in NodeJS" Odyssey.

Solving the "ESM in NodeJS" Odyssey.

After months of discussions in a dedicated group, it's clear to me NodeJS is still stuck in finding a way to deliver native ESM to its users.

The "usual few" won't hear anything different from .mjs, but .mjs has been demonstrated to be not a solution neither.

Following few cases not covered by .mjs:

  • evaluation of any string, via CLI, or on demand, where there is no extension
  • tools that convert their syntax into JS, since it always worked to date (thanks to transpilers, bundlers, and loaders)
@agrcrobles
agrcrobles / android_instructions_29.md
Last active August 29, 2024 11:04 — forked from patrickhammond/android_instructions.md
Setup Android SDK on OSX with and without the android studio

Hi, I am a fork from https://gist.github.com/patrickhammond/4ddbe49a67e5eb1b9c03.

A high level overview for what I need to do to get most of an Android environment setup and maintained on OSX higher Catalina and Big Sur with and without Android Studio been installed.

Considering the SDK is installed under /Users/<your_user>/Library/Android/sdk folder which is the Android Studio preferred SDK location, but it works fine under /usr/local/share/android-sdk as well, which is a location pretty much used on CI mostly.

Prerequisites:

https://github.com/shyiko/jabba instead ?

@justinlevi
justinlevi / disable-adobe.sh
Created November 16, 2017 17:55
Disable all Adobe Processes
#!/bin/bash
launchctl unload -w /Library/LaunchAgents/com.adobe.AdobeCreativeCloud.plist
launchctl unload -w /Library/LaunchAgents/com.adobe.AAM.Updater-1.0.plist
launchctl unload -w /Library/LaunchAgents/com.adobe.ARMDCHelper.cc24aef4a1b90ed56a725c38014c95072f92651fb65e1bf9c8e43c37a23d420d.plist
launchctl unload -w /Library/LaunchDaemons/com.adobe.agsservice.plist
launchctl unload -w /Library/LaunchDaemons/com.adobe.ARMDC.Communicator.plist
launchctl unload -w /Library/LaunchDaemons/com.adobe.ARMDC.SMJobBlessHelper.plist
launchctl unload -w /Library/LaunchDaemons/com.adobe.adobeupdatedaemon.plist
sudo launchctl unload -w /Library/LaunchDaemons/com.adobe.ARMDC.Communicator.plist
diff -ur minidlna-1.2.1/albumart.c minidlna-1.2.1-cover-resize/albumart.c
--- minidlna-1.2.1/albumart.c 2017-08-24 19:28:25.000000000 +0200
+++ minidlna-1.2.1-cover-resize/albumart.c 2017-09-10 00:34:02.000000000 +0200
@@ -67,15 +67,18 @@
strncpyt(cache_dir, cache_file, sizeof(cache_dir));
make_dir(dirname(cache_dir), S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH);
+ if( runtime_vars.cover_size <= 0 )
+ return image_save_to_jpeg_file(imsrc, cache_file);
+