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
NotAllowAccessPC001:~ user1$ curl --version | |
curl 7.30.0 (x86_64-apple-darwin13.0) libcurl/7.30.0 SecureTransport zlib/1.2.5 | |
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp | |
Features: AsynchDNS GSS-Negotiate IPv6 Largefile NTLM NTLM_WB SSL libz | |
NotAllowAccessPC001:~ user1$ |
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
[ec2-user@example-ruby-sinatra-server ~]$ cp -p /home/ec2-user/.bashrc /home/ec2-user/.bashrc.ORG | |
[ec2-user@example-ruby-sinatra-server ~]$ diff /home/ec2-user/.bashrc /home/ec2-user/.bashrc.ORG | |
[ec2-user@example-ruby-sinatra-server ~]$ |
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
'use strict'; | |
// http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Inspector.html#startAssessmentRun-property | |
var AWS = require('aws-sdk') | |
, inspector = new AWS.Inspector({ apiVersion: '2016-02-16' }) | |
; | |
exports.handler = (event, context) => { | |
console.log('Start Amazon Inspector AssessmentRun'); |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"inspector:Get*", | |
"inspector:List*", | |
"inspector:Preview*", | |
"inspector:Describe*", |
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
[ec2-user@example-laravel-server ~]$ cd /var/www/laravel | |
[ec2-user@example-laravel-server laravel]$ pwd | |
/var/www/laravel | |
[ec2-user@example-laravel-server laravel]$ | |
[ec2-user@example-laravel-server laravel]$ laravel new exampleapp |
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 | |
## ---------------------------- | |
# ユーザからのキーボードの入力を受け取り、 | |
# yes と入力されたらスクリプトを実行する、no と入力されたらスクリプトを終了します. | |
## ---------------------------- | |
function ConfirmExecution() { | |
echo "----------------------------" |
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/env ruby | |
## ---------------------------- | |
# ユーザからのキーボードの入力を受け取り、 | |
# yes と入力されたらスクリプトを実行する、no と入力されたらスクリプトを終了します. | |
## ---------------------------- | |
class ConfirmExecutionClass | |
def initialize |
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/sh | |
echo "User Data start" | |
yum -y update | |
unalias cp | |
cp -f -p /usr/share/zoneinfo/Japan /etc/localtime | |
cat << _EOT_ > /etc/sysconfig/clock |
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 | |
crontab_csv_file="crontab.csv" | |
echo "cron_host,cron_user,minutes,hours,days,months,day_of_the_week,cron_name,cron_parameter" > $crontab_csv_file | |
crontab -l | grep -v ^# | grep -v ^$ | grep -v MAILTO | sed -e "s/ */ /g" -e "s/ /,/1" -e "s/ /,/1" -e "s/ /,/1" -e "s/ /,/1" -e "s/ /,/1" | awk '{$0="'`hostname -s`','$USER'," $0 "";print}' >> $crontab_csv_file | |
if [ -f $crontab_csv_file ] ; then | |
cat $crontab_csv_file | |
else |
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
[root@example-laravel-server ~]# grep date.timezone /etc/php.ini | |
;date.timezone = | |
↓ | |
date.timezone = "Asia/Tokyo" |