Skip to content

Instantly share code, notes, and snippets.

View double-z's full-sized avatar

Zack Zondlo double-z

View GitHub Profile
@ShalokShalom
ShalokShalom / p2p
Last active September 23, 2023 14:55
From Pacman to Habitat
This page aims to pick up Pacman users from where they are and bring them to the world of Habitat:
'General hints'
What is a PKGBUILD at Pacman, is a plan.sh at Habitat.
In general, both use bash scripts and a very simple approach.
Habitat builds all in own chroot environments, which are called studios.
You access such a studio with the command "hab studio enter"
@smith
smith / habitat-notes.md
Last active August 25, 2017 17:59
Habitat Notes

Habitat Notes

Things I'm learning while using Habitat, written down so I remember them.

Cache artifacts in a Mac studio

export HAB_DOCKER_OPTS="-v /Users/nathansmith/.hab/cache/artifacts /hab/studios/src/hab/cache/artifacts"

Find reverse dependencies for a package

@ctdk
ctdk / node-test-bigger.rb
Created June 22, 2015 20:53
A ruby script to create a whole bunch of chef nodes.
#!/usr/bin/env ruby
require 'chef-api'
require 'fauxhai'
include ChefAPI::Resource
ChefAPI.configure do |config|
config.endpoint = 'http://HOSTNAME:4545'
config.client = 'admin'
@afiune
afiune / easy-setup-locally-kitchen-ssh
Created May 12, 2015 15:43
Delivery Cluster Setup
# Easy Setup Locally using Kitchen/SSH Driver
#
# Following the Steps on the README.md
# => https://github.com/opscode-cookbooks/delivery-cluster#easy-setup
#
# 1) Download your Delivery license key
# => I have already my Delivery License locally. Get one with your Chef Rep. :)
#
# 2) Provisioning infrastructure [SSH/Kitchen]
@jkeiser
jkeiser / gist:f0b44259c062097e284e
Last active March 20, 2016 08:31
chef-apply this and MAGIC
module Chef::DSL::Recipe
#
# Sets defaults for a named resource
#
# defaults :file, :directory do
# owner 'jkeiser'
# group 'wheel'
# mode 0777
# end
#
@yunga
yunga / Cliref.md
Last active February 1, 2024 00:56
CLIRef.md
_________ _____ _______________       _____
\_   ___ \\    \\___________   \____ / ____\     ~/.bash/cliref.md
/    \  \/|    | |   ||       _/ __ \  __\    copy/paste from whatisdb
\     \___|__  |_|_  ||    |   \  __/|_ |   http://pastebin.com/yGmGiDQX
 \________  /_____ \_||____|_  /____  /_|     yunga.palatino@gmail.com
 20160515 \/ 1527 \/         \/     \/

alias CLIRef.txt='curl -s "http://pastebin.com/raw/yGmGiDQX" | less -i'

@jkeiser
jkeiser / hang2
Last active August 29, 2015 13:57
root@test:/mnt/host_src/chef-metal-lxc/test# strace -f -e process chef-client -z -l debug -o lxctests::simple2
execve("/usr/local/bin/chef-client", ["chef-client", "-z", "-l", "debug", "-o", "lxctests::simple2"], [/* 23 vars */]) = 0
arch_prctl(ARCH_SET_FS, 0x7fc526822740) = 0
clone(child_stack=0x7fc52682cfb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fc52682d9d0, tls=0x7fc52682d700, child_tidptr=0x7fc52682d9d0) = 32664
Process 32664 attached
[pid 32664] _exit(0) = ?
[pid 32664] +++ exited with 0 +++
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fc526822a10) = 32665
clone(child_stack=0x7fc52682cfb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fc52682d9d0, tls=0x7fc52682d700, child_tidptr=0x7fc52682d9d0) = 32666
Process 32666 attached
@gaganawhad
gaganawhad / passenger-nginx-font-accept-header.md
Last active January 22, 2016 04:16 — forked from atiw003/nginx-font-serving
Setting Accept-Control-Allow--Origin header on ( font ) assets in nginx. Helpful when using passenger on heroku

Currently passenger 4.0.39 and above come with a default nginx configuration file with a location @static_assets block. Paste the following inside it.

  if ($request_filename ~* ^.*?/([^/]*?)$) {
      set $filename $1; 
   }

  if ($filename ~* ^.*?\.(eot)|(ttf)|(svg)|(woff)$) {
    add_header Access-Control-Allow-Origin *;
  }
root@test:/mnt/host_src/chef-metal-lxc# ruby -I lib lxccheck.rb
received 1 INSIDE!
received 2 OUTSIDE!
received 3 INSIDE!
received 4 OUTSIDE!
received 5 INSIDE!
received 6 OUTSIDE!
received 7 INSIDE!
received 8 OUTSIDE!
received 9 INSIDE!

getchef4-test1

[gfm] Introducing Chef Metal 0.2! Chef Metal is a framework that lets you manage your *clusters* with Chef the same way you manage machines: with recipes. Combined with the power of Chef, Metal's `machine` resource helps you to describe, version, deploy and manage everything from simple to complex clusters with a common set of tools.

To get it, gem install chef-metal. To hack, go to https://github.com/opscode/chef-metal. Currently supported provisioners include LXC containers, EC2, DigitalOcean, and Vagrant. If you just want to skip all that, follow the quick start in the README.

The current release is an alpha. You can see a lot of our plans, and some concrete examples, in the [requirements doc](https://github.com/opscode/chef-metal/blob/master/docs/r