A tab completion script that works for Bash. Relies on the BSD md5
command on Mac and md5sum
on Linux, so as long as you have one of those two commands, this should work.
$ gradle [TAB]
#!/bin/bash | |
# SPDX-License-Identifier: MIT | |
## Copyright (C) 2009 Przemyslaw Pawelczyk <[email protected]> | |
## | |
## This script is licensed under the terms of the MIT license. | |
## https://opensource.org/licenses/MIT | |
# | |
# Lockable script boilerplate | |
# Run: curl https://gist.github.com/raw/719970/locale_diff.rb | ruby - en fi | |
require 'rubygems' | |
require 'yaml' | |
l1 = ARGV[0] | |
l2 = ARGV[1] | |
first = YAML.load_file(l1 + ".yml") | |
second = YAML.load_file(l2 + ".yml") | |
def diff(root, compared, structure = []) |
## Configure eth0 | |
# | |
# vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE="eth0" | |
NM_CONTROLLED="yes" | |
ONBOOT=yes | |
HWADDR=A4:BA:DB:37:F1:04 | |
TYPE=Ethernet | |
BOOTPROTO=static |
Using the nc command you can scan a port or a range of ports to verify whether a UDP port is open and able to receive traffic. | |
This first command will scan all of the UDP ports from 1 to 65535 and add the results to a text file: | |
$ nc -vnzu server.ip.address.here 1-65535 > udp-scan-results.txt | |
This merely tells you that the UDP ports are open and receive traffic. | |
Perhaps a more revealing test would be to actually transfer a file using UDP. |
#!/bin/bash | |
#/ jc -- jconsole via ssh proxy | |
#/ | |
#/ Usage: jc [options] HOST JMX_PORT [PROXY_PORT=JMX_PORT] [JMX_HOST=HOST] | |
#/ | |
#/ Starts a SOCKS proxy via ssh to connect to a | |
#/ JVM running on a remote and protected machine. | |
#/ | |
#/ Arguments: |
wget http://jmxsh.googlecode.com/files/jmxsh-R5.jar | |
java -jar jmxsh-R*.jar -h localhost -p 7199 | |
% [Hit Enter to go into Browse Mode] | |
Select a domain: [Enter number for org.apache.cassandra.net] | |
Select an mbean: [Enter number for org.apache.cassandra.net:type=Gossiper] | |
Select an attribute or operation: [Enter number for unsafeAssassinateEndpoint(String p1)] | |
p1 (String): [Enter IP address of problem node] | |
It may also be possible to run it directly (untested): | |
% jmx_invoke -m org.apache.cassandra.net:type=Gossiper unsafeAssassinateEndpoint <STALE-IP-ADDRESS> |
#!/usr/bin/env python | |
# Licensed to Tomaz Muraus under one or more | |
# contributor license agreements. See the NOTICE file distributed with | |
# this work for additional information regarding copyright ownership. | |
# Tomaz muraus licenses this file to You under the Apache License, Version 2.0 | |
# (the "License"); you may not use this file except in compliance with | |
# the License. You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
#!/usr/bin/env python | |
# Licensed to Tomaz Muraus under one or more | |
# contributor license agreements. See the NOTICE file distributed with | |
# this work for additional information regarding copyright ownership. | |
# Tomaz muraus licenses this file to You under the Apache License, Version 2.0 | |
# (the "License"); you may not use this file except in compliance with | |
# the License. You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
This is how you can take an OpenVPN .ovpn config file and extract the certificates/keys required to import the profile into NetworkManager.