Skip to content

Instantly share code, notes, and snippets.

@jblaine
jblaine / gist:67283cf85d4b910b17fc1d9b787f3510
Created August 18, 2020 19:29
cinc as chef in Ubuntu 20
jblaine@ipac-ub20-tplt:~# sudo apt-get update
...
jblaine@ipac-ub20-tplt:~# date
Tue 18 Aug 2020 03:28:55 PM EDT
jblaine@ipac-ub20-tplt:~# sudo apt-cache show chef
Package: chef
Architecture: all
Version: 15.8.25.3.gcf41df6a2-6
Priority: optional
Section: universe/ruby
m26560@apub1:~$ dpkg -l | grep chef
ii chef 15.8.25.3.gcf41df6a2-6 all systems integration framework - clients
ii chef-bin 15.8.25.3.gcf41df6a2-6 all Chef binaries
ii chef-zero 15.0.0-2 all in-memory Chef server (for testing and solo purposes)
ii ruby-chef-config 15.8.25.3.gcf41df6a2-6 all Chef configuration library
ii ruby-chef-utils 15.8.25.3.gcf41df6a2-6 all Chef utilities library
m26560@apub1:~$ sudo dpkg -s chef
Package: chef
#!/bin/sh
DATE=$(date +%Y%m%d)
STATUSFILE="$HOME/Status/$DATE"
if [ "$1"x = "x" ]; then
cat "$STATUSFILE"
elif [ "$1"x = "editx" ]; then
"$EDITOR" "$STATUSFILE"
else
echo "$@" >> "$STATUSFILE"
@jblaine
jblaine / gist:a297b669eecdf745379071b1a0c07b0b
Created October 27, 2017 15:10
FileUtils.mv being EXECUTED at compile time from a library method?
# PART 1, THE EXCEPTION:
================================================================================
Recipe Compile Error in /var/chef/cache/cookbooks/r701-apache/recipes/mcran-server.rb
================================================================================
Errno::ENOENT
-------------
No such file or directory @ rb_file_s_rename - (/tmp/r701-apache-tmp-certs.pem, /etc/httpd/conf/../supporting_certs/certs.pem)
Cookbook Trace:

Keybase proof

I hereby claim:

  • I am jblaine on github.
  • I am cjeffblaine (https://keybase.io/cjeffblaine) on keybase.
  • I have a public key whose fingerprint is 837C 8831 0706 1D9E C03E 268E AE6C 4961 2B07 62CE

To claim this, I am signing this object:

>south
You burn your hand on the steel doorknob and notice smoke creeeping through the cracks
around the door.
>north
Your path is blocked by a github issue in a complicated codebase. The fire on the other
side of the door begins to burn through...
>west
Your path is blocked by a different github issue in the same complicated codebase.
isibed-1# ls -ld /bin/bash
-rwxr-xr-x 5 root wheel 958118 Apr 23 2015 /bin/bash
isibed-1# logout
isibed-1# /bin/bash --login
isibed-1# echo $SHELL
/usr/local/bin/zsh
isibed-1# env | grep BASH
isibed-1#
@jblaine
jblaine / expire-R-PACKAGES-gz.groovy
Created March 17, 2016 13:11
Caused by: java.lang.ClassFormatError: Illegal class name "expire-R-PACKAGES-gz$getCacheAge" in class file expire-R-PACKAGES-gz$getCacheAge
import org.artifactory.fs.FileInfo
import org.artifactory.repo.RepoPath
import org.artifactory.request.Request
import static CacheConstants.PACKAGES_GZ_CACHE_MILLIS
class CacheConstants {
static final long PACKAGES_GZ_CACHE_MILLIS = 1800 * 1000L
}
@jblaine
jblaine / gist:45a902e46d1e9047bc6f
Created March 1, 2016 14:41
git resource chef-client, PATH, etc.
[2016-03-01T09:31:00-05:00] INFO: Processing git[/usr/tools/hostdb] action sync (r701-hostdb::_update-advanced line 15)
[2016-03-01T09:31:00-05:00] DEBUG: Providers for generic git resource enabled on node include: [Chef::Provider::Git]
[2016-03-01T09:31:00-05:00] DEBUG: Provider for action sync on resource git[/usr/tools/hostdb] is Chef::Provider::Git
[2016-03-01T09:31:00-05:00] DEBUG: git[/usr/tools/hostdb] finding current git revision
[2016-03-01T09:31:00-05:00] INFO: Running queued delayed notifications before re-raising exception
[2016-03-01T09:31:00-05:00] DEBUG: Re-raising exception: Errno::ENOENT - git[/usr/tools/hostdb] (r701-hostdb::_update-advanced line 15) had an error: Errno::ENOENT: No such file or directory - git
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/mixlib-shellout-2.2.5/lib/mixlib/shellout/unix.rb:338:in `exec'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/mixlib-shellout-2.2.5/lib/mixlib/shellout/unix.rb:338:in `block in fork_subprocess'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/mi
@jblaine
jblaine / gist:240f09b0078efff2505b
Last active February 12, 2016 06:09
Come at me bro
for i in `curl --silent -H "X-JFrog-Art-Api:API_KEY_HERE_REDACTED" -X GET \
"https://artifacts.mitre.org/artifactory/api/search/badChecksum?type=sha1&repos=java-libs-release-local" \
| grep uri | awk '{print $3}' | sed -e 's/"//g' -e 's/,//g' \
-e 's/https:\/\/artifactory\.our\.org\/artifactory\/api\/storage\/java-libs-release-local\///g'`; \
do echo "{ \"repoKey\": \"java-libs-release-local\", \"path\": \"$i\" }" | \
curl --header "Content-Type:application/json" -H "X-JFrog-Art-Api:API_KEY_HERE_REDACTED" \
-X POST --verbose -d @- https://artifactory.our.org/artifactory/ui/checksums/fix; done