Skip to content

Instantly share code, notes, and snippets.

View kidchenko's full-sized avatar

Jose Barbosa kidchenko

View GitHub Profile
@kidchenko
kidchenko / .gitconfig
Created August 9, 2022 07:11
git config
[alias]
# View abbreviated SHA, description, and history graph of the latest 20 commits
l = log --pretty=oneline -n 20 --graph --abbrev-commit
# View the current working tree status using the short format
s = status -s
# Show the diff between the latest commit and the current state
d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"
@kidchenko
kidchenko / git-reset-author.sh
Created July 6, 2021 17:43 — forked from bgromov/git-reset-author.sh
Git: reset author for ALL commits
#!/bin/sh
# Credits: http://stackoverflow.com/a/750191
git filter-branch -f --env-filter "
GIT_AUTHOR_NAME='Newname'
GIT_AUTHOR_EMAIL='new@email'
GIT_COMMITTER_NAME='Newname'
GIT_COMMITTER_EMAIL='new@email'
" HEAD
@kidchenko
kidchenko / snip[ets.cs
Last active April 11, 2021 15:15
My Snippets
File.AppendAllText("tests.log", "{ \"" + key + "\", \"" + value + "\" },\n");
@kidchenko
kidchenko / commands.sh
Created September 23, 2020 15:00
kubectl
# add aks config to local kubectl
az aks get-credentials --name ${AKS NAME} --resource-group ${AKS_RESOURCE_GROUP_NAME}
# create new shell
kubectl exec --stdin --tty ${CONTAINER_NAME} -n ${NAMESPACE} -- /bin/bash
@kidchenko
kidchenko / config.yml
Last active September 4, 2019 02:10
Codesanook #06
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
build:
docker:
# specify the version you desire here
- image: circleci/node:8-browsers
@kidchenko
kidchenko / csharp-internals-patterns.md
Last active August 5, 2019 10:06
C# Design Patterns built into the language
  • Decorator

    • Streams API
  • Observable

    • C# Events
  • Visitor

    • Roslyn
  • Command

@kidchenko
kidchenko / .vimrc
Created January 24, 2019 03:07
My basic .vimrc based on @waf
" the basics
syntax enable
set nocompatible
set encoding=utf-8
" windows clipboard integration
set clipboard=unnamed
" intelligent searching and formatting
set ignorecase
@kidchenko
kidchenko / Mapper.cs
Created April 25, 2018 03:07 — forked from imranbaloch/Mapper.cs
Simple Mapper
public static class Mapper
{
public static T2 Map<T1, T2>(T1 t1)
{
var json = JsonConvert.SerializeObject(t1);
return JsonConvert.DeserializeObject<T2>(json);
}
}
@kidchenko
kidchenko / redis-config.sh
Last active May 13, 2019 03:50
Configure redis
# Using redis-cli, you can do something like this:
CONFIG SET dir 'C:/data/redis/'
CONFIG SET dbfilename temp.rdb
CONFIG SET notify-keyspace-events Kx$