Skip to content

Instantly share code, notes, and snippets.

@Coeur
Coeur / README.md
Last active October 18, 2020 21:41 — forked from lopezjurip/README.md
Write to NTFS on OSX Yosemite and El Capitan
@wsargent
wsargent / docker_cheat.md
Last active April 30, 2026 00:15
Docker cheat sheet
@juanje
juanje / web_assertions.rb
Last active September 7, 2025 19:48
Examples of custom assertions for remote conections with MiniTest

This is a short and simple example of custom assertions for Minitest.

They are very basic, but they help me to learn it. And I can use the to test some very simple use case of remote conection without install a bunch of gems.

I learn what I needed for this from this article and the minitest-chef-handler's code.

It can be improved a lot using Nokogiri and other Ruby libraries.

@philfreo
philfreo / bucket_policy.js
Created October 6, 2012 01:27
AWS S3 bucket policy to make all files public (+CORS)
{
"Statement": [
{
"Sid": "AllowPublicRead",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::bucket_name_here/*"
@RobertLowe
RobertLowe / gist:2065750
Created March 17, 2012 22:08
Load a Chef::Node and convert it to an actual Node object
# load a chef node and turn it into an actual node object
node = Chef::Node.load("xxxx") # returns a hash
node = Chef::Node.new.tap do |n|
n.name( node["name"] )
n.chef_environment( node["chef_environment"] )
n.run_list( node["run_list"])
n.normal_attrs = node["normal"]
n.default_attrs = node["default"]