now that Yahoo is shutting down

Thought I’d check just how old my account is #!/usr/bin/env python3 from yahoo_oauth import OAuth1 oauth = OAuth1(None, None, from_file=’yahoo_credentials.json’) from myql import MYQL yql = MYQL(format=’xml’, oauth=oauth) response = yql.raw_query(‘select * from social.profile where guid=me’) import xml.etree.ElementTree as ET r = ET.fromstring(response.content) for a in r.iter(‘memberSince’): print(a.tag, a.text) memberSince 1998-08-24T17:51:40Z Yahoo launched in 1998, […]

my .bash_profile

shopt -s checkwinsize shopt -s histappend HISTFILESIZE=1000000 HISTSIZE=1000000 HISTCONTROL=ignoreboth HISTTIMEFORMAT=’%F %T ‘ shopt -s cmdhist PROMPT_COMMAND=’history -a’ alias mc=’caffeinate -i mc -d’ export CLICOLOR=1 export EDITOR=’/usr/local/bin/joe’ complete -C aws_completer aws eval “$(~/repos/rakudobrew/bin/rakudobrew init -)” eval “$(rbenv init -)”

before upgrade

perl -MExtUtils::Installed -e “use v5.10; $i=ExtUtils::Installed->new(); @m=$i->modules(); foreach $mm (@m) {say $mm .’ – ‘. $i->version($mm);}”

reconf service using only cmd

Fixing Zabbix on a bunch of Windows machines with local accounts for /F “tokens=1-3 delims=,” %%A in (zz.list) do ( echo %%A %%B %%C net use “\\%%A.mydomain.com\C$” %%C /user:%%A\%%B xcopy /q /y zabbix_agentd.win.conf “\\%%A.mydomain.com\C$\Program Files (x86)\Zabbix Agent\zabbix_agentd.conf” net use “\\%%A.mydomain.com\C$” /delete net use “\\%%A.mydomain.com\IPC$” %%C /user:%%A\%%B sc \\%%A.mydomain.com stop “Zabbix Agent” sc \\%%A.mydomain.com start “Zabbix […]

throttle local e-mails (prevent alert floods)

/etc/postfix/master.cf: thrttl unix – – n – – smtp -o syslog_name=smtp-throttled /etc/postfix/main.cf: thrttl_destination_rate_delay = 10s thrttl_destination_concurrency_limit = 1 thrttl_destination_recipient_limit = 2 thrttl_initial_destination_concurrency=1 transport_maps = regexp:/etc/postfix/transport /etc/postfix/transport: /\@mydomain\.com$/ thrttl:

SaltStack for Windows updates

Set up WSUS to automatically approve security patches (because it’s the right thing to do), [void][reflection.assembly]::LoadWithPartialName(“Microsoft.UpdateServices.Administration”) $wsus = Get-WSUSServer $class = $wsus.GetUpdateClassifications() | ? {$_.Title -In (‘Critical Updates’,’Security Updates’)} $rule = $wsus.GetInstallApprovalRules() | Where {$_.Name -eq “Default Automatic Approval Rule”} $class_coll = New-Object Microsoft.UpdateServices.Administration.UpdateClassificationCollection $class_coll.AddRange($class); $rule.SetUpdateClassifications($class_coll); $rule.Enabled = $True; $rule.Save() $config = $wsus.GetConfiguration(); $config.TargetingMode = […]

Bad Behavior has blocked 204 access attempts in the last 7 days.