Skip to content

Instantly share code, notes, and snippets.

View lysenkooo's full-sized avatar
🏠
Remote

Denis Lysenko lysenkooo

🏠
Remote
View GitHub Profile
@beeyev
beeyev / docker-unlock.md
Last active August 26, 2024 14:28
Прокси сервер для registry-1.docker.io - hub.docker.com / Обход блокировки Docker Registry - зеркало Docker Hub

UPD: 2024-06-03, Docker HUB разблокрирван в росссии, инструкация и данные в ней потеряли актуальность.

Этот прокси можно использовать, если вы получаете ошибку

Error response from daemon: pull access denied for nginx, repository does not exist or may 
require 'docker login': denied: 403 Forbidden Since Docker is a US company, 
we must comply with US export control regulations. In an effort to comply with these, we now block 
all IP addresses that are located in Cuba, Iran, North Korea, Republic of Crimea, Sudan, and Syria. 
If you are not in one of these cities, countries, or regions and are blocked, 
# Makes git push and creates Merge Request at the same time
# If you follow branch naming convention like "ucp-123/new-authorization", MR title will be "UCP-123 New authorization", which will be cross-linked to Jira
# Make sure to replace "ucp" with your shortcut.
# IMPORTANT PREREQUISITE: to run `git config committer.name <your_gitlab_username>` once, so that it gets used for `make publish!` to assign MR to you
USERNAME := $(shell git config committer.name)
BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
ticket_pattern := ucp-[0-9][0-9][0-9]
TICKET := $(shell git rev-parse --abbrev-ref HEAD | grep -o '$(ticket_pattern)' | tr [:lower:] [:upper:])
@scyto
scyto / docker-swarm-architecture.md
Last active September 12, 2024 15:15
My Docker Swarm Architecture
@mutantcornholio
mutantcornholio / btt_mute.scpt
Created May 14, 2020 11:47
BetterTouchTool mute toggle
tell application "BetterTouchTool"
if input volume of (get volume settings) = 0 then
update_trigger "E932FDB1-172A-4D4A-A710-5494CC41AB3D" json "{
\"BTTIconData\": \"TU0AKgAAQAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
@borischerkasky
borischerkasky / full_script.rb
Created August 11, 2019 19:18
full Github PR statistics script
class TeamPrStatistics
attr_accessor :team, :stats
class Stat
attr_accessor :titles
attr_reader :name
def initialize(name)
@name = name
@titles = []
end
@comm1x
comm1x / jira-copy-task.js
Created January 14, 2019 15:31
Add button "Copy task name" to JIRA
// ==UserScript==
// @name Copy jira task name
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://kafoodle.atlassian.net/browse/*
// @grant none
// ==/UserScript==
@jonasraoni
jonasraoni / Flattener.cs
Created July 14, 2018 14:46
Flatten Array in C#
using System;
using System.Collections;
using System.Collections.Generic;
/// <summary>
/// Extends the Array with the Flatten method
/// </summary>
public static class Flattener {
/// <summary>
/// Given a N-dimensional array, flattens it into a new one-dimensional array without modifying the elements' order
@Chocksy
Chocksy / kill_sidekiq_job.rb
Last active July 16, 2024 16:24
Kill sidekiq jobs by process id for busy jobs and by jid for other sets.
# FOR BUSY JOBS
# take the process_id from the /busy page in sidekiq and kill the longest running one.
workers = Sidekiq::Workers.new
long_process_id = 'integration.3:4:71111aaa111' # Eg: 'integration.3:4:71d1d7f4ef5a'
workers.each do |process_id, thread_id, work|
process = Sidekiq::Process.new('identity' => process_id)
process.stop! if process_id == long_process_id
end
# FOR SCHEDULED JOBS
@abler98
abler98 / vk-audio-downloader.js
Last active June 24, 2024 21:55
Скрипт для скачивания музыки VK
/*
Инструкция по использованию:
- заходим в раздел с аудиозаписями
- листаем в самый низ (чтобы прогрузились все аудиозаписи)
- открываем консоль браузера (F12 -> Консоль)
- вставляем код и нажимаем ENTER
- скачивание началось...
- браузер может потребовать разрешение на сохранение файлов, необходимо подтвердить действие
@ebidel
ebidel / object-observe-proxy-polyfill.js
Last active July 29, 2021 04:08
Object.observe() polyfill using ES6 Proxies (POC)
// An `Object.observe()` "polyfill" using ES6 Proxies.
//
// Current `Object.observe()` polyfills [1] rely on polling
// to watch for property changes. Proxies can do one better by
// observing property changes to an object without the need for
// polling.
//
// Known limitations of this technique:
// 1. the call signature of `Object.observe()` will return the proxy
// object. The original object needs to be overwritten with this return value.