An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
| from httplib2 import Http | |
| from json import dumps | |
| # | |
| # Hangouts Chat incoming webhook quickstart | |
| # | |
| def main(): | |
| url = 'URL' | |
| bot_message = { | |
| 'text' : 'Hello there!'} |
| import json | |
| import requests | |
| # Set the webhook_url to the one provided by Slack when you create the webhook at https://my.slack.com/services/new/incoming-webhook/ | |
| webhook_url = 'https://hooks.slack.com/services/T*******Y/BCU****4/8YaPzL******MUk***Tz' | |
| slack_data = {'text': "Sup! We're hacking shit together :spaghetti:"} | |
| response = requests.post( | |
| webhook_url, data=json.dumps(slack_data), | |
| headers={'Content-Type': 'application/json'} |
An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt install openjdk-8-jdk -y
sudo apt update
sudo apt install jenkins -y
sudo systemctl start jenkins
sudo systemctl status jenkins
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
| --- | |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: istio-ingressgateway | |
| namespace: istio-system | |
| annotations: | |
| labels: | |
| chart: gateways-1.0.5 | |
| release: istio |
| # aws ssm get-parameter --name /aws/service/eks/optimized-ami/1.16/amazon-linux-2/recommended/image_id --region us-west-2 --query "Parameter.Value" --output text | |
| --- | |
| AWSTemplateFormatVersion: '2010-09-09' | |
| Description: 'Amazon EKS - Node Group - Released 2018-08-30 with addition for Spot' | |
| Metadata: | |
| Author: | |
| Description: Madhuri Peri <[email protected]> Shawn OConnor <[email protected]> | |
| License: | |
| Description: 'Copyright 2017 Amazon.com, Inc. and its affiliates. All Rights Reserved. |
sudo docker run -it --rm --name letsencrypt \
-v '/etc/letsencrypt:/etc/letsencrypt' \
-v '/var/lib/letsencrypt:/var/lib/letsencrypt' \
certbot/certbot \
certonly \
-d [site] -d *.[site] \
--manual --preferred-challenges dns \
--server https://acme-v02.api.letsencrypt.org/directory