This file contains 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
language: minimal | |
if: branch = master | |
before_install: | |
- curl -L https://git.io/get_helm.sh | bash | |
- helm init --client-only | |
script: | |
- mkdir files-to-gh-pages | |
- echo $(pwd) |
This file contains 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
#!/bin/bash | |
service_name="backup-all-secrets" | |
secret_list=( `docker secret ls --format "{{ .Name }}"` ) | |
cmd="docker service create \ | |
--name $service_name \ | |
--constraint node.hostname==`hostname` " | |
for secret in "${secret_list[@]}" |
This file contains 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
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import * as serviceWorker from './serviceWorker'; | |
import { createStore, combineReducers } from 'redux'; | |
import { Provider, useSelector, useDispatch } from 'react-redux'; | |
const reducer = combineReducers({ | |
counter: (state = 0, action) => { | |
switch (action.type) { | |
case "INCR": |
This file contains 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
import React, { useState } from 'react'; | |
import ReactDOM from 'react-dom'; | |
import * as serviceWorker from './serviceWorker'; | |
import { createStore, combineReducers, applyMiddleware } from 'redux'; | |
import { Provider, useSelector, useDispatch } from 'react-redux'; | |
import { Card } from 'react-bootstrap'; | |
import 'bootstrap/dist/css/bootstrap.min.css'; | |
import thunk from 'redux-thunk'; |
This file contains 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
#!/bin/bash | |
docker login -u <<registry login>> -p <<password>> <<user registry host>> | |
docker ps -a --format "{{.ID}} {{.Image}}" | grep <<your registry prefix>> | \ | |
while read line | |
do | |
ctrid=`echo $line | awk '{print $1}'` | |
imgtag=`echo $line | awk '{print $2}'` | |
This file contains 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
#!/bin/bash | |
bkupdir="bkup_`date +%Y%m%d_%H%M%S`" | |
restorefile="$bkupdir/restore.sh" | |
log="$bkupdir/backup.log" | |
mkdir $bkupdir | |
echo "#!/bin/bash" > $restorefile | |
chmod u+x $restorefile |
This file contains 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
#!/bin/bash | |
bkupdir="<your backup folder>/bkup_`date +%Y%m%d_%H%M%S`" | |
log="$bkupdir/backup.log" | |
mkdir -p $bkupdir | |
echo "backup folder : $bkupdir" | |
echo "Start time : `date`" >> $log |
This file contains 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
# Inspect the Root CA Cert of your domain, and it as ca.crt | |
openssl s_client -connect <host>:<port> -showcerts | |
# Verify the cert contexnt | |
openssl x509 -in ca.crt -text | |
# Create the Java Keystore file (JKS) and import the ca.crt into it | |
jdk/bin/keytool -import -file ca.crt -keystore trust.jks -storepass password | |
# Verify the JKS file |
This file contains 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
import { StatusBar } from 'expo-status-bar'; | |
import React from 'react'; | |
import { StyleSheet, Text, View } from 'react-native'; | |
// expo install mqtt | |
// fix refer to mqtt.js issue: https://github.com/mqttjs/MQTT.js/issues/573 | |
const mqtt = require('mqtt/dist/mqtt') | |
export default function App() { |
This file contains 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
import java.nio.charset.StandardCharsets; | |
import org.eclipse.paho.mqttv5.client.MqttClientPersistence; | |
import org.eclipse.paho.mqttv5.client.persist.MemoryPersistence; | |
import org.eclipse.paho.mqttv5.client.MqttAsyncClient; | |
import org.eclipse.paho.mqttv5.client.MqttConnectionOptions; | |
import org.eclipse.paho.mqttv5.client.IMqttToken; | |
import org.eclipse.paho.mqttv5.common.MqttSubscription; | |
import org.eclipse.paho.mqttv5.client.MqttCallback; |
OlderNewer