Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View centur's full-sized avatar

Alexey Shcherbak centur

View GitHub Profile
@centur
centur / reset_sourcegraph_admin_password.md
Created September 30, 2022 01:57 — forked from ryan-blunden/reset_sourcegraph_admin_password.md
Instructions for resetting the Sourcegraph admin password

Presuming you have access to the Sourcegraph Docker container and the container name is sourcegraph:

  1. Get the id for the admin account (should be 1 in most cases):
docker container exec sourcegraph psql -U postgres sourcegraph -c 'SELECT id, username, passwd FROM users'
  1. Set the $ID variable:
@centur
centur / dig2JSON
Created February 22, 2022 22:39 — forked from mrlesmithjr/dig2JSON
dig results to parsable json
foo=$(dig google.com +nocomments +noquestion +noauthority +noadditional +nostats | awk '{if (NR>3){print}}'| jq -R 'split("\t") |{Name:.[0],TTL:.[2],Class:.[3],Type:.[4],IpAddress:.[5]}' | jq --slurp .) | jq -n --argjson v $foo '{"foo": $v}'

FWIW: I'm not the author of the content presented here (which is an outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

@centur
centur / list.md
Created October 10, 2021 10:13 — forked from ih2502mk/list.md
Quantopian Lectures Saved
@centur
centur / wsl-ssh-pageant.md
Created September 28, 2020 06:40 — forked from h4de5/wsl-ssh-pageant.md
Use putty's SSH key agent (pageant) from windows in WSL bash - no more "ssh-add" needed

prepare on windows cmd

see: https://github.com/benpye/wsl-ssh-pageant

mkdir workspace
cd workspace
git clone git@github.com:benpye/wsl-ssh-pageant.git
cd wsl-ssh-pageant
C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe /out:wsl-ssh-pageant.exe Program.cs
[wsl2]
kernel=C:\\Users\\JAKA\\vmlinux
@centur
centur / Makefiles.md
Created August 9, 2019 05:54 — forked from evertrol/Makefiles.md
Makefile cheat sheet

Makefile cheat sheet

Mostly geared towards GNU make

I've used ->| to indicate a tab character, as it's clearer to read than

  • Set a target, its dependencies and the commands to execute in order
target: [dependencies]
->| 

Keybase proof

I hereby claim:

  • I am centur on github.
  • I am centur (https://keybase.io/centur) on keybase.
  • I have a public key ASCBiZbOrDUSRJWjpJQB1iPeWcO7tYsFMit07kMV0cZTmAo

To claim this, I am signing this object:

@centur
centur / keybase.md
Created August 6, 2019 11:24
keybase.md

centur Alexey Shcherbak

Keybase proof

I hereby claim:

  • I am centur on github.
  • I am centur (https://keybase.io/centur) on keybase.
  • I have a public key ASDHNnRhzGx-wTk79dbEYn4S1cnibpuQ3hDUY4FyU8cHoQo
@centur
centur / PowerShell Customization.md
Last active May 3, 2019 05:48 — forked from jchandra74/PowerShell Customization.md
PowerShell, Cmder / ConEmu, Posh-Git, Oh-My-Posh, Powerline Customization

Pimping Up Your PowerShell & Cmder with Posh-Git, Oh-My-Posh, & Powerline Fonts

Backstory (TLDR)

I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.

For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.

Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.