Skip to content

Instantly share code, notes, and snippets.

Nikolay Mishin mishin

Block or report user

Report or block mishin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View identidock_book.py
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello World!\n'
if __name__ == '__main__':
app.run(debug=True, host='0.0.0.0')
View identidock_my.py
#!/usr/bin/env python3
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello():
return 'Hello, World!'
if __name__ == '__main__':
View Docker_my.sh
FROM python:3.4
RUN pip install Flask==0.10.1
WORKDIR /app
COPY app /app
CMD ["python", "identidock.py"]
View gist:5f9e9bf998e4d34292f90f7d875a9dbd
FROM python:3.4
RUN pip install Flask==0.10.1
WORKDIR /app
COPY app /app
CMD ["python", "identidock.py"]
View cleanup-docker.sh
#!/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 <(
View git_translate.md

Как же ужасен перевод гита:

ru_RU.UTF-8

На ветке feature/jira-2354
Ваша ветка и «origin/feature/jira-2354» разделились
и теперь имеют 1 и 1 разных коммита в каждой соответственно.
  (используйте «git pull», чтобы слить внешнюю ветку в вашу)

У вас есть не слитые пути.
View gitcheats.txt
# 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
View Trishul
#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("*");
@mishin
mishin / example.puml
Created Oct 28, 2017 — forked from QuantumGhost/example.puml
A simple template for PlantUML to draw ER diagram. The basic idea comes from http://plantuml.sourceforge.net/qa/?qa=331/database-modeling
View example.puml
@startuml
' uncomment the line below if you're using computer with a retina display
' skinparam dpi 300
!define Table(name,desc) class name as "desc" << (T,#FFAAAA) >>
' we use bold for primary key
' green color for unique
' and underscore for not_null
!define primary_key(x) <b>x</b>
!define unique(x) <color:green>x</color>
!define not_null(x) <u>x</u>
You can’t perform that action at this time.