An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
Includes HTTP-Header information in the output
| ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/id_rsa | |
| ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/github_rsa | |
| ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/mozilla_rsa |
| #!/bin/sh | |
| # Use AWS CLI to get the most recent version of an AMI that | |
| # matches certain criteria. Has obvious uses. Made possible via | |
| # --query, --output text, and the fact that RFC3339 datetime | |
| # fields are easily sortable. | |
| export AWS_DEFAULT_REGION=us-east-1 | |
| aws ec2 describe-images \ |
An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
Includes HTTP-Header information in the output
Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.
In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j
| { | |
| "APIGatewayServiceRolePolicy": { | |
| "Arn": "arn:aws:iam::aws:policy/aws-service-role/APIGatewayServiceRolePolicy", | |
| "AttachmentCount": 1, | |
| "CreateDate": "2018-08-10T17:57:44+00:00", | |
| "DefaultVersionId": "v3", | |
| "Document": { | |
| "Statement": [ | |
| { | |
| "Action": [ |
| #!/bin/sh | |
| # This script should be saved in a git repo as a hook file, e.g. .git/hooks/pre-receive. | |
| # It looks for scripts in the .git/hooks/pre-receive.d directory and executes them in order, | |
| # passing along stdin. If any script exits with a non-zero status, this script exits. | |
| script_dir=$(dirname $0) | |
| hook_name=$(basename $0) | |
| hook_dir="$script_dir/$hook_name.d" |
| aws support describe-trusted-advisor-check-result --check-id eW7HH0l7J9 --query 'result.sort_by(flaggedResources[?status!="ok"],&metadata[2])[].metadata' --output table --region us-east-1 |
I've been using a lot of Ansible lately and while almost everything has been great, finding a clean way to implement ansible-vault wasn't immediately apparent.
What I decided on was the following: put your secret information into a vars file, reference that vars file from your task, and encrypt the whole vars file using ansible-vault encrypt.
Let's use an example: You're writing an Ansible role and want to encrypt the spoiler for the movie Aliens.
| # Create a new repository on the command line | |
| touch README.md | |
| git init | |
| git add README.md | |
| git commit -m "first commit" | |
| git remote add origin https://github.com/c0ldlimit/vimcolors.git | |
| git push -u origin master | |
| # Push an existing repository from the command line |
| ========================== | |
| Last Validated: 09/29/2017 | |
| ========================== | |
| ssh to your ec2 amazon ec2 instance | |
| # Update and install dependencies | |
| sudo su | |
| yum update | |
| yum install -y git |