Skip to content

Instantly share code, notes, and snippets.

@yv84
yv84 / nsi_proxy_cache.py
Created April 13, 2020 09:46
NSI proxy cache
import hashlib
import json
import collections
import flask
from flask import Flask
from flask import stream_with_context, Response
import codecs
from requests import get, request
import time
from cheroot.wsgi import Server as WSGIServer
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yv84
yv84 / Files.lines.reduce
Last active October 8, 2019 04:16
Fileslines.reduce.java
package ru.fss.print.client.kp.decisionrenewal;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import lombok.extern.slf4j.Slf4j;
@yv84
yv84 / jenkins-pipeline-git-cred.md
Created April 12, 2019 12:41 — forked from blaisep/jenkins-pipeline-git-cred.md
Insert git credentials into Jenkins Pipeline Script projects

Suppose you want to inject a credential into a Pipeline script. The cloudbees note does not include Pipeline script examples. https://support.cloudbees.com/hc/en-us/articles/203802500-Injecting-Secrets-into-Jenkins-Build-Jobs

The Jenkins Pipeline Docs' description of the git pushmethod doesn't have an example using injected credentials. (https://jenkins.io/doc/pipeline/examples/#push-git-repo)

The Snippet generator is helpful, but not not if you try to follow the instructions at: https://wiki.jenkins-ci.org/display/JENKINS/Credentials+Binding+Plugin

@yv84
yv84 / JAVA_OPTS.txt
Last active March 7, 2019 05:52
GC-log
https://dzone.com/articles/enabling-and-analysing-the-garbage-collection-log
https://habr.com/ru/post/116578/
JAVA_OPTS
-XX:+DisableExplicitGC
-XX:+PrintGCDetails
-XX:+PrintGCApplicationStoppedTime
-XX:+PrintGCApplicationConcurrentTime
-XX:+PrintGCDateStamps
-Xloggc:gclog.log
@yv84
yv84 / для_ирины.ipynb
Created February 26, 2019 16:43
для_ирины
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yv84
yv84 / try ansible
Last active February 26, 2019 05:23
yv84@yv84_u1:~/ansible$ cat ansible.cfg
[defaults]
host_key_checking = False
inventory=inventory.ini
yv84@yv84_u1:~/ansible$ cat hosts
[servers]
192.168.100.151 yv84=192.168.100.151
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yv84
yv84 / Dockerfile
Last active January 18, 2019 05:40 — forked from anonymous/Dockerfile
# https://medium.com/@shakyShane/lets-talk-about-docker-artifacts-27454560384f
# Stage 1 - the build process
FROM node:7.10 as build-deps
WORKDIR /usr/src/app
COPY package.json yarn.lock ./
RUN yarn
COPY . ./
RUN yarn build
# Stage 2 - the production environment
@yv84
yv84 / java11
Created January 18, 2019 03:42
java -version
which java
ls /usr/bin/java -l
sudo update-alternatives --config java
https://dzone.com/articles/installing-openjdk-11-on-ubuntu-1804-for-real
% wget https://download.java.net/java/GA/jdk11/28/GPL/openjdk-11+28_linux-x64_bin.tar.gz -O /tmp/openjdk-11+28_linux-x64_bin.tar.gz
% sudo tar xfvz /tmp/openjdk-11+28_linux-x64_bin.tar.gz --directory /usr/lib/jvm