Skip to content

Instantly share code, notes, and snippets.

View click0's full-sized avatar

Vladyslav V. Prodan click0

View GitHub Profile
@xbb
xbb / README
Last active April 17, 2024 20:21
IDRAC6 Virtual Console Launcher
Use this as an example on how to start the virtual console without the need of Java Web Start or accessing it from the web interface.
You can use the user and password that you use for the web interface.
You need an old JRE... I used 1.7.0_80 from the Server JRE package, also I have tested successfully 1.7.0_79 with MacOS.
You don't need to install it, just extract it or copy the files in "jre" folder.
Open the viewer.jnlp file that you get by launching the virtual console from the web interface with a text editor.
Note the urls to the jar files. Download the main jar file avctKVM.jar and the libs for your operating system and architecture.
Extract the dlls (.so Linux, .jnilib MacOS) from the jar libs.
@andreykin
andreykin / allow_mysql.sh
Created November 9, 2016 14:37
Allow mysql external connection for IP of current ssh-session (if dynamic ip)
ssh_client_ip=`echo $SSH_CLIENT | awk '{ print $1}'`;
ipfw -q add 00431 allow tcp from $ssh_client_ip to me 3306 in via em0 keep-state
#!/bin/bash
# iPXE build depends
apt-get install -y liblzma-dev git build-essential
# clone iPXE
[ ! -d ./ipxe ] && git clone http://git.ipxe.org/ipxe.git
cd ipxe/src
make clean
sed -i 's/#undef\tDOWNLOAD_PROTO_HTTPS/#define\tDOWNLOAD_PROTO_HTTPS/' config/general.h
@Envek
Envek / dnsmaster-update.sh
Last active August 12, 2017 23:55
Updates A and/or AAAA DNS records in DNS Master provider of Dynamic DNS. Works on Linux and OS X.
#!/bin/sh
usage() {
echo "DNS Master DynDNS update script. Updates A and/or AAAA records with public IPs that you have on your interfaces."
echo "Usage: $0 -h hostname[,hostname…] -u username -p password"
}
if [ $# -eq 0 ]; then usage; exit 1; fi
USERNAME=""
@benkulbertis
benkulbertis / cloudflare-update-record.sh
Last active April 28, 2024 16:35
Cloudflare API v4 Dynamic DNS Update in Bash
#!/bin/bash
# CHANGE THESE
auth_email="user@example.com"
auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # found in cloudflare account settings
zone_name="example.com"
record_name="www.example.com"
# MAYBE CHANGE THESE
ip=$(curl -s http://ipv4.icanhazip.com)
#!/usr/bin/env python
#
# Calculates the total number of Science Packs needed for research
# in the game Factorio (www.factorio.com).
#
# Created by Gandalfx
# https://gandalfx.github.com
sciences = {
@nl5887
nl5887 / transfer.fish
Last active March 22, 2022 09:07
Bash and zsh alias for transfer.sh. Transfers files and directories to transfer.sh.
function transfer
if test (count $argv) -eq 0
echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"
return 1
end
## get temporarily filename, output is written to this file show progress can be showed
set tmpfile ( mktemp -t transferXXX )
## upload stdin or file
@thde
thde / whois.conf
Last active September 1, 2023 07:29
/etc/whois.conf WHOIS records for nTLDs.
##
# WHOIS servers for new TLDs (http://www.iana.org/domains/root/db)
# Current as of 2017-12-10 UTC
##
\.aarp$ whois.nic.aarp
\.abarth$ whois.afilias-srs.net
\.abbott$ whois.afilias-srs.net
\.abbvie$ whois.afilias-srs.net
\.abc$ whois.nic.abc
@mwpher
mwpher / zfs-rollback.sh
Last active April 21, 2023 17:14
ZFS Recursive Rollback
#!/bin/sh
# Originally by: Dr. Martin Menzel www.dr-menzel-it.de
# Modified by Matthew Pherigo
#
# Use at your own risk. No warranty. No fee.
#
# parameter list:
# (1) the filesystem to be used to start decendant recursion
# example: apool/zones/webzone
# (2) the snapshot to which the filesystems should be rolled back
@marcusphi
marcusphi / ansible_conditionals_examples.yaml
Created October 2, 2013 09:48
Ansible 1.3 Conditional Execution -- Very complete example with comments -- I find the conditional expressions to be ridiculously hard to get right in Ansible. I don't have a good model of what's going on under the surface so I often get it wrong. What makes it even harder is that there has been at least three different variants over the course …
---
# This has been tested with ansible 1.3 with these commands:
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=false"
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=true"
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts"
# NB: The type of the variable is crucial!
- name: Ansible Conditionals Examples
hosts: $hosts
vars_files: