Skip to content

Instantly share code, notes, and snippets.

View mcgarrigle's full-sized avatar

mcgarrigle

  • UK
View GitHub Profile
; nasm -f elf64 -o hello.o hello.asm
; ld -o hello hello.o
; from:
; http://blog.rchapman.org/posts/Linux_System_Call_Table_for_x86_64/
sys_write equ 1
sys_exit equ 60
stdin equ 0
@mcgarrigle
mcgarrigle / debug.txt
Last active February 19, 2018 19:08
Accumulated debugging
-------------------------------------
Network
-------------------------------------
Puppet
hiera -d build::variable environemnt=production ::fqdn=node.foo.local
yum install -y puppet-client-utils
@mcgarrigle
mcgarrigle / template.py
Created February 14, 2018 09:38
Python Templating
#!/usr/bin/env python
def template(t, d):
for k, v in d.items():
label = "[{}]".format(k)
t = t.replace(label, v)
return t
string = "first [name] address [town] '[other]'"
vgextend /dev/linux/var
lvextend -l 100%FREE /dev/linux/var
@mcgarrigle
mcgarrigle / ruby24-with-bundler.sh
Last active April 10, 2018 07:04
Latest ruby 2.4.0 in CentOS7 with gems
yum install centos-release-scl
yum install rh-ruby24-ruby-devel
scl enable rh-ruby24 bash
gem install bundler
bundle install
ipa-client-install --mkhomedir --ip-address=10.0.40.100
hiera -d build::variable environment=production ::fqdn=node.foo.local
#or
puppet lookup --explain --node node.foo.local build::variable
# ------------------------------------------------
puppet resource package puppet-client-tools ensure=latest
# or
yum install -y puppet-client-utils
print cert
----------
# openssl x509 -in /etc/pki/tls/certs/node.foo.local.crt -text -noout
$ openssl s_client -showcerts -connect node.foo.local:443
using SNI steering
assumption:
/etc/openldap/ldap.conf is correct:
SASL_NOCANON on
URI ldaps://ipa.foo.com
BASE dc=foo,dc=com
TLS_CACERT /etc/ipa/ca.crt
check LDAP:
rpm --querytags
rpm -qp --queryformat '%{version}.%{release}\n' /media/dvd/Packages/centos-release-7-5.1804.el7.centos.x86_64.rpm