This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'facter' | |
require 'augeas' | |
Facter.add('fstab_missing_noatime') do | |
list = [] | |
Augeas::open do |aug| | |
aug.match("/files/etc/fstab/*[label()=~regexp('[0-9]+') and vfstype='ext3' and count(opt[.='noatime']) = 0]").each do |match| | |
list.push(match) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'optparse' | |
options = { :realm => :local } | |
OptionParser.new do |opts| | |
opts.on('-g', '--global', 'Set aliases globally') do | |
options[:realm] = :global | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Tested in RedHat but should work in other distros. | |
#set -x | |
rm -f /etc/ssh/ssh_host_key | |
rm -f /etc/ssh/ssh_host_key.pub | |
rm -f /etc/ssh/ssh_host_rsa_key | |
rm -f /etc/ssh/ssh_host_rsa_key.pub | |
rm -f /etc/ssh/ssh_host_dsa_key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style> | |
ul { | |
margin: 0px; | |
list-style-type: none; | |
} | |
li { | |
margin: 0px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lib/tasks/db.rake | |
namespace :db do | |
desc "Dumps the database to db/APP_NAME.dump" | |
task :dump => :environment do | |
cmd = nil | |
with_config do |app, host, db, user| | |
cmd = "pg_dump --host #{host} --username #{user} --verbose --clean --no-owner --no-acl --format=c #{db} > #{Rails.root}/db/#{app}.dump" | |
end | |
puts cmd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This will remap your capslock key to control in Windows. | |
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] | |
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'colorize' | |
require 'fileutils' | |
require 'highline/import' | |
require 'optparse' | |
exts = ['.avi', '.m4v', '.mkv', '.mp4', '.srt', '.sub'] | |
# Loop through each ARGV |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: localhost | |
gather_facts: true | |
gather_subset: distribution | |
become: true | |
vars: | |
ca_path: | |
Alpine: /usr/local/share/ca-certificates | |
Ubuntu: /usr/local/share/ca-certificates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name GotoGovCloud | |
// @version 1 | |
// @grant none | |
// @include https://prod.adfs.federation.va.gov/adfs/ls/idpinitiatedsignon.aspx | |
// @require https://code.jquery.com/jquery-latest.min.js | |
// ==/UserScript== | |
(function() { | |
$('#idp_OtherRpRadioButton')[0].checked = true; |