- find ~/Library/ -type d -name 'Chrome' -exec rm -rfv {} \;
Saturday, 30 November 2013
Completely wipe Chrome data on Mac
Labels:
annihilate,
browser how,
chrome,
clear,
completely,
cookies,
data,
delete,
destroy,
do,
history,
wipe
Wednesday, 27 November 2013
Chromecast tricks
- is casting a tab
- don't do full screen
- instead, shrink browser window to size of original video
- what is put on the screen is relative to the window size
- seems to save on bandwidth
- passed through your wireless router
- less broken stream therefore
Friday, 8 November 2013
Building latest collectd on Amazon Linux server in AWS
- yum install byacc flex automake libtool libgcrypt-devel glib2-devel libtool-ltdl-devel perl-ExtUtils-MakeMaker
- comments below imply this may be necessary: apt-get install bison
- git clone https://github.com/collectd/collectd.git
- cd collectd
- ./build.sh
- ./configure
- make
- yum install lvm2-devel net-snmp-devel liboping-devel libpcap-devel libesmtp-devel libcurl-devel libmnl-devel
Openbox: monitor laptop battery via CLI and notify-send
while (true);do acpi -b | perl -n -e 's/.*?(\d+)%.*/$1/;chomp;print "$_...";if ($_ <= 15) {`notify-send batalert:$_`};';sleep 180;done
Would like a beep, but can't get one, no PC speaker on MacBook Air and mplayer buffers.
Wednesday, 6 November 2013
Change X / Openbox screen brightness on CLI
- sudo apt-get -y install xbacklight
- xbacklight +10
- xbacklight +10
- xbacklight +10
- xbacklight -10
- xbacklight -10
- xbacklight -10
Tuesday, 5 November 2013
Recover wireless of Ubuntu on MacBook Air 4,2
- sudo apt-get --reinstall install bcmwl-kernel-source
- sudo modprobe -r b43 ssb wl brcmfmac brcmsmac bcma
- sudo modprobe wl
wicd: Could not connect to wicd's D-bus interface
I don't know why, she swallowed the fly.
After
Do
After
- Wicd needs to access your computer's network cards
- Could not connect to wicd's D-Bus interface
Do
- sudo mv -v /etc/resolv.conf /etc/resolv.conf.backup
- sudo ln -s /run/resolvconf/resolv.conf /etc/resolv.conf
- sudo rm -v /var/lib/wicd/resolv.conf.orig
- sudo service wicd start
- yum -y install wicd-gtk
- wicd-gtk
Saturday, 2 November 2013
Zenoss on Amazon Linux
Someone saved my life tonight, Sugarbear: http://binarynature.blogspot.com/2012/11/zenoss-core-4-installation.html
Also taken: http://magazine.redhat.com/2007/12/04/hacking-rpms-with-rpmrebuild/
WARNING: USE AT OWN RISK
Also taken: http://magazine.redhat.com/2007/12/04/hacking-rpms-with-rpmrebuild/
WARNING: USE AT OWN RISK
- remove non-critical, unmet dependencies in rpm
- get good version of rpmrebuild
- wget ftp://fr2.rpmfind.net/linux/opensuse/ports/update/12.3/noarch/rpmrebuild-2.9-7.4.1.noarch.rpm
- yum localinstall rpmrebuild-2.9-7.4.1.noarch.rpm
- wget http://downloads.sourceforge.net/project/zenoss/zenoss-4.2/zenoss-4.2.4/4.2.4-1897/zenoss_core-4.2.4-1897.el6.x86_64.rpm
- rpmrebuild -e -n -p zenoss_core-4.2.4-1897.el6.x86_64.rpm
- remove lines
- Requires: libgcj
- %dir %attr(0755, root, root) "/etc/sudoers.d"
- # ensure that the system uses the /etc/sudoers.d directory
- SUDOERSD_TOKEN="#includedir /etc/sudoers.d"
- SUDOERSD_FOUND=`/bin/egrep "^$SUDOERSD_TOKEN" /etc/sudoers`
- if [ -z "$SUDOERSD_FOUND" ]; then
- echo "# zenoss rpm, ensure that /etc/sudoers.d loads" >> /etc/sudoers
- echo $SUDOERSD_TOKEN >> /etc/sudoers
- fi
- save file and "continue"
- note place resultant file is created, copy to local working directory
- if you can't find it where it is supposed to be
- yum -y install mlocate
- updatedb
- locate zenoss
- ntp
- ntpq -pn
- make sure ntp is installed and running
- java
- remove openjdk and install oracle java
- yum -y remove java jdk
- wget -N -O jre-6u31-linux-x64-rpm.bin http://javadl.sun.com/webapps/download/AutoDL?BundleId=59622
- chmod +x jre-6u31-linux-x64-rpm.bin
- ./jre-6u31-linux-x64-rpm.bin
- verify
- java -version
- echo $JAVA_HOME
- cover missing libgcj, not strictly necessary
- yum -y install ecj
- only for running java classes natively instead of using JVM
- about as obscure as it gets
- Add extra repos
- rpm --import http://dev.zenoss.org/yum/RPM-GPG-KEY-zenoss
- yum-config-manager --enable epel
- yum --nogpgcheck -y localinstall http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
- install some deps
- yum -y install memcached net-snmp
- start some dep services
- service memcached start
- service snmpd start
- chkconfig memcached on
- chkconfig snmpd on
- mysql
- yum -y install mysql-server
- service mysqld start
- chkconfig mysqld on
- install amazon linux compatible zenoss rpm you created above
- yum --nogpgcheck localinstall zenoss-4.2.4-1897.el6.x86_64.rpm
- echo > /opt/zenoss/var/zenpack_actions.txt
- you REALLY don't want these right now, install by-hand later
- start more dep services
- service rabbitmq-server start
- chkconfig rabbitmq-server on
- start and stop zenoss core, dbs and files are created
- service zenoss start;sleep 5;service zenoss stop
- post zenoss updates as zenoss user, then back to root user
- su -l zenoss
- wget --no-check-certificate https://raw.github.com/osu-sig/zenoss-autodeploy-4.2.3/master/secure_zenoss.sh
- sh secure_zenoss.sh
- egrep 'user|password' $ZENHOME/etc/global.conf | grep -v admin
- zodbpw=$(grep zodb-password $ZENHOME/etc/global.conf | awk '{print $2}')
- sed -i.orig "5s/zenoss/$zodbpw/" $ZENHOME/etc/zodb_db_{main,session}.conf
- tail -n +1 $ZENHOME/etc/zodb_db_{main,session}.conf
- exit
- set mysql password for zenoss user using password generated above
- mysql -u root -p
- SET PASSWORD FOR 'zenoss'@'localhost' = PASSWORD('18zmcTgYsA+AjczljwQd');
- sub your password in instead
- create zenoss user for rabbitmq
- vim set-rabbitmq-perms.sh
- grab code below and put in here
- sh set-rabbitmq-perms.sh
- service rabbitmq-server restart
- start zenoss final time
- service zenoss restart
- chkconfig zenoss on
- verify
- su -l zenoss -c 'zenoss status'
- rabbitmqctl -p /zenoss list_queues
- Add this line to the end of /etc/sudo.conf
- #includedir /etc/sudoers.d
- was removed during rpm tweak
NOTE: this is probably not perfect, but very close, please, send corrections
###################################################
## code for set-rabbitmq-perms.sh
#!/usr/bin/env bash
set -e
ZENHOME="/opt/zenoss"
ZENHOME="/opt/zenoss"
VHOSTS="/zenoss"
USER="zenoss"
PASS="grep amqppassword \$ZENHOME/etc/global.conf | awk '{print \$2}'"
if [ $(id -u) -eq 0 ]
then
RABBITMQCTL=$(which rabbitmqctl)
$RABBITMQCTL stop_app
$RABBITMQCTL reset
$RABBITMQCTL start_app
$RABBITMQCTL add_user "$USER" "$(su -l zenoss -c "$PASS")"
for vhost in $VHOSTS; do
$RABBITMQCTL add_vhost "$vhost"
$RABBITMQCTL set_permissions -p "$vhost" "$USER" '.*' '.*' '.*'
done
exit 0
else
echo "Error: Run this script as the root user." >&2
exit 1
Listen to internet radio without Flash on Mac and Linux CLI
- OS type
- Mac
- brew install mplayer
- See this if you hit the bug: https://github.com/mxcl/homebrew/issues/23503
- Linux (Debian-based)
- apt-get install mplayer
- play on CLI
- mplayer <stream>
- e.g. mplayer http://www.antenne.de/webradio/channels/das-schlager-karussell.m3u
Or/else:
- paste stream link into a browser directly
- use VLC to play stream
Read ext4 on Mac
- install xcode
- install brew
- brew install ext4fuse
- follow any instructions on changing permissions
- ext4fuse <device> <mountpoint>
Subscribe to:
Posts (Atom)
Interview questions: 2020-12
Terraform provider vs provisioner Load balancing Network Load Balancer vs Application Load Balancer Networking Layer 1 vs Layer 4 haproxy u...
-
kubectl --cert=/tmp/tls.crt --key=/tmp/tls.key create secret tls tls-wc-ingress
-
apt-get install exim4 dpkg-reconfigure exim4-config Select: internet site; mail is sent and received directly using SMTP IP-addresses...
-
brew install python3 mkdir -p ~/bin/python3 python3 -m venv ~/bin/python3 source ~/bin/python3/bin/activate enjoy!