Skip to content

Instantly share code, notes, and snippets.

View chhh's full-sized avatar

Dmitry Avtonomov chhh

View GitHub Profile
@chhh
chhh / git-branches-by-commit-date.sh
Created September 28, 2021 21:50 — forked from jasonrudolph/git-branches-by-commit-date.sh
List remote Git branches and the last commit date for each branch. Sort by most recent commit date.
# Credit http://stackoverflow.com/a/2514279
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r
"editor.rulers": [80,100],
"workbench.colorTheme": "Monokai",
"explorer.confirmDelete": false,
"workbench.colorCustomizations": {
// "tab.activeBorder": "#0A84FF",
"tab.activeBorderTop": "#c505df",
"tab.unfocusedActiveBorder": "#000000"
},
@chhh
chhh / ArchLinuxWSL2.md
Created April 29, 2021 06:59 — forked from ld100/ArchLinuxWSL2.md
Steps for setting up Arch Linux on WSL2

Migrating from Ubuntu on WSL to ArchLinux on WSL2

Upgrading to WSL 2

  • Download WSL2 Kernel
  • run wsl --set-default-version 2 in windows command line, so that all future WSL machine will use WSL2.

Installing Arch Linux

@chhh
chhh / google-sheets-update-timestamp.gs
Created December 22, 2018 21:13
Update timestamp in one column of Google Sheets doc when another column is changed
function onEdit(event)
{
Logger.log("onEdit() triggered with: %s", event);
//
// User params, edit to suit your needs
//
var timezone = "PST"; // You can use something like "GMT-7" as well.
var timestampFormat = "yyyy-MM-dd HH:mm:ss";
var headerRowNum = 1; // The row containing data headers.
@chhh
chhh / .gitmorealiases
Last active November 10, 2019 22:35
Some of the aliases that I defined in addition to the laundry list of aliases from https://github.com/GitAlias/gitalias
[alias]
# template/stub for functional git aliases
# my_alias = "!f() { 〈your complex command〉 }; f"
# edit git config with default text editor
ec = config --global -e
# run before each commit :)
pre = diff --cached --diff-algorithm=minimal -w
@chhh
chhh / console-colorscheme-chhh.json
Created October 12, 2018 07:00
Color scheme for use with concfg to customize colors of cmd.exe and PowerShell
{
"fullscreen": false,
"command_history_length": 50,
"screen_buffer_size": "120x200",
"window_size": "120x50",
"cursor_size": "small",
"font_face": "Lucida Console",
"font_weight": 400,
"font_size": "0x14",
"font_true_type": true,
@chhh
chhh / chhh.json
Created September 30, 2018 02:00
Console color scheme for import with `concfg` (https://github.com/lukesampson/concfg)
{
"fullscreen": false,
"command_history_length": 50,
"screen_buffer_size": "120x200",
"window_size": "120x50",
"cursor_size": "small",
"font_face": "Lucida Console",
"font_weight": 400,
"font_size": "0x14",
"font_true_type": true,
@chhh
chhh / .bashrc
Created September 11, 2018 18:57
Bashrc for git on Windows installation
# Taken from: https://github.com/bobthecow/git-flow-completion/blob/master/git-flow-completion.bash
source ~/git-flow-completion.bash
if [[ -n "${ConEmuPID}" ]]; then
PS1="$PS1\[\e]9;9;\"\w\"\007\e]9;12\007\]"
fi
# This is used to start ssh-agent once when git-bash is started.
@chhh
chhh / scoop-export.txt
Last active April 24, 2020 16:34
Apps installed with scoop
$ scoop list
Installed apps:
7zip 19.00
adopt11-hotspot 11.0.6-10 [java]
adopt8-hotspot 8u212-b03 [java]
ant 1.10.7
aria2 1.34.0-1
clink 0.4.9
concfg 0.2020.03.15
@chhh
chhh / git-init-leaf-dirs.sh
Last active August 16, 2018 23:43
Create git repositories in all leaf directories. Useful for setting up large multi-project builds with Gradle, for example.
#!/bin/bash
startdir=`pwd`
# # find all the LEAF directories that don't have .git somewhere along the path
# selection of LEAFs is done in the awk part
# the output of find is read line by line, assuming filenames don't have newlines
# `find -print0` wouldn't work, as this would screw up the awk part
find . -not \( -name .git -prune \) -type d -print | sort -r | awk 'a!~"^"$0{a=$0;print}' | sort | while read -d $'\n' file
do
echo "Going to -> $file"