This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.PHONY: generate-ssh vagrant-stretch base clean-playbooks | |
ENV_PROFILE ?= dev | |
TARGET_HOST ?= dev | |
NODE_PORT := $(shell vagrant port stretch --guest 22) | |
PRIVATE_KEY := .vagrant/machines/stretch/virtualbox/private_key | |
PLAYBOOKS := playbooks | |
ENV_FILE=.env | |
ENV_VARS=`cat $(ENV_FILE)` | |
INVENTORY := environments/${ENV_PROFILE}/hosts | |
# either environment variables or kubestorage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inside the container: | |
ip route show | awk '/default/ {print $3}' | |
route | awk '/^default/ { print $2 }' | |
This gives the default docker0 bride to the host and can be used to communicate to the host | |
route | awk '/^default/ { print $2 }' | |
vagrant ubuntu stretch (with network ip) get ip address on eth1 | |
ip addr show eth1 | grep "inet " | cut -d: -f2 | awk '{print $2}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Bean | |
public OkHttpClient okHttpClient() { | |
return new OkHttpClient(); | |
} | |
@Bean | |
public MinioClient minioClient(@Value("${minio.server.url}") String minioServerUrl, | |
@Value("${minio.server.access.key}") String accessKey, | |
@Value("${minio.server.secret.key}") String secretKey) throws InvalidPortException, InvalidEndpointException { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Kill all ssh-agent processes | |
ps -ef | grep ssh-agent | awk '{print $2}' | xargs kill -9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.amoako; | |
import com.github.benmanes.caffeine.cache.Cache; | |
import com.github.benmanes.caffeine.cache.Caffeine; | |
import com.google.common.collect.Lists; | |
import java.util.List; | |
import java.util.concurrent.TimeUnit; | |
public class MainApplication { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RunWith(CamelSpringBootRunner.class) | |
@SpringBootTest | |
@MockEndpoints | |
public class MyRouteTest2 { | |
@Autowired | |
private ProducerTemplate producerTemplate; | |
@EndpointInject(uri = "mock:file:out") | |
private MockEndpoint mockCamel; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@SpringBootApplication | |
public class FirestoreReactiveApplication { | |
public static void main(String[] args) { | |
SpringApplication.run(FirestoreReactiveApplication.class, args); | |
} | |
@Bean | |
public Firestore firestore() throws IOException { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
movement | |
-------- | |
0 - beginning of line | |
^ - beginning of non-whitespace | |
$ - end of line | |
9j - move down 9 lines | |
w - move forward by word | |
b - move backward by word | |
gg - first line | |
G - last line |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
^(https|git|ssh)(:\/\/|@)([^\/:]+)[\/:]([^\/:]+)\/(.+)(.git)?$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"crypto/sha256" | |
"encoding/gob" | |
"fmt" | |
"log" | |
) |