Skip to content

Instantly share code, notes, and snippets.

View nweddle's full-sized avatar
:octocat:

Nathan Weddle nweddle

:octocat:
View GitHub Profile
@binamov
binamov / az-chef.md
Last active March 23, 2018 00:11
setting up azure service principal for chef

Create Azure RM Service Principal

This makes kitchen-azurerm and knife-azure ARM mode work

  1. Install Azure CLI

  2. Run az login and take note of its output:

[

@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active June 7, 2025 09:54 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Exporting your 2FA tokens from Authy to transfer them into another 2FA application

IMPORTANT - Update regarding deprecation of Authy desktop apps

Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.

And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export your tokens.

If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.

@angelamancini
angelamancini / quiver-to-evernote.rb
Created May 20, 2017 16:14
Converts Quiver notebook exports to Evernote *.enex files. Only tested with text and code cells. This *was not tested* with any other cell types.
# Before running this script, go to Quiver and export all notebooks into json/quiver format
# Place them in a folder called `exports` in the same directory as this script.
# In terminal, run `ruby quiver-to-evernote.rb`
# Check for presence of required gems.
# If not present, install the gems
["rubygems", "sanitize"].each do |gem|
begin
gem "#{gem}"
rescue Gem::LoadError
`gem install #{gem}`
@kitschysynq
kitschysynq / gist:867caebec581cee4c44c764b4dd2bde7
Created April 10, 2017 13:45
List running qemu instances with nicely formatted output
ps -ef | awk -e '/qemu/ && !/awk/' | sed -e 's/[^/]*//' -e 's/ -/\n\t-/g'
@xpepper
xpepper / sonar-history.md
Last active October 24, 2024 15:37 — forked from aslakknutsen/blog.md
Import your project's history in Sonar

When you do your first Sonar run on your project, you get a lot of new quality numbers to play with, but no trends. You only have one data set for comparison, the now picture.

Wouldn't it be nice if you could see the current trend of the project without waiting a couple of month for the 'daily/weekly' Sonar runs to fill up the data? Well, you're in luck! And if you're using git as a version system as well, this is your day. :)

In the Sonar Advanced Parameter documentation you will find a System Property called sonar.projectDate. The property let you tell Sonar when in time the running analysis was ran.

By combining this property and what your version system does best, track changes to source, we can now play back the history of the project as far as Sonar is concerned.

This little Bash script illustrates the concept. To spell out what it does in human readable form:

@smford22
smford22 / base_linux.rb
Last active September 27, 2017 17:15
Base Linux Role
name 'base_linux'
description 'A base role to be applied to all linux nodes'
run_list 'recipe[chef-client::default]','recipe[chef-client::delete_validation]','recipe[audit::default]'
default_attributes({
'audit' => {
'reporter' => 'chef-server-automate',
'fetcher' => 'chef-server',
'profiles' => [
{
'name' => 'linux-patch-baseline',
@JCotton1123
JCotton1123 / gist:5ee42a34d19cc7c50bb23eef5a06142c
Created March 4, 2017 05:07
Audit Chef client versions via knife
knife search node '*' -a chef_packages.chef.version | grep "chef_packages.chef.version" | cut -d" " -f4 | sort | uniq
@smford22
smford22 / base_windows.rb
Last active September 27, 2017 21:37
Base Windows Role
name 'base_windows'
description 'A base role for all windows nodes'
run_list 'recipe[chef-client::default]','recipe[chef-client::delete_validation','recipe[audit::default]'
default_attributes({
'audit' => {
'reporter' => 'chef-server-automate',
'fetcher' => 'chef-server',
'profiles' => [
{
'name' => 'windows-patch-baseline',
@jphenow
jphenow / scrape
Created January 26, 2017 22:28
Scrape Slack html for a team's emojis, download them and rename them so you can use elsewhere
#!/usr/bin/env ruby
# Go to emoji customization page on your Slack org
# download the html for that page
# Also need "nokogiri" installed
#
# Usage: scrape <htmlfile>
require 'nokogiri'
require 'open-uri'
file = ARGV[0]