start new:
tmux
start new with session name:
tmux new -s myname
# deploy under "path" context path | |
curl --upload-file appplication-0.1-1.war "http://tomcat:tomcat@localhost:8080/manager/deploy?path=/application-0.1-1 | |
# undeploy | |
curl "http://tomcat:tomcat@localhost:8080/manager/undeploy?path=/application-0.1-1" | |
# ! tomcat7 uses /manager/text/undeploy and /manager/text/deploy paths | |
# tomcat6-admin (debian) or tomcat6-admin-webapps (rhel) has to be installed | |
# tomcat-users.xml has to be setup with user that has admin, manager and manager-script roles |
Streaming just means a download that they don't want you to keep. But Chrome's developer tools make it easy to access what's really going on under the hood.
From the page where you want to download some things, go into your chrome menu to open the developer tools. You can either:
1. (On a mac): Command-option-J
2. (On a PC): Control-alt-J
I am in the process of introducing single page applications to where I work. For development, using node based build tools is much easier for the single page applications. However, the build process for our organization is based upon maven. Our solution started with the maven plugin frontend-maven-plugin. It worked great at first, but then we ran into a situation that I couldn't make work with it.
As stated before, at our organization, we have the older ecosystem which is maven and the newer ecosystem which is node. Our goal was to keep the hacking to a minimum. We did this by putting all of the hacks into a single super node based build file. This is what maven calls and the reason frontend-maven-plugin
wasn't sufficient. The super node based build script calls all of the other build scripts by spawning npm run
. Try as I might, I could not figure out how to make the spawn work. front-end-maven-plugin
downloads npm
"""Flask Blueprint sublcass that overrides `route`. | |
Automatically adds rules for endpoints with and without trailing slash. | |
""" | |
from flask import Blueprint, Flask | |
class BaseBlueprint(Blueprint): | |
"""The Flask Blueprint subclass.""" |
#System Design Cheatsheet
Picking the right architecture = Picking the right battles + Managing trade-offs
##Basic Steps
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: nginx-conf | |
data: | |
nginx.conf: | | |
user nginx; | |
worker_processes 3; | |
error_log /var/log/nginx/error.log; | |
events { |
// Thanks: https://stackoverflow.com/a/53894298/665869 | |
use std::collections::HashMap; | |
use std::sync::{Arc, Mutex}; | |
use std::thread; | |
type Map = HashMap<String, String>; | |
fn handle_n_times(count: i32, arc_map: Arc<Mutex<Map>>) { | |
for i in 0..count { | |
let clone_arc = arc_map.clone(); |