Skip to content

Instantly share code, notes, and snippets.

View saionaro's full-sized avatar

Artem Shibakov saionaro

View GitHub Profile
@saionaro
saionaro / ru.conf
Created August 18, 2026 10:20
ru configs for vpn
# Shadowrocket: 2026-08-18 13:20:38
[General]
bypass-system = true
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, localhost, *.local, captive.apple.com
tun-excluded-routes = 10.0.0.0/8, 100.64.0.0/10, 127.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.0.0.0/24, 192.0.2.0/24, 192.88.99.0/24, 192.168.0.0/16, 198.51.100.0/24, 203.0.113.0/24, 224.0.0.0/4, 255.255.255.255/32, 239.255.255.250/32
dns-server = system,1.1.1.1
fallback-dns-server = system,8.8.8.8
ipv6 = true
prefer-ipv6 = false
dns-fallback-system = false
// If you want to use an embedded runtime chunk for one bundle and one common for the rest
const STANDALONE_ENTRYPOINT_NAME = "entry_name";
module.exports = {
...
optimization: {
...
runtimeChunk: {
name: ({ name }) => (name === STANDALONE_ENTRYPOINT_NAME ? STANDALONE_ENTRYPOINT_NAME : 'runtime')
},
@saionaro
saionaro / compress.js
Last active August 31, 2020 08:29
Images optimization script
const compressImages = require("compress-images");
const VERBOSE = false;
const WEBP_QUALITY = 65;
const JPEG_QUALITY = 75;
const PNG_QUALITY_MIN = 40;
const PNG_QUALITY_MAX = 75;
const DEST_DIR = "./src/images/";
const SRC_DIR = "./src/images/original";
@saionaro
saionaro / antd-icons.js
Created September 2, 2019 07:53
Cutting off extra Ant Design icons from a Webpack bundle. ~400 kb bundle size reduce
// export the only icons you need
export {
default as DownOutline
} from "@ant-design/icons/lib/outline/DownOutline";
export {
default as UpOutline
} from "@ant-design/icons/lib/outline/UpOutline";
@saionaro
saionaro / directUploading.ts
Last active October 13, 2020 12:31
A direct file uploading, react native edition
//...
// some interfaces imports skipped
//...
const createDirectUploadMutation = `
mutation createDirectUploadMutation(
$filename: String!
$byteSize: Int!
$contentType: String!
) {

Keybase proof

I hereby claim:

  • I am saionaro on github.
  • I am shibakow (https://keybase.io/shibakow) on keybase.
  • I have a public key ASArcoqDadaKO4CNaMyyx_lUY0Bry7eyUfP79XYc_sQZ8Qo

To claim this, I am signing this object:

const tests = [
[[3, 5, 6, 2, 1, 3, 6], 7],
[[5, 5, 7], 6],
[[4, 2, 1, 3, 7 ], 5],
[[9], 5],
[[1], 1],
[[1, 1, 4], 2],
[[1, 1, 4], 2],
[[9, 1, 3], 3],
[[67687, 667566, 4553334, 6566, 4332, 87886, 12321], 45456]
@saionaro
saionaro / 42.js
Created November 19, 2017 11:14
42
const forCheck = [
'({(){}()})()', //true
'({(}){})', //false
'{(({}))}', // true
'{}{}(){}{}{}{}{}', // true
'{}{{}}{()}', // true
'({}{)})', // false
'))((' // false
];