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 / InlineTask.msbuild.xml
Created September 14, 2012 19:16
Sample Msbuild Inline task
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<UsingTask TaskName="SomeFibbonaci" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<FibbonaciSeqLength Required="True" ParameterType="System.Int32"/>
<Result ParameterType="Microsoft.Build.Framework.ITaskItem[]" Output="True"/>
</ParameterGroup>
<Task>
<Reference Include="Microsoft.Build"/>
@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]
-&gt;| 

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