Skip to content

Instantly share code, notes, and snippets.

View gorshkov-leonid's full-sized avatar

Leonid Gorshkov gorshkov-leonid

View GitHub Profile
package org.wildfly.swarm.examples.netflix.ribbon.time;
import java.io.IOException;
import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.container.ContainerResponseContext;
import javax.ws.rs.container.ContainerResponseFilter;
import javax.ws.rs.ext.Provider;
/**
@ApplicationPath("/components")
public class JaxRsActivator extends Application {
//all resources will be loaded automatically (see Main.java)
}
@gorshkov-leonid
gorshkov-leonid / xyz_vs_tms.md
Created March 17, 2017 10:12 — forked from tmcw/xyz_vs_tms.md
The difference between XYZ and TMS tiles and how to convert between them

The difference between XYZ and TMS tiles and how to convert between them

Lots of tile-based maps use either the XYZ or TMS scheme. These are the maps that have tiles ending in /0/0/0.png or something. Sometimes if it's a script, it'll look like &z=0&y=0&x=0 instead. Anyway, these are usually maps in Spherical Mercator.

Good examples are OpenStreetMap, Google Maps, MapBox, MapQuest, etc. Lots of maps.

Most of those are in XYZ. The best documentation for that is slippy map tilenames on the OSM Wiki, and Klokan's Tiles a la Google.

let activeTasks: Array<Observable<Action>> = [];
// return action$.ofType(AppActions.LOAD_WIZARD_STATE_DEFERRED)
// .map((action: ActualizeWizardAfterAction) => {
// let subject = new Subject<Action>();
// action.observable.subscribe(subject);
// return {observable: subject, sessionToken: action.sessionToken};
// })
// .flatMap((action: { observable: Observable<Action>, sessionToken: string }) => {
@gorshkov-leonid
gorshkov-leonid / epic
Last active June 25, 2017 22:52
test epics
//way 2: use marbles (http://jsbin.com/pufima/edit?js,output)
describe("way 2: mockStore + marbles", function () {
let saveVnfNameService: SaveVnfNameService & Spied<SaveVnfNameService>;
let saveVnfNameEpic: Epic<Action, AppState>;
let mockStoreFactory: MockStoreCreator<AppState>;
beforeEach(function () {
saveVnfNameService = spy(SaveVnfNameService);
saveVnfNameService.saveVnfName.and.returnValue(Observable.empty());
saveVnfNameEpic = new SaveVnfNameEpicFactory(saveVnfNameService).createEpic();
RUN yum install -y initscripts && \
yum install -y sudo.x86_64 && \
yum install -y openssh-server.x86_64 && yum clean all && \
https://wiki.centos.org/HowTos/Network/SecuringSSH#head-2c570b3605b9f578c5b79301bfeb4a98bad9c9c4
https://linux.die.net/man/8/sshd
http://help.ubuntu.ru/wiki/ssh
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
export default {
input: 'index.js',
output: {
file: 'dist/pretty-ms-5.0.0.js',
format: 'umd',
name: 'prettyMilliseconds',
},
#remove all containers
docker rm -f $(docker ps -a -q)
#al images
docker rmi -f $(docker images -q)
#remove all containers / images / volumes - dangling (not associated with a container)
docker system prune
#remove all
ps -auxww | grep -i 6800 поиск pid
jcmd <pid> GC.run вызов GC
jmap -dump:live,format=b,file=filename <pid> Сохранение дампа
#add separate repo list and update
RUN sudo touch /etc/apt/sources.list.d/myrepo.list
RUN sudo /bin/bash -c 'echo "deb http://myrepo.corp/deb/ubuntu $(lsb_release -cs) main" >> /etc/apt/sources.list.d/myrepo.list'
RUN sudo /bin/bash -c 'echo "# deb-src myrepo.corp/deb/ubuntu $(lsb_release -cs) main" >> /etc/apt/sources.list.d/myrepo.list'
RUN sudo apt-get update -y -o Dir::Etc::sourcelist="sources.list.d/myrepo.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" || true
#add to global repos list
deb http://myrepo.corp/deb/ubuntu $(lsb_release -cs) main