Skip to content

Instantly share code, notes, and snippets.

"use client";
import { Flex } from "@aws-amplify/ui-react";
import MedicationList from "@/app/ui/components/MedicationList";
function Page() {
return (
<>
<Flex direction="column" padding="40px">
<Flex>
@emachnic
emachnic / effortless_proposal.md
Created December 12, 2019 21:09
"Effortless" AMI Deployments with Chef and Habitat

Abstract

Moving to an AMI deployment strategy for standing up web servers can be really awesome. From immutable artifacts that are deployed to any environment, to fewer moving parts, we can really simplify deploys.

Unfortunately, we still usually have some dynamic elements, like web server configs or environment-specific secrets. How can we supply values to those elements at runtime?

This talk will focus on how we can use a combination of Chef Infra and Habitat to solve that issue with AMI deployments.

Description

@emachnic
emachnic / default.rb
Created December 1, 2011 15:29
Chef recipe to write redis.yml on Engine Yard Cloud
# ey-cloud-recipes/cookbooks/redis-yml/recipes/default.rb
if ['app_master', 'app'].include?(node[:instance_role])
redis_instance = node['utility_instances'].find { |instance| instance['name'] == 'redis' }
if redis_instance
node[:applications].each do |app, data|
template "/data/#{app}/shared/config/redis.yml"do
source 'redis.yml.erb'
owner node[:owner_name]

Keybase proof

I hereby claim:

  • I am emachnic on github.
  • I am emachnic (https://keybase.io/emachnic) on keybase.
  • I have a public key ASAQiZlm0NvhUayP82RlKL7xX8i3LhdOItoEWEvgQwNC6Ao

To claim this, I am signing this object:

PS C:\Windows\system32> chef-client -l debug
Starting Chef Client, version 12.12.15
resolving cookbooks for run list: ["uship_ping"]
Synchronizing Cookbooks:
  - uship_ping (1.1.4)
  - git (4.3.7)
  - build-essential (7.0.2)
  - seven_zip (2.0.2)
  - windows (2.0.2)
template "#{consul_config_directory}/rabbit_config.json" do
...
end
execute 'consul reload' do
action :nothing
subscribes :run, "template[#{consul_config_directory}/rabbit_config.json"
end
# you can make as many tabs as you wish...
project_name: 'MyApp'
project_root: '~/Work/my_app'
rvm: '1.9.3'
tabs:
- editor:
layout: 'main-vertical'
panes:
- 'vim .'
# Default applications for startup and shutdown.
# Add/remove applications to customize
apps:
- 'Google Chrome'
- 'Propane'
- 'Skype'
- 'X-Lite'
- 'OmniFocus'
# URLs open in default browser
@emachnic
emachnic / kitchen_diagnose.md
Last active March 11, 2016 23:42
Test Kitchen Deadlock
---
timestamp: 2016-03-11 23:40:33 UTC
kitchen_version: 1.5.0
plugins:
  driver:
    Vagrant:
      class: Kitchen::Driver::Vagrant
      version: 0.19.0
      api_version: 2
@emachnic
emachnic / kitchen log
Created February 2, 2016 19:35
Unexpected token in chef-client.bat
$env:systemdrive\opscode\chef\bin\chef-client.bat --local-mode --config $env:TEMP\kitchen/client.rb --log_level debug --force-formatter --no-color --chef-zero-port 8889)
$$$$$$ At line:4 char:17
$$$$$$ + $env:systemdrive\opscode\chef\bin\chef-client.bat --local-mode --config
$$$$$$ $env:TEM ...
$$$$$$ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$$$$$$ Unexpected token '\opscode\chef\bin\chef-client.bat' in expression or
$$$$$$ statement.
$$$$$$ + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordEx
$$$$$$ ception
$$$$$$ + FullyQualifiedErrorId : UnexpectedToken