This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # frozen_string_literal: true | |
| # .zshrc | |
| # alias k="~/kubectl.rb" | |
| # Usage: | |
| # k prod/my_app get pods | |
| # k prod.my_app get pods | |
| # k prod get pods |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* возвращаем github к фиксированной ширине */ | |
| .js-header-wrapper { | |
| background-color: #24292e; | |
| } | |
| header.Header { | |
| padding-left: 16px; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ThreadPool | |
| attr_reader :pool_size, :queue_size, :block | |
| def initialize(pool_size:, queue_size:, &block) | |
| @pool_size = pool_size | |
| @queue_size = queue_size | |
| @block = block | |
| pool | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| scheduler = | |
| Ractor.new do | |
| loop do | |
| Ractor.yield Ractor.recv | |
| end | |
| end | |
| workers = | |
| 8.times.map do |i| | |
| Ractor.new(scheduler, Ractor.current) do |r_input, r_output| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| source_env() { | |
| if [[ -f .env ]]; then | |
| source .env | |
| fi | |
| } | |
| autoload -U add-zsh-hook | |
| add-zsh-hook chpwd source_env | |
| source_env |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://developer.apple.com/library/archive/technotes/tn2450/_index.html | |
| # 0xE1 - Left Shift | |
| # 0x35 - ` and ~ | |
| # 0x64 - § and ± | |
| # ± => ~ | |
| # ~ => left shift | |
| hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000035,"HIDKeyboardModifierMappingDst":0x7000000E1},{"HIDKeyboardModifierMappingSrc":0x700000064,"HIDKeyboardModifierMappingDst":0x700000035}]}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # view info about format | |
| ffmpeg -i https://my.com/my.m3u8 | |
| # save audio/video to file | |
| ffmpeg -i https://my.com/my.m3u8 -c copy out.mp4 | |
| ffmpeg -i https://my.com/my.m3u8 -c copy out.flac |
OlderNewer