Skip to content

Instantly share code, notes, and snippets.

View traylenator's full-sized avatar

Steve Traylen traylenator

View GitHub Profile
@traylenator
traylenator / todo-wrapper.sh
Last active January 2, 2016 12:09
# A small wrapper script for todo.sh[1] that uses Dropbox-Uploader # to pull and push files from dropbox before they are operated # on locally. # [1] https://github.com/ginatrapani/todo.txt-cli # [2] https://github.com/andreafabrizi/Dropbox-Uploader
#!/bin/bash
# Steve Traylen <[email protected]> , 7th January 2014.
# A small wrapper script for todo.sh[1] that uses Dropbox-Uploader[2]
# to pull and push files from dropbox before they are operated
# on locally. If changes happen then the files are uploaded.
# The purpose of using this is it allows todo.sh cli to be used
# on a multiuser system where drop box cannot be installed
# in the normal fashion.
Testing
```console
[joe@desktop] $ ssh-add
Enter passphrase for /home/joe/.ssh/id_rsa:
Bad passphrase, try again for /home/joe/.ssh/id_rsa:
Identity added: /home/joe/.ssh/id_rsa (/home/joe/.ssh/id_rsa)
# Show your key is loaded
[joe@desktop]$ ssh-add -l
[joe@desktop] $ ssh-add
Enter passphrase for /home/joe/.ssh/id_rsa:
Bad passphrase, try again for /home/joe/.ssh/id_rsa:
Identity added: /home/joe/.ssh/id_rsa (/home/joe/.ssh/id_rsa)
# Show your key is loaded
[joe@desktop]$ ssh-add -l
2048 41:ff:d2:b9:e6:ab:1f:8a:df:73:e4:dd:7b:7b:37:c0 /hoem/joe/.ssh/id_rsa (RSA)
@traylenator
traylenator / hostparm.rb
Created June 1, 2016 12:29
List of hosts with a param set.
hostset = HostParameter.where(name: 'hwdbkopts').map(&:host).reject { |h| ! defined?(h.name) }.select { |h| h.managed == true }.map{|h| h[:name]}
#%PAM-1.0
auth required pam_permit.so
auth optional pam_echo.so "Have passed pam_permit"
account [default=bad success=ok user_unknown=ignore] pam_sss.so
account required pam_permit.so
account optional pam_echo.so "Have passed pam_sss"