Skip to content

Instantly share code, notes, and snippets.

View kjhosein's full-sized avatar

Khalid J Hosein kjhosein

View GitHub Profile
@kjhosein
kjhosein / load_github_key.sh
Created February 12, 2025 18:09
Shell script to run ssh-agent and add the GitHub SSH key
# *nix shell script to add the GitHub key to my environment
# This must be sourced when run (i.e., $ source ./load_github_key.sh or $ . ./load_github_key.sh)
eval "$(ssh-agent -s)"
ssh-add -v ~/.ssh/name_of_your_github_private_ssh_key
ssh-add -l
# test key
echo
ssh -T [email protected]
@kjhosein
kjhosein / get-temp-instance-profile-creds.sh
Created August 14, 2017 16:30
Get temporary AWS credentials from instance profile
#!/bin/bash
# Get temporary AWS credentials as granted in the Instance Profile.
#
# Run it 'sourced'. i.e.:
# . ./get-temp-creds.sh
#
# Requires: jq
#
# Written Aug 2017 by Khalid J Hosein
@kjhosein
kjhosein / rundeck-read-run-only.aclpolicy
Last active July 14, 2023 13:41
A Rundeck ACL policy file that allows users in a specific group to run jobs, view nodes, view activity logs, run adhoc jobs in a specific project.
---
description: "Allow users in runjobs group to run, kill jobs, etc. in the project called specific-project-name"
# They can also read the activity logs and view the nodes.
context:
project: specific-project-name
by:
group: runjobs
for:
resource:
- equals:
@kjhosein
kjhosein / End_DST
Last active August 29, 2015 14:22
Ending Daylight Savings Time (DST) - Petitions and Information
## Information:
* http://www.standardtime.com/
* http://gizmodo.com/why-daylight-saving-time-is-pointless-5892438
* http://blogs.scientificamerican.com/observations/why-daylight-saving-time-should-be-eliminated/
* http://qz.com/357821/theres-no-proof-daylight-savings-time-saves-electricity-so-why-do-we-even-bother/
## Petitions (sign them all):
* http://petitions.moveon.org/sign/end-daylight-savings-5
* https://www.change.org/p/government-stop-daylight-saving-time
* http://www.petition2congress.com/6284/end-daylight-savings-time