Skip to content

Instantly share code, notes, and snippets.

View madhukar93's full-sized avatar

Madhukar Mishra madhukar93

View GitHub Profile
@madhukar93
madhukar93 / nerdctl-install.sh
Created April 2, 2024 16:45 — forked from Faheetah/install.sh
Install containerd and nerdctl on Ubuntu
sudo apt-get update
sudo apt-get install containerd
NERDCTL_VERSION=1.7.5
CNI_PLUGINS_VERSION=1.4.1
BUILDKIT_VERSION=0.13.1
wget https://github.com/containerd/nerdctl/releases/download/v${NERDCTL_VERSION}/nerdctl-${NERDCTL_VERSION}-linux-amd64.tar.gz
tar -zxf nerdctl-${NERDCTL_VERSION}-linux-amd64.tar.gz nerdctl
sudo mv nerdctl /usr/bin/nerdctl
rm nerdctl-${NERDCTL_VERSION}-linux-amd64.tar.gz
@madhukar93
madhukar93 / init.vim
Last active December 23, 2022 05:36
nvim config
let g:polyglot_disabled = ['groovy', 'Jenkinsfile', 'jenkinsfile']
call plug#begin('~/.vim/plugged')
Plug 'direnv/direnv.vim'
Plug 'tpope/vim-sensible'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-repeat'
Plug 'tpope/vim-fugitive'
Plug 'mbbill/undotree'
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim'
@madhukar93
madhukar93 / README.md
Created May 27, 2021 16:05 — forked from jamesmacfie/README.md
iTerm 2 - script to change theme depending on Mac OS dark mode

How to use

In iTerm2, in the menu bar go to Scripts > Manage > New Python Script

Select Basic. Select Long-Running Daemon

Give the script a decent name (I chose auto_dark_mode.py)

Save and open the script in your editor of choice.

@madhukar93
madhukar93 / jenkins-in-docker.md
Created June 10, 2020 04:26 — forked from afloesch/jenkins-in-docker.md
Jenkins in Docker (docker-in-docker)

Jenkins in Docker (docker-in-docker)

Testing Jenkins flows on your local machine, or running Jenkins in production in a docker container can be a little tricky with a docker-in-docker scenario. You could install Jenkins to avoid any docker-in-docker issues, but then you have Jenkins on your machine, and the local environment is likely going to be a fairly different from the actual production build servers, which can lead to annoying and time-consuming issues to debug.

Build environment differences are precisely why there is a strong argument to be made to run build processes strictly in docker containers. If we follow the philosophy that every build step or action should run in a docker container, even the Jenkins server itself, then we get massive benefits from things like, total control over the build environment, easily modify the build environment without the possibility of adversely effecting other jobs, explicit and strongly controlled tool versions,

with import <nixpkgs> {};
(let
yoyo-migrations = with python27.pkgs; buildPythonPackage rec {
pname = "yoyo-migrations";
version = "5.0.1";
src = fetchPypi {
inherit pname version;
sha256 = "d458f78443b1db57eda423e86fe8b245561340a394da5dc83f40d6d1ae4237a4";
};
doCheck = false;
@madhukar93
madhukar93 / .tmux.conf
Created July 3, 2019 04:48 — forked from tsl0922/.tmux.conf
vim style tmux config
# use C-a, since it's on the home row and easier to hit than C-b
set-option -g prefix C-a
unbind-key C-a
bind-key C-a send-prefix
set -g base-index 1
# Easy config reload
bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded."
# vi is good
@madhukar93
madhukar93 / init.vim
Created June 13, 2019 16:27
init.vim
call plug#begin('~/.vim/plugged')
Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' }
Plug 'https://github.com/tpope/vim-sensible'
Plug 'https://github.com/tpope/vim-surround'
Plug 'https://github.com/tpope/vim-repeat'
Plug 'https://github.com/kien/ctrlp.vim'
Plug 'https://github.com/vim-scripts/auto-pairs-gentle'
Plug 'https://github.com/airblade/vim-gitgutter'
Plug 'https://github.com/majutsushi/tagbar.git'
Plug 'https://github.com/altercation/vim-colors-solarized'
@madhukar93
madhukar93 / Repo
Created June 5, 2019 12:56 — forked from richardmcmillen-examtime/Repo
Open a project file on GitHub.
#!/bin/bash
#
# Open the specified file on GitHub. It will use the master branch by default:
#
# repo -f app/controllers/application_controller.rb
#
# Specify a different branch:
#
# repo -b another-branch -f app/controllers/application_controller.rb
call plug#begin('~/.vim/plugged')
Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' }
Plug 'https://github.com/tpope/vim-sensible'
Plug 'https://github.com/tpope/vim-surround'
Plug 'https://github.com/tpope/vim-repeat'
Plug 'https://github.com/kien/ctrlp.vim'
Plug 'https://github.com/vim-scripts/auto-pairs-gentle'
Plug 'https://github.com/airblade/vim-gitgutter'
Plug 'https://github.com/majutsushi/tagbar.git'
Plug 'https://github.com/altercation/vim-colors-solarized'
from influxdb import InfluxDBClient
db = "ci-metrics-testing"
client = InfluxDBClient("localhost", 8086, "root", "root", db)
client.create_database(db) # TODO: check if this overrites previous db
days = [
# 1
{
"measurement": "commits",