Skip to content

Instantly share code, notes, and snippets.

https://api.github.com/repos/Microsoft/azure-docs/events
[
{
id: "6121971036",
type: "PushEvent",
actor: {
id: 4665434,
login: "v-alje",
display_login: "v-alje",
<powershell>
Invoke-WebRequest -Uri https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 -OutFile ConfigureRemotingForAnsible.ps1
powershell -ExecutionPolicy RemoteSigned .\ConfigureRemotingForAnsible.ps1 -SkipNetworkProfileCheck
</powershell>
@kongou-ae
kongou-ae / gist:36c396f6fcf43b58e55ddcd69eb8fc76
Created April 19, 2017 05:38
get ami-id of latest windows server by AMI
aws ec2 describe-images --owner self amazon --profile lambda --region ap-northeast-1 --filters 'Name=platform,Values=windows,Name=name,Values=Windows_Server-2012-R2*Japanese-64Bit-Base*' --query 'reverse(sort_by(Images,&CreationDate))[0].ImageId' --output text
FROM ubuntu
RUN apt-get update && \
apt-get install -y python3 python3-dev libssl-dev python3-pip ruby wget -no-install-recommends && \
apt-get clean && rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/* && \
apt-get update && \
pip3 install ansible && \
gem install serverspec test-kitchen --no-ri --no-rdoc && \
pip3 install awscli && \
pip3 install aws-shell && \
@kongou-ae
kongou-ae / fg_facts.json
Created April 16, 2017 16:03
fg_facts.json
"gather": {
"ansible_facts": {
"ansible_distribution": "FortiOS",
"ansible_distribution_major_version": "v4.0",
"ansible_distribution_version": "v4.0 MR3 Patch 14",
"ansible_fqdn": "FGT50B3G08xxxxxx",
"ansible_hostname": "FGT50B3G08xxxxxx",
"ansible_memfree_mb": 115,
"ansible_memtotal_mb": 249,
"ansible_module_setup": true,
@kongou-ae
kongou-ae / PT1H.json
Last active April 2, 2017 15:03
Azure NSG Flow log
{
"records": [
{
"time": "2017-04-02T14:40:25.5360000Z",
"systemId": "19dbc05a-4461-47de-a3cc-842db1e5fc14",
"category": "NetworkSecurityGroupFlowEvent",
"resourceId": "/SUBSCRIPTIONS/YOUR-SUBSCRIPTION-ID/RESOURCEGROUPS/AZURELAB/PROVIDERS/MICROSOFT.NETWORK/NETWORKSECURITYGROUPS/US-WEST",
"operationName": "NetworkSecurityGroupFlowEvents",
"properties": {
"Version": 1,
@kongou-ae
kongou-ae / routing.json
Last active March 31, 2017 16:03
/api/v2/cmdb/router/static/
{
"http_method":"GET",
"results":[
{
"seq-num":1,
"q_origin_key":"1",
"status":"enable",
"dst":"192.168.1.0 255.255.255.0",
"gateway":"192.168.1.254",
"distance":10,
@kongou-ae
kongou-ae / service.json
Last active March 31, 2017 16:03
/api/v2/cmdb/firewall.service/custom/
{
"http_method":"GET",
"results":[
{
"name":"ALL",
"q_origin_key":"ALL",
"explicit-proxy":"disable",
"category":"General",
"protocol":"IP",
"iprange":"0.0.0.0",
@kongou-ae
kongou-ae / object.json
Created March 31, 2017 15:52
/api/v2/cmdb/firewall/object/
{
"http_method":"GET",
"results":[
{
"name":"Adobe Login",
"q_origin_key":"Adobe Login",
"uuid":"5d63a640-1613-51e7-88c2-c9b1a33b0349",
"subnet":"0.0.0.0 0.0.0.0",
"type":"wildcard-fqdn",
"start-ip":"0.0.0.0",
@kongou-ae
kongou-ae / policy.json
Last active April 1, 2017 13:23
/api/v2/cmdb/firewall/policy/
{
"http_method":"GET",
"results":[
{
"policyid":1,
"q_origin_key":"1",
"name":"test1",
"uuid":"5e793628-1625-51e7-74cf-0eed2b242a2f",
"srcintf":[
{