Skip to content

Instantly share code, notes, and snippets.

View talarczykco's full-sized avatar

Michael Talarczyk talarczykco

View GitHub Profile
@jtimberman
jtimberman / rename-node.rb
Created March 2, 2012 07:47 — forked from mpasternacki/rename-node.rb
A knife exec script to change Chef node's name.
#!./bin/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:
@originalhat
originalhat / gist:2855482
Created June 1, 2012 22:25
Installing Nagios on OSX (10.6.8)

Nagios Install - OSX (10.6.8)

Overview

Installing Nagios on linux is well documented and relativly straightforward. Installing Nagios on OSX however, can be a bit different, and in my case presented a number of unique issues that I hope this guide might address.

If you run into an odd error messages, check the Troubleshooting section below, it might have the answer you're looking for!

Requirements / Dependencies

@phred
phred / pedantically_commented_playbook.yml
Last active November 3, 2023 01:55
Very complete Ansible playbook, showing off all the options
---
####
#### THIS IS OLD AND OUTDATED
#### LIKE, ANSIBLE 1.0 OLD.
####
#### PROBABLY HIT UP https://docs.ansible.com MY DUDES
####
#### IF IT BREAKS I'M JUST SOME GUY WITH
#### A DOG, OK, SORRY
####
@gmhawash
gmhawash / gist:4043232
Created November 9, 2012 01:54
Reset jenkins password
0. SSH to server
1. Edit /opt/bitnami/apps/jenkins/jenkins_home/config.xml
2. set userSecurity to false: <userSecurity>false</userSecurity>
3. delete
<authorizationStrategy> and <securityRealm>
4. /etc/init.d/bitnami restart
@kylefox
kylefox / gist:4512777
Created January 11, 2013 18:15
If you want to use Xcode's FileMerge as your git mergetool, this is how you set it up.
# Tell system when Xcode utilities live:
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
# Set "opendiff" as the default mergetool globally:
git config --global merge.tool opendiff
@leifg
leifg / Vagrantfile
Last active November 12, 2023 08:31
Add a second disk to system using vagrant
file_to_disk = './tmp/large_disk.vdi'
Vagrant::Config.run do |config|
config.vm.box = 'base'
config.vm.customize ['createhd', '--filename', file_to_disk, '--size', 500 * 1024]
config.vm.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk]
end
@ogrrd
ogrrd / dnsmasq OS X.md
Last active June 5, 2024 20:47
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.

Requirements

Install

@maxfenton
maxfenton / a-new-mac-setup.md
Last active April 17, 2024 10:55
System setup stuff for a new OLD mac (a/o 2020)

New computer setup

a/o 2020-05-29

--

Format the drive

  1. Restart with Cmd-R or Cmd-D
  2. Erase drive / 3x if second-hand
  3. Reinstall MacOS
@ninadsp
ninadsp / README.md
Last active August 26, 2022 15:06
Use jq to conditionally pick up fields from a JSON
  • 1.json contains data retrieved from the Instagram API. data is an array of media matching the query posted to Instagram's REST API, in a JSON array.
  • Each media element contains metadata for a photo/video posted to Instagram
  • .data[] loops over each media object in the JSON file, letting us process each element
  • | works like a regular *nix pipe, taking the output of the previous operator and passing it on to the next one.
  • select() filters through objects depending on the rule passed to it.
  • .tags[] returns an array of tags for each media. contains() returns true if the current object passed to it contains the string passed as a parameter. .tags[] | contains("100happydays") iterates over all the tags associated with the media object and returns true if the current tag matches the string 100happydays.
  • .select( .tags[] | contains("100happydays") ) filters all media objects that contain the tag 100happydays
  • .images.standard_resolution.url now
@plepe
plepe / gist:52ecc9f18efb32c68d18
Last active June 6, 2024 22:23
MDADM and LVM cheat sheet

mdadm

Glossary:

  • md: multiple devices
command description
cat /proc/mdstat show status of all raids
mdadm --detail /dev/md0 detailed status of raid md0