Skip to content

Instantly share code, notes, and snippets.

View mishin's full-sized avatar
💭
if you fail to prepare you prepare to fail

Nikolay Mishin mishin

💭
if you fail to prepare you prepare to fail
View GitHub Profile
@mishin
mishin / main.py
Created July 20, 2023 12:34 — forked from mahenzon/main.py
Python + gspread demo
import string
from pprint import pprint
import gspread
from gspread import Cell, Client, Spreadsheet, Worksheet
from gspread.utils import rowcol_to_a1
import requests
SPREADSHEET_URL = "https://docs.google.com/spreadsheets/d/.../"
@mishin
mishin / java-test-naming-convention.md
Created October 29, 2021 05:43
Java Test naming convention.

Java Test Naming Convention

This is intended as a quick Java test naming convention.

Table of Content

Test method naming
References

Test method naming

@mishin
mishin / build.gradle
Created July 24, 2020 05:56 — forked from Maxlero/build.gradle
Build Gradle script that generates jar file with manifest classpath pointing to dependencies in subfolder /lib. (gradle, groovy, kotlin, spring)
plugins {
id 'org.hidetake.ssh' version '2.9.0'
id 'org.jetbrains.kotlin.jvm' version '1.3.11'
id 'org.springframework.boot' version '2.1.2.RELEASE'
id 'io.spring.dependency-management' version "1.0.6.RELEASE"
}
group 'App Group'
version '1.0.0'
@mishin
mishin / setup.txt
Created July 2, 2020 10:53 — forked from aragozin/setup.txt
JMC Workshop Notes
clone https://github.com/aragozin/optaplanner-bench.git
git checkout jmc_workbench_0
mvn package
mvn -P ui exec:java
Disable some JVM optimizations
MAVEN_OPTS=-Xmx512m -XX:+NeverActAsServerClassMachine -XX:CICompilerCount=1 -XX:-TieredCompilation -XX:-DoEscapeAnalysis
mvn -P mrbench exec:java
@mishin
mishin / git aliases.sh
Created May 19, 2020 13:39 — forked from tj/git aliases.sh
Some helpful git aliases
alias gd="git diff"
alias gc="git clone"
alias ga="git add"
alias gbd="git branch -D"
alias gst="git status"
alias gca="git commit -a -m"
alias gpt="git push --tags"
alias gp="git push"
alias gpr="git pull-request"
alias grh="git reset --hard"
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
@mishin
mishin / .gitconfig
Created April 27, 2020 05:50 — forked from johnpolacek/.gitconfig
My current .gitconfig aliases
[alias]
co = checkout
cob = checkout -b
coo = !git fetch && git checkout
br = branch
brd = branch -d
brD = branch -D
merged = branch --merged
st = status
aa = add -A .
#!/bin/bash
# remove exited containers:
docker ps --filter status=dead --filter status=exited -aq | xargs -r docker rm -v
# remove unused images:
docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs -r docker rmi
# remove unused volumes:
find '/var/lib/docker/volumes/' -mindepth 1 -maxdepth 1 -type d | grep -vFf <(
@mishin
mishin / gitcheats.txt
Created April 4, 2018 08:15 — forked from cwsaylor/gitcheats.txt
git cheats
# shortform git commands
alias g='git'
# cherry pick range of commits, starting from the tip of 'master', into 'preview' branch
git rev-list --reverse --topo-order master... | while read rev; do git checkout preview; git cherry-pick $rev || break; done
# create tracking branches for all remote branches
git branch -a | grep -v HEAD | perl -ne 'chomp($_); s|^\*?\s*||; if (m|(.+)/(.+)| && not $d{$2}) {print qq(git branch --track $2 $1/$2\n)} else {$d{$_}=1}' | csh -xfs;
# git reset newly added files
#include<stdio.h>
int main()
{
int i,j,k;
int h=7,t=3,l=5;
for(i=1;i<=(t/2)+1;i++)
{
for(j=1;j<=i;j++)
{
printf("*");