Skip to content

Instantly share code, notes, and snippets.

@0x2a94b5
0x2a94b5 / getHostname.py
Created July 20, 2020 11:42
get hostname on windows
#!/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"
@0x2a94b5
0x2a94b5 / TeamViewer-15-id-changer-for-mac.py
Last active December 21, 2023 00:24 — forked from zhenhappy/tv-changer-for-mac.py
Teamviewer 15 id changer for Mac OS X
#!/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
@0x2a94b5
0x2a94b5 / get_latency.py
Created April 15, 2020 03:43
Network Latency For Windows
#!.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
@0x2a94b5
0x2a94b5 / tomcat_script.sh
Last active February 28, 2019 16:44 — forked from miglen/Apache Tomcat 8 Start stop script init.d script
use non-root user: useradd -r -d /usr/local/tomcat tomcat ; non-root restart: sudo service tomcat restart
#!/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