- Open the Terminal Application
- Type in
sudo -iand type in your Mac Administrator account password.sudogives you root level or administrator level privileges.
dsconfigad -show
| shell -${SHELL} | |
| caption always "%w" | |
| startup_message off | |
| defscrollback 10000 |
sudo -i and type in your Mac Administrator account password. sudo gives you root level or administrator level privileges.dsconfigad -show
| # http://www.bogotobogo.com/python/python_subprocess_module.php | |
| #!/usr/bin/python | |
| import subprocess | |
| # Example 1 | |
| out = subprocess.Popen(['df', '-h'], | |
| stdout=subprocess.PIPE, | |
| stderr=subprocess.PIPE) | |
| (stdout, stderr) = out.communicate() |
| # /root/xfsprogs-3.1.9ubuntu2/include/xqm.h | |
| # (('X'<<8)+(1)) | (('X'<<8)+(3)) | |
| # use strace to get above numbers: strace xfs_quota | |
| #!/usr/bin/env python | |
| # get quota information from XFS | |
| import sys | |
| from pwd import getpwnam | |
| from ctypes import * | |
| libc = cdll.LoadLibrary('libc.so.6') |
| #!/bin/bash | |
| # ARGV as array | |
| input=("$@") | |
| # filename is first argument | |
| filename="${input[0]}" | |
| # get array size | |
| height=${#input[@]} |
| #!/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 |
| #!/bin/bash | |
| set -e | |
| # trap keyboard interrupt (control-c) | |
| trap control_c INT | |
| # Must be run as root | |
| # requires: | |
| # - wget | |
| # - pax |
| Renew Puppet CA cert. | |
| Not the perfect idea, but should alleviate the need to resign every cert. | |
| What you need from existing puppet ssl directory: | |
| ca/ca_crt.pem | |
| ca/ca_key.pem | |
| Create an openssl.cnf: | |
| [ca] |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
| 1) see re: increasing shmmax http://stackoverflow.com/a/10629164/1283020 | |
| 2) add to postgresql.conf: | |
| shared_preload_libraries = 'pg_stat_statements' # (change requires restart) | |
| 136 pg_stat_statements.max = 1000 | |
| 137 pg_stat_statements.track = all | |
| 3) restart postgres | |
| 4) check it out in psql |