Skip to content

Instantly share code, notes, and snippets.

@myst3k
myst3k / gist:0bf4bb3628555d3edc775d21b9334c42
Created July 3, 2024 00:51
gh actions build and push to do
name: Build and to DO Apps
on:
workflow_dispatch:
push:
branches:
- 'release'
paths:
- '<my_workspace_name>/**'
env:
@myst3k
myst3k / gist:346f78e1b204a35ea60212e92117b88a
Last active May 7, 2024 16:28
Java / Kotlin Time Measurement ToString Friendly
val startTime = Clock.System.now()
/// DO STUFF HERE
val elapsedTime = Clock.System.now() - startTime
println("Execution Time: $elapsedTime seconds")
@myst3k
myst3k / sdm.service
Created May 7, 2019 02:09
starting sdm with a service /etc/systemd/system/sdm.service, systemctl daemon-reload, systemctl enable sdm
[Unit]
Description=Oracle Session Delivery Manager Control Script
After=sshd.service
[Service]
User=nncentral
Group=nncentral
Type=oneshot
WorkingDirectory=/opt/AcmePacket/NNC81_1/bin
ExecStart=/opt/AcmePacket/NNC81_1/bin/startnnc.sh
@myst3k
myst3k / gist:c3866ae65ccd203a93c7b702ecdd7ebc
Last active April 2, 2019 05:59
oracle linux local yum repo setup on OL7
## Updated courtesy of (https://oracle-base.com/articles/linux/create-a-local-yum-repository-for-oracle-linux-7)
yum -y install yum-utils createrepo_c httpd
systemctl enable --now httpd
cp /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle /var/www/html/
mkdir -p /u01/repo/{OracleLinux,logs,scripts,cache}
touch /u01/repo/scripts/repo_sync.sh
chmod u+x /u01/repo/scripts/repo_sync.sh
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.servlet.sip.SipServletRequest;
import javax.servlet.sip.annotation.Invite;
import javax.servlet.sip.annotation.SipServlet;
import java.util.logging.Logger;
@SipServlet(name="MySipServlet", loadOnStartup = 1)
public class MySipServlet {
@myst3k
myst3k / after
Last active June 21, 2024 06:10
enable on boot nodemanager and adminserver weblogic 12c
#enable each service for boot
systemctl enable nodemanager
systemctl enable adminserver
#then reboot and test
#install ovftool
# connect to system and check current virtual machines
ovftool vi://root:<password>@<ip-address>/
#shut down VM's which you want to copy
#disable ssl verification if you need to, you can this with the following operations if you need to
ovftool --noSSLVerify
#how to install the vmware labs ESXi Embedded Host Client
#https://labs.vmware.com/flings/esxi-embedded-host-client
#ssh into system
#enable http client
esxcli network firewall ruleset set -e true -r httpClient
#get latest offline bundle package
wget http://download3.vmware.com/software/vmw-tools/esxui/esxui-offline-bundle-6.x-3843236.zip

Prerequsite, migrate, pause, or stop all running guests on system

1. check current version

esxcli system version get

2. put host in maintenance mode

vim-cmd /hostsvc/maintenance_mode_enter

3. enable http client

esxcli network firewall ruleset set -e true -r httpClient

(Optional) Install deltarpm if you are more concerned with slow nework than cpu usage

yum -y install deltarpm

Disable SElinux

setenforce 0 && sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config

Disable Firewalld

systemctl disable --now firewalld

(Optional) Remove un-necessary packages