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 | |
# | |
# Tomcat 8 start/stop/status init.d script | |
# Initially forked from: https://gist.github.com/valotas/1000094 | |
# @author: Miglen Evlogiev <bash@miglen.com> | |
# | |
# Release updates: | |
# Updated method for gathering pid of the current proccess | |
# Added usage of CATALINA_BASE | |
# Added coloring and additional status |
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
#!.venv/bin/python3.6 | |
# -*- coding:utf-8 -*- | |
# | |
# Network Latency For Windows | |
# | |
import sys | |
from re import findall | |
from subprocess import Popen, PIPE | |
# pip install validators=0.14.3 |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# System: macOS Mojave 10.14.6 | |
# Version: TeamViewer v15.2.2756 | |
# Python: 2.7.10 | |
# Command: sudo python TeamViewer-15-id-changer-for-mac.py | |
# | |
import os |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# get local computer name on windows | |
# package: pyinstaller -y -F -c getHostname.py | |
# | |
from subprocess import run, PIPE | |
cmd = "C:\\Windows\\System32\\HOSTNAME.EXE" |
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
#! /usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# | |
# Get mac address on windows | |
# Package: Pyinstaller -y -F -c getMac.py | |
# | |
from subprocess import run, PIPE | |
try: |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# | |
# Termainate an application on windows | |
# | |
from subprocess import run, CalledProcessError | |
def taskCheck(name): | |
cmd = "tasklist | findstr %s" % name |
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
#!/usr/bin/env python3 | |
# | |
# PyQt5 executes commands on the windows system and gets the output. | |
# Package: pyinstaller -y -F -w pyqt5RunCommandSample.py | |
# Require: Python==3.6.8 PyQt5==5.15.0 PyInstaller==3.6 | |
# | |
import re | |
import sys |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# | |
# Get the running path of the pyinstaller program | |
# Package: pyinstaller -y -F D:\Temp\getExePath.py --add-binary "D:\Temp\dist\tmp.exe;dist/" | |
# Reference: https://stackoverflow.com/a/44352931 | |
# | |
import os | |
import sys |
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
[Unit] | |
Description=Caddy | |
Documentation=https://caddyserver.com/docs/ | |
After=network.target | |
[Service] | |
Type=oneshot | |
RemainAfterExit=true | |
ExecStart=/usr/local/bin/docker-compose -f /home/user/caddy/docker-compose.yml up -d | |
ExecStop=/usr/local/bin/docker-compose -f /home/user/caddy/docker-compose.yml down |
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
__pycache__ | |
events.py |
OlderNewer