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
# app/models/experience.rb | |
# | |
# == Schema Information | |
# | |
# Table name: experiences | |
# | |
# id :integer not null, primary key | |
# title :string | |
# description :text | |
# created_at :datetime not null |
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
require 'csv' | |
require 'optparse' | |
class AWSELBAccessLogParser | |
def initialize() | |
@@elb_access_log_format=%Q(timestamp elb client:port backend:port request_processing_time backend_processing_time response_processing_time elb_status_code backend_status_code received_bytes sent_bytes "request" "user_agent" ssl_cipher ssl_protocol) | |
# puts "elb_access_log_format is #{elb_access_log_format.split(" ")}" | |
@@line_regex = / |
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 | |
############################################# | |
###### Global Variable ######### | |
############################################# | |
MAIL_TO="" | |
S3_BASE_PREFIX="" | |
BASE_WORK_DIR=`cd $(dirname $0); pwd ` |
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
=begin | |
This script uses the AWS v2 API | |
Gemfile: | |
source "https://rubygems.org" | |
gem "aws-sdk", "2.0.17.pre" |
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
# get git branch and last commit time | |
git for-each-ref --sort=-committerdate refs/heads/ --format='%(refname) %(committerdate) %(authorname)' | sed 's/refs\/heads\///g' |
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
# change file extension | |
input_file="./xxx.log" | |
output_file= "#{input_file.chomp(File.extname(input_file))}.csv" | |
puts "input_file is #{input_file}, output_file is #{output_file}" | |
# get first line of files | |
input_file="./xxx.log" | |
first_line = File.open(src_file, "r") {|f| f.readline} | |
puts "first_line of file[#{input_file}] is #{first_line}" |
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
launchctl unload /Library/LaunchAgents/org.macosforge.xquartz.startx.plist | |
sudo launchctl unload /Library/LaunchDaemons/org.macosforge.xquartz.privileged_startx.plist | |
sudo rm -rf /opt/X11* /Library/Launch*/org.macosforge.xquartz.* /Applications/Utilities/XQuartz.app /etc/*paths.d/*XQuartz | |
sudo pkgutil --forget org.macosforge.xquartz.pkg | |
# Log out and log in |