Skip to content

Instantly share code, notes, and snippets.

@marshyon
marshyon / test_net_ssh_expect.pl
Created July 29, 2012 13:51
test and demonstrate the use of Net::SSH::Expect Perl module to connect via SSH using key authentication, to known and unknown hosts, running commands and processing captured standard output from those commands
#!/usr/bin/env perl
use warnings;
use strict;
use Date::Parse;
use Net::SSH::Expect;
use POSIX qw(strftime);
# set to a known host on your network
@chizmw
chizmw / cmp_versions.pl
Created January 30, 2013 23:31
Comparing some version numbers for a post on http://blogs.perl.org/users/chisel
#!/usr/bin/env perl
use strict;
use warnings;
use feature ':5.12';
use version;
use Text::SimpleTable;
my @versionstrings = (
'0.0.4',
@jerowe
jerowe / gist:c6a55952512d1b5b92dc
Last active November 10, 2016 07:46
Perl Catalyst with Apache Development and Production and SSL

Apache Config

# Virtual Host config for myhost.com

NameVirtualHost *:80

<VirtualHost *:80>

        ServerName myhost.com
@mazgi
mazgi / console.log.md
Last active March 18, 2024 17:18
LDAP Auth for SSSD, SSH, SUDO
# uname -a
Linux base 4.0.5-gentoo #1 SMP Wed Jul 1 02:23:16 JST 2015 x86_64 Intel(R) Xeon(R) CPU E5-2640 0 @ 2.50GHz GenuineIntel GNU/Linux

Packages

# emerge -pvq openldap openssh sssd sudo
[ebuild R ] net-nds/openldap-2.4.38-r2 USE="berkdb crypt gnutls ipv6 minimal sasl ssl syslog tcpd -cxx -debug -experimental -icu -iodbc -kerberos -odbc -overlays -perl -samba (-selinux) -slp -smbkrb5passwd" ABI_X86="(64) -32 (-x32)" 
@dcode
dcode / GitHub Flavored Asciidoc (GFA).adoc
Last active October 12, 2024 11:16
Demo of some useful tips for using Asciidoc on GitHub

GitHub Flavored Asciidoc (GFA)

@andkirby
andkirby / slack.sh
Last active June 5, 2024 09:55
Shell/Bash script for sending slack messages.
#!/usr/bin/env bash
####################################################################################
# Slack Bash console script for sending messages.
####################################################################################
# Installation
# $ curl -s https://gist.githubusercontent.com/andkirby/67a774513215d7ba06384186dd441d9e/raw --output /usr/bin/slack
# $ chmod +x /usr/bin/slack
####################################################################################
# USAGE
# Send message to slack channel/user