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
mishin /
Created Jun 29, 2019
Listing 5.18. Memoizing Wrapper Using FutureTask.
public class Memoizer3<A, V> implements Computable<A, V> {
private final Map<A, Future<V>> cache
= new ConcurrentHashMap<A, Future<V>>();
private final Computable<A, V> c;
public Memoizer3(Computable<A, V> c) { this.c = c; }
public V compute(final A arg) throws InterruptedException {
Future<V> f = cache.get(arg);
if (f == null) {
from flask import Flask
app = Flask(__name__)
def hello_world():
return 'Hello World!\n'
if __name__ == '__main__':, host='')
#!/usr/bin/env python3
from flask import Flask
app = Flask(__name__)
def hello():
return 'Hello, World!'
if __name__ == '__main__':
FROM python:3.4
RUN pip install Flask==0.10.1
COPY app /app
CMD ["python", ""]
View gist:5f9e9bf998e4d34292f90f7d875a9dbd
FROM python:3.4
RUN pip install Flask==0.10.1
COPY app /app
CMD ["python", ""]
# 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 <(

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


На ветке 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
int main()
int i,j,k;
int h=7,t=3,l=5;
You can’t perform that action at this time.