Skip to content

Instantly share code, notes, and snippets.

Anton Koldaev iroller

Block or report user

Report or block iroller

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@iroller
iroller / RBResizer.swift
Last active Jan 8, 2020 — forked from hcatlin/RBResizer.swift
Swift Image Resizer
View RBResizer.swift
//
// RBResizer.swift
// Locker
//
// Created by Hampton Catlin on 6/20/14.
// Copyright (c) 2014 rarebit. All rights reserved.
//
import UIKit
View chef_conf_2014_public_notes.md
View gist:8935530
[2014-02-11T14:09:37+00:00] INFO: Starting chef-zero on port 8889 with repository at repository at /tmp/kitchen
One version per cookbook
[2014-02-11T14:09:37+00:00] INFO: Forking chef instance to converge...
Starting Chef Client, version 11.10.0
[2014-02-11T14:09:37+00:00] INFO: *** Chef 11.10.0 ***
[2014-02-11T14:09:37+00:00] INFO: Chef-client pid: 3733
[2014-02-11T14:09:37+00:00] INFO: Setting the run_list to ["recipe[my-users::default]"] from JSON
[2014-02-11T14:09:37+00:00] INFO: Run List is [recipe[my-users::default]]
[2014-02-11T14:09:37+00:00] INFO: Run List expands to [my-users::default]
View gist:8935211
[2014-02-11T13:46:50+00:00] DEBUG: Loading cookbook users's providers from /tmp/kitchen/cache/cookbooks/users/providers/manage.rb
[2014-02-11T13:46:50+00:00] DEBUG: Loaded contents of /tmp/kitchen/cache/cookbooks/users/providers/manage.rb into a provider named users_manage defined in Chef::Provider::UsersManage
[2014-02-11T13:46:50+00:00] DEBUG: Loading cookbook users's resources from /tmp/kitchen/cache/cookbooks/users/resources/manage.rb
[2014-02-11T13:46:50+00:00] DEBUG: Loaded contents of /tmp/kitchen/cache/cookbooks/users/resources/manage.rb into a resource named users_manage defined in Chef::Resource::UsersManage
View rename-node.rb
#!/usr/bin/env knife exec
# A knife exec script to change chef node's name, preserving all the attributes.
#
# Usage: knife exec rename-node.rb old-name new-name
#
# Script retrieves the Node object, changes its 'name' attribute,
# creates new Node object with updated name and rest of attributes
# untouched. Then it deletes old Node and Client objects from
# database, and logs into the server to update it:
View gist:1583983
$ knife exec -E 'search(:node, "addresses:10.10.0.80").each {|node| puts node[:fqdn]}'
<0 results>
$ knife search node 'addresses:10.10.0.80'
<0 results>
$ knife search node 'network_interfaces_*_addresses:10.10.0.80'
1 items found
WHY?!
for some other nodes it works ok:
You can’t perform that action at this time.