Skip to content

Instantly share code, notes, and snippets.

View dosandk's full-sized avatar

Volodymyr Shevchuk dosandk

View GitHub Profile
1) https://leetcode.com/problems/two-sum/
sum([1, 2, 5, 3, 4], 9) -> [2, 4]
find closest sum
sum([1, 8, 5, 6, 4], 15) -> [1, 3]
2) rotateMatrix([
[1, 2],
[3, 4]
]);
Result
@bradtraversy
bradtraversy / docker-help.md
Last active November 23, 2025 10:14
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

const handler = {
get(target, propKey, receiver) {
if (/^_[0-9]+$/.test(propKey)) {
const result = [];
const first = Number(receiver);
const last = Number(propKey.slice(1));
for (let i=first; i<=last; i++) {
result.push(i);
}
return result;
@azadkuh
azadkuh / vim-cheatsheet.md
Last active December 4, 2025 06:28
vim / vimdiff cheatsheet - essential commands

Vim cheat sheet

Starting Vim

vim [file1] [file2] ...

@kevin-smets
kevin-smets / iterm2-solarized.md
Last active December 12, 2025 13:21
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@lyuehh
lyuehh / quiz.md
Last active February 9, 2018 07:24
javascript quiz

part1

// http://dmitry.baranovskiy.com/post/91403200

//## 1
if (!("a" in window)) {
    var a = 1;
}
alert(a);
function makeFakeConsole(func){
return new Proxy({},{
get:function(target,name,receiver){
return function(){
//at some point if array.from gets implimented
//func(name,Array.from(arguments));
func(name,Array.prototype.slice.call(arguments));
}
}
});

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: