1 iptables -nvxL
3 systemctl stop firewalld
4 systemctl disable firewalld
8 yum install iptables-services.x86_64
9 systemctl enable iptables.service
11 systemctl start iptables.service
13 yum install -y http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-redhat93-9.3-1.noarch.rpm
I was configuring a Centos6 box to receive syslog from remote hosts. I wanted that log to be written to a non-standard path: /data/syslog
On my first attempt, this failed with the following log in /var/log/messages
:
Nov 26 11:26:24 localhost rsyslogd-3000: Could not open dynamic file '/data/syslog/10.10.1.252/2014-11/26/syslog.log' [state -3000] - discarding message [try http://www.rsyslog.com/e/3000 ]
I then set the context of /data/syslog
to match /var/log
with:
FROM centos:centos7 | |
RUN yum update -y | |
RUN yum install -y http://yum.postgresql.org/9.3/redhat/rhel-7-x86_64/pgdg-centos93-9.3-1.noarch.rpm http://fedora.mirror.serversaustralia.com.au/epel/7/x86_64/e/epel-release-7-2.noarch.rpm | |
RUN yum install -y postgresql93-server postgis2_93 sudo | |
RUN /usr/pgsql-9.3/bin/postgresql93-setup initdb | |
# Adjust PostgreSQL configuration so that remote connections to the | |
# database are possible. | |
RUN echo "host all all 0.0.0.0/0 md5" >> /var/lib/pgsql/9.3/data/pg_hba.conf |
Gnome does not use Wayland by default when the Live CD boots up. To use Wayland, do the following:
- set a password on the user account e.g. open terminal and issue
passwd
- log out of Gnome
- below the login prompt should be a small cog icon, click that and select
Gnome on Wayland
from the dropdown menu - login
visually select A "ay
, visually select B "by
then :s/<ctrl-r>a/<ctrl-r>b/g
Note: pasting in from register produces ^M
and ^I
in place of newlines and tabs. These need to be converted to \n
and \t
respectively.
(Technique also documented here: http://vim.wikia.com/wiki/Search_and_replace)
// Forked from: https://gist.github.com/melbourne2991/8822609 | |
// | |
// Below is an example of a directive that let's other directives know when there has been a change | |
// in a breakpoint, as well as a windows resize, the event is triggered on the window resize and | |
// broadcast on $rootScope. The arguments contain the current & previous breakpoints. Previous will | |
// be null if there is yet to be a change in breakpoint. | |
// | |
app.directive('bsBreakpoint', function($window, $rootScope, $timeout) { | |
return { | |
controller: function() { |
# Look for instantiations of error using fmt.Errorf or errors.New, where first letter is upper-case. Convert that letter to lowercase. | |
# e.g. | |
# return fmt.Errorf("User... | |
# return errors.New("User... | |
# becomes | |
# return fmt.Errorf("user... | |
# return errors.New("user... | |
find -name '*.go' -exec sed 's/\(\(errors\.New\|fmt\.Errorf\)("\)\([A-Z]\)\(.*\)/\1\l\3\4/' {} \; |
Forked from: https://gist.github.com/mmoulton/6224509
This script can be used to feed collectd with cpu and memory usage statistics for running docker containers using the collectd exec
plugin.
This script will report the used and cached memory as well as the user and system cpu usage by inspecting the appropriate cgroup stat file for each running container.
Looks like this is now fixed as of Docker v1.2.0
For the benefit of the interwebs I'm documenting this here as I've spent several hours pulling my hair out.
#cloud-config | |
hostname: coreos-01 | |
coreos: | |
etcd: | |
#discovery: https://discovery.etcd.io/xxxxxxxxxxxxxxxx | |
addr: $private_ipv4:4001 | |
peer-addr: $private_ipv4:7001 | |
units: |