- Create service named employee using vi command
sudo vim /etc/systemd/system/employee.service
- Copy paste the following content into the file and make sure to change the ExecStart command arguments
[Unit] Description=Employee Spring Boot application service
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
# Use this script to test that your Telegram bot works. | |
# | |
# Install the dependency | |
# | |
# $ gem install telegram_bot | |
# | |
# Run the bot | |
# | |
# $ ruby bot.rb | |
# |
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/sh | |
# OUTDATED: please refer to the link below for the latest version: | |
# https://github.com/rancherlabs/support-tools/blob/master/extended-rancher-2-cleanup/extended-cleanup-rancher2.sh | |
docker rm -f $(docker ps -qa) | |
docker volume rm $(docker volume ls -q) | |
cleanupdirs="/var/lib/etcd /etc/kubernetes /etc/cni /opt/cni /var/lib/cni /var/run/calico /opt/rke" | |
for dir in $cleanupdirs; do | |
echo "Removing $dir" | |
rm -rf $dir | |
done |
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 | |
set -e | |
set -o pipefail | |
# Add user to k8s using service account, no RBAC (must create RBAC after this script) | |
if [[ -z "$1" ]] || [[ -z "$2" ]]; then | |
echo "usage: $0 <service_account_name> <namespace>" | |
exit 1 | |
fi |
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
# WARNING: Use this at your own risk. It will probably break your other packages and cause other havoc. | |
# These days you should just upgrade to Ubuntu 18.04. | |
$ ssh -V | |
OpenSSH_7.2p2 Ubuntu-4ubuntu2.1, OpenSSL 1.0.2g 1 Mar 2016 | |
wget https://launchpadlibrarian.net/277739251/openssh-client_7.3p1-1_amd64.deb | |
wget https://launchpadlibrarian.net/298453050/libgssapi-krb5-2_1.14.3+dfsg-2ubuntu1_amd64.deb | |
wget https://launchpadlibrarian.net/298453058/libkrb5-3_1.14.3+dfsg-2ubuntu1_amd64.deb | |
wget https://launchpadlibrarian.net/298453060/libkrb5support0_1.14.3+dfsg-2ubuntu1_amd64.deb |
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 | |
function valid_required_envs() { | |
# Configs | |
required_envs=(KUBE_CONTEXT KUBE_SERVER) | |
# Securities | |
required_envs+=(KUBE_CERTIFICATE_AUTHORITY) | |
required_envs+=(KUBE_CLIENT_CERTIFICATE KUBE_CLIENT_KEY) | |
errors=() |
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
public class StructureMapJobFactory : IJobFactory | |
{ | |
private static readonly ILog Logger = LogProvider.GetCurrentClassLogger(); | |
private readonly IContainer _container; | |
public StructureMapJobFactory(IContainer container) | |
{ | |
this._container = container; | |
} |
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
# Defaults for virtualbox initscript | |
# sourced by /etc/init.d/virtualbox | |
# installed at /etc/default/virtualbox by the maintainer scripts | |
# | |
# This is a POSIX shell fragment | |
# | |
# Set this to 1 if you would like the virtualbox modules to be loaded by | |
# the init script. |
NewerOlder