View download-va-certs.yaml
--- | |
- 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 |
View movey.rb
#!/usr/bin/ruby | |
require 'colorize' | |
require 'fileutils' | |
require 'highline/import' | |
require 'optparse' | |
exts = ['.avi', '.m4v', '.mkv', '.mp4', '.srt', '.sub'] | |
# Loop through each ARGV |
View caps_lock_to_control.reg
# 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 |
View db.rake
# 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 |
View body.html.erb
<html> | |
<head> | |
<style> | |
ul { | |
margin: 0px; | |
list-style-type: none; | |
} | |
li { | |
margin: 0px; | |
} |
View gensshkey.sh
#!/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 |
View setup_git.rb
#!/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 |
View disks.rb
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 |