This file contains hidden or 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
| alias ll="ls -aslFh" | |
| export EDITOR="/usr/local/bin/mate -w" | |
| # Homebrew Ruby | |
| export PATH="/opt/homebrew/opt/ruby/bin:/opt/homebrew/lib/ruby/gems/3.4.0/bin:$PATH" | |
| export LDFLAGS="-L/opt/homebrew/opt/ruby/lib" | |
| export CPPFLAGS="-I/opt/homebrew/opt/ruby/include" | |
| # Prompt | |
| source ~/.zsh_prompt.zsh |
This file contains hidden or 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
| # ─── ZSH Prompt ─────────────────────────────────────────────────────────────── | |
| autoload -Uz vcs_info | |
| setopt prompt_subst | |
| # ── Git info ────────────────────────────────────────────────────────────────── | |
| # Formats: branch name, with * for unstaged changes, + for staged | |
| zstyle ':vcs_info:*' enable git | |
| zstyle ':vcs_info:git:*' check-for-changes true | |
| zstyle ':vcs_info:git:*' unstagedstr '*' | |
| zstyle ':vcs_info:git:*' stagedstr '+' |
This file contains hidden or 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
| { | |
| "opsworks" : { | |
| "ruby_version" : "2.1" | |
| } | |
| } |
This file contains hidden or 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
| redis_port = '6379' | |
| redis_server = node[:opsworks][:layers][:redis][:instances].keys.first rescue nil | |
| if redis_server | |
| node[:deploy].each do |app, config| | |
| template "#{node[:deploy][app][:deploy_to]}/current/config/redis.yml" do | |
| variables :ip => redis_server[:private_ip], :port => redis_port | |
| notifies :restart, resources(:service => 'tomcat') | |
| only_if do | |
| File.exists?("#{node[:deploy][app][:deploy_to]}/current/config/") |
This file contains hidden or 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
| aws opsworks --region us-east-1 create-deployment --stack-id 935450cc-61e0-4b03-a3e0-160ac817d2bb --command "{\"Name\":\"deploy\", \"CustomJson\":{\"deploy\":{\"APPSHORTNAME\":{\"scm\":{\"revision\":\"MYBRANCHNAME\"}}}}}" | |
| The JSON structure you want to pass should look like this: | |
| { | |
| "deploy": { | |
| "MYAPPSHORTNAME": { | |
| "scm": { | |
| "revision": "MYGITBRANCH" |
This file contains hidden or 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
| pgsql_server = node[:opsworks][:roles][:postgres][:instances].keys.first rescue nil | |
| pgsql_server_ip = node[:opsworks][:roles][:postgres][:instances][pqsql_server][:private_dns_name] rescue nil |
This file contains hidden or 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
| AWS OpsWorks & Chef: | |
| AWS OpsWorks runs Chef on thousands of customer systems every day. | |
| In this talk we will describe how we bundle and interact with Chef, | |
| highlight differences to Chef server, and summarize our experiences. |
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'net/http' | |
| require 'eventmachine' | |
| require 'benchmark' | |
| 5.times do | |
| puts "URI get: (%.3fs)" % [Benchmark.realtime{ Net::HTTP.get URI.parse('http://www.google.com') }] | |
| end |
This file contains hidden or 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
| # /etc/security/limits.conf | |
| * soft nofile 999999 | |
| * hard nofile 999999 | |
| root soft nofile 999999 | |
| root hard nofile 999999 | |
| =========================================================== | |
| # /etc/sysctl.conf | |
| # sysctl for maximum tuning |
This file contains hidden or 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
| <% memcache_servers = node[:scalarium][:roles][:memcached][:instances].values %> | |
| <% memcache_server_ips = memcache_servers.map{|instance| instance[:private_ip]} %> | |
| <% (['development', 'production'] + [@environment]).uniq.each do |env| -%> | |
| <%= env %>: | |
| host: <%= @memcached[:host] %> | |
| hosts: <%= memcache_server_ips %> | |
| port: <%= @memcached[:port] %> | |
| <% end -%> |
NewerOlder