Skip to content

Instantly share code, notes, and snippets.

AWS::Logs::LogGroup

Resource schema for AWS::Logs::LogGroup

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{
"autoscaling": {
"CreateAutoScalingGroup": "autoscaling:CreateAutoScalingGroup",
"CreateLaunchConfiguration": "autoscaling:CreateLaunchConfiguration",
"CreateOrUpdateScalingTrigger": "autoscaling:CreateOrUpdateScalingTrigger",
"CreateOrUpdateTags": "autoscaling:CreateOrUpdateTags",
"DeleteAutoScalingGroup": "autoscaling:DeleteAutoScalingGroup",
"DeleteLaunchConfiguration": "autoscaling:DeleteLaunchConfiguration",
"DeleteNotificationConfiguration": "autoscaling:DeleteNotificationConfiguration",
"DeletePolicy": "autoscaling:DeletePolicy",
@wbingli
wbingli / aws_ips.rb
Created October 28, 2015 20:49
Calculate AWS total IPs
require 'open-uri'
require 'json'
data = JSON.load(open("https://ip-ranges.amazonaws.com/ip-ranges.json"))
ip_total = data['prefixes'].reduce(0) do | sum, item |
sum += 2 ** (32 - item['ip_prefix'].split('/')[1].to_i)
end
puts "AWS Total IPs: #{ip_total}"
require 'json'
$access_token = <your own token>
def add_word(word)
puts "Checking word : #{word}"
begin
result = `curl https://api.shanbay.com/bdc/search/?word=#{word}&access_token=#{$access_token}`
result = JSON.parse(result)
word_id = result['data']['id']
word_learning_id = result['data']['learning_id']
puts " word #{word}; id : #{word_id} ; learning_id: #{word_learning_id}"
@wbingli
wbingli / pr.md
Last active August 29, 2015 14:07 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@wbingli
wbingli / mac_add_loopback_ip
Created September 9, 2014 21:24
Add a new loopback ip. Mac only has one loopback ip(127.0.0.1) while Linux use 127.0.0.0/8 for loopback address.
sudo ifconfig lo0 alias 127.0.0.2 up

In a perfect world, where things are done well, not just quickly, I would expect to find the following when joining the company:

Documentation

  • Accurate / up-to-date systems architecture diagram

  • Accurate / up-to-date network diagram

  • Out-of-hours support plan

  • Incident management plan

@wbingli
wbingli / replace.sh
Created July 16, 2014 23:32
Replace ${} placeholder with environment values
perl -p -i -e 's/\$\{([^}]+)\}/defined $ENV{$1} ? $ENV{$1} : $&/eg' $1
@wbingli
wbingli / ipsec.conf
Created June 25, 2014 02:37
Configure L2TP/IPSec
conn L2TP-PSK-noNAT │
authby=secret │
pfs=no │
auto=add │
keyingtries=3 │
rekey=no │
ikelifetime=8h │
keylife=1h │
type=transport
@wbingli
wbingli / README.md
Last active August 29, 2015 14:01
Get how many pictures you have in Google plus

Below JavaScript Code will help you calculate total pictures you have in Google Plus.

Go to your google plus pictures albums page, run the script in the browser developer console. You will get your total pictures number.