Here's an example of the kind of GraphQL query that Code.gov might submit to the GitHub GraphQL endpoint. It also explains why the switch to using GraphQL (in GitHub API version 4) makes things a ton easier than all the REST calls we were doing before (in GitHub API version 3).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ddns-update-style none; | |
option domain-name "bimap.co"; | |
option domain-name-servers 208.67.222.222, 208.67.220.220; | |
default-lease-time 86400; | |
max-lease-time 604800; | |
authoritative; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: gluster | |
become: true | |
vars: | |
gluster_mount_dir: /mnt/g1 | |
gluster_brick_dir: /bricks/brick1 | |
gluster_brick_name: g1 | |
tasks: | |
- name: Install parted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Prepare the host system | |
sudo sh -c "cat - >> /etc/apt/sources.list.d/ddebs.list" << EOF | |
deb http://ddebs.ubuntu.com precise main restricted universe multiverse | |
deb http://ddebs.ubuntu.com precise-updates main restricted universe multiverse | |
deb http://ddebs.ubuntu.com precise-security main restricted universe multiverse | |
EOF | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ECDCAD72428D7C01 | |
sudo apt-get update | |
sudo apt-get upgrade -y | |
sudo apt-get install -y linux-image-3.8.0-34-generic |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id":"nginx-mysql", | |
"kind": "Pod", | |
"apiVersion": "v2", | |
"metadata": { | |
"name": "nginx-mysql", | |
"labels": { | |
"name": "nginx-mysql" | |
} | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ReplicationController | |
metadata: | |
name: elk-rc | |
labels: | |
k8s-app: elk | |
spec: | |
selector: | |
k8s-app: elk | |
template: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contract Ballot { | |
struct Voter { | |
uint weight; | |
bool voted; | |
uint8 vote; | |
address delegate; | |
} | |
struct Proposal { | |
uint voteCount; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# your have to add hostname after script command, ether "elk1", "elk2", or "elk3" | |
if [ $# -eq 1 ] | |
then | |
echo "my hostname: $1" | |
MY_HOSTNAME=$1 | |
else | |
echo "Usage: ./elk.sh HOSTNAME, where HOSTNAME is an argument as a unique hostname for the elasticsearch cluaster, ether "elk1", "elk2", or "elk3" " | |
exit | |
fi |