Author:
erics , July 29th, 2021
SUMMARY: Needed to create an AWS IAM Policy to allow a user access to create and delete EBS snapshots. This script also needed to be able to list volumes:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{
"Version" : "2012-10-17" ,
"Statement" : [
{
"Sid" : "VisualEditor0" ,
"Effect" : "Allow" ,
"Action" : [
"ec2:DeleteSnapshot" ,
"ec2:ModifySnapshotAttribute" ,
"ec2:CreateSnapshots" ,
"ec2:ResetSnapshotAttribute" ,
"ec2:CreateSnapshot"
] ,
"Resource" : [
"arn:aws:ec2:*:ACCOUNT_ID_HERE:volume/*" ,
"arn:aws:ec2:*:ACCOUNT_ID_HERE:snapshot/*" ,
"arn:aws:ec2:*:ACCOUNT_ID_HERE:instance/*"
]
} ,
{
"Sid" : "VisualEditor1" ,
"Effect" : "Allow" ,
"Action" : [
"ec2:DescribeSnapshotAttribute" ,
"ec2:DescribeVolumes" ,
"ec2:DescribeSnapshots"
] ,
"Resource" : "*"
}
]
}
Categories: How-To's , Technology Tags: Amazon , AWS , Create , Delete , howto , IAM , JSON , Policy , Snapshot , tips , User , volume
| No comments
Author:
erics , August 31st, 2018
< button class = "paypal-btn large" onclick = "window.location='https://www.yoursite.com/targetPage/';return false" > What a Great Button < / button >
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
button . paypal - btn {
white - space : nowrap ;
}
button . paypal - btn {
white - space : nowrap ;
overflow : hidden ;
border - radius : 13px ;
font - family : "Arial" , bold , italic ;
font - weight : bold ;
font - style : italic ;
border : 1px solid #ffa823;
color : #0E3168;
background : #ffa823;
position : relative ;
text - shadow : 0 1px 0 rgba ( 255 , 255 , 255 , . 5 ) ;
cursor : pointer ;
z - index : 0 ;
}
button . paypal - btn : before {
content : " " ;
position : absolute ;
width : 100 % ;
height : 100 % ;
border - radius : 11px ;
top : 0 ;
left : 0 ;
background : #ffa823;
background : - webkit - linear - gradient ( top , #FFAA00 0%,#FFAA00 80%,#FFF8FC 100%);
background : - moz - linear - gradient ( top , #FFAA00 0%,#FFAA00 80%,#FFF8FC 100%);
background : - ms - linear - gradient ( top , #FFAA00 0%,#FFAA00 80%,#FFF8FC 100%);
background : linear - gradient ( top , #FFAA00 0%,#FFAA00 80%,#FFF8FC 100%);
z - index : - 2 ;
}
button . paypal - btn : after {
content : " " ;
position : absolute ;
width : 98 % ;
height : 60 % ;
border - radius : 40px 40px 38px 38px ;
top : 0 ;
left : 0 ;
background : - webkit - linear - gradient ( top , #fefefe 0%, #fed994 100%);
background : - moz - linear - gradient ( top , #fefefe 0%, #fed994 100%);
background : - ms - linear - gradient ( top , #fefefe 0%, #fed994 100%);
background : linear - gradient ( top , #fefefe 0%, #fed994 100%);
z - index : - 1 ;
- webkit - transform : translateX ( 1 % ) ;
- moz - transform : translateX ( 1 % ) ;
- ms - transform : translateX ( 1 % ) ;
transform : translateX ( 1 % ) ;
}
button . paypal - btn . small {
padding : 3px 15px ;
font - size : 12px ;
}
button . paypal - btn . large {
padding : 4px 19px ;
font - size : 14px ;
}
Categories: How-To's , Technology Tags: Button , Class , Create , CSS , howto , html , onclick , PayPal , style , tips
| No comments
Author:
erics , February 1st, 2018
Backup Compressed: svnadmin dump /volumes/data/svn/yourRepo | gzip -9 > /volumes/data/backup/yourRepo.dmp.gz Backup Uncompressed: svnadmin dump /volumes/data/svn/yourRepo > /volumes/data/backup/yourRepo.dmp Restore the Repo Create a new SVN repository: svnadmin create /volumes/data/svn/newRepo Restore the dump file to the new repository: svnadmin load /volumes/data/svn/newRepo < /volumes/data/backup/yourRepo.dmp Just for good measure, here is how to checkout from a local repo: svn […]
Categories: How-To's , Technology Tags: backup , Compress , Compressed , Create , dmp , Dump , howto , Load , Restore , SVN , svnadmin , tips , Uncompress
| No comments
Author:
erics , October 10th, 2012
$ s3 -> create_object ( '<bucket_name>' , 'folder/' , array ( 'body' = > '' ) ) ;
~ OR ~
$ s3 -> create_object ( '<bucket_name>' , 'folder/' , array ( 'body' = > '' , 'contentType' = > 'application/x-directory' ) ) ;
Categories: How-To's , Technology Tags: Amazon , AWS , Create , create_object , directory , howto , php , tips
| No comments
Author:
erics , September 27th, 2011
I found this VERY cool website, http://dummyimage.com/, that lets me custom-build a placeholder image on the fly, like this:
< img src = "http://dummyimage.com/120x120/fff/ccc" alt = "Placeholder Image for a 120px x 120px graphic" >
Categories: How-To's , Technology Tags: Automatic , Create , Custom , Dummy , Dummy image , Generate , howto , Image , Place Holder , Placeholder , tips
| No comments