Skip to content

Instantly share code, notes, and snippets.

View walterheck's full-sized avatar

Walter Heck walterheck

View GitHub Profile
[root@statler ~]# sysbench --test=fileio --file-test-mode=rndrw --max-requests=1000000 run
sysbench 0.5: multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 1
Random number generator seed is 0 and will be ignored
Extra file open flags: 0
128 files, 16Mb each
[root@donor ~]# iostat -mx 1
Linux 3.10.0-229.el7.x86_64 (donor.example.com) 08/25/2015 _x86_64_ (12 CPU)
avg-cpu: %user %nice %system %iowait %steal %idle
0.25 0.00 0.33 0.13 0.00 99.30
Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
sda 0.01 0.06 12.62 18.93 3.09 3.01 395.99 0.08 2.43 3.69 1.60 0.72 2.26
dm-0 0.00 0.00 12.61 18.98 3.09 3.01 395.39 0.08 2.43 3.69 1.60 0.72 2.26
sdb 0.00 0.00 0.01 0.00 0.00 0.00 8.00 0.00 0.67 0.67 0.00 0.66 0.00
root@opstheatre:~/ops-theatre# node --harmony --es-staging app.js
connect deprecated multipart: use parser (multiparty, busboy, formidable) npm module instead node_modules/express/node_modules/connect/lib/middleware/bodyParser.js:56:20
connect deprecated limit: Restrict request size at location of read node_modules/express/node_modules/connect/lib/middleware/multipart.js:86:15
connect deprecated methodOverride: use method-override npm module instead app.js:27:17
Loading module: core
Loading module: facter
Loading module: hiera
Loading module: manifests
Loading module: modules
Loading module: puppetdb
[root@gitlab gitlab]# cat /var/opt/gitlab/nginx/conf/gitlab-http.conf
# This file is managed by gitlab-ctl. Manual changes will be
# erased! To change the contents below, edit /etc/gitlab/gitlab.rb
# and run `sudo gitlab-ctl reconfigure`.
## GitLab
## Modified from https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/support/nginx/gitlab-ssl & https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/support/nginx/gitlab
##
## Lines starting with two hashes (##) are comments with information.
## Lines starting with one hash (#) are configuration parameters that can be uncommented.
<<<<<<< 327d88f5e6ba7c20ea0103f1f02d2bfb54a9b52f
public function updatedeviceinfoAction() {
if ($user = $this->checkAuth()) {
extract($this->getRequest()->getPost());
$device_token = $this->_getParam('device_token');
$device_type = $this->_getParam('device_type');
if (empty($device_token)) {
$this->JSONErrorOutput('device token required');

If you're doing a lot of command line work with icinga configurations and you happen to use vim a lot, it is super useful to use the vim syntax highlighting that comes with icinga2. Here's how to set it up on a CentOS/RHEL 7 box.

  • First, make sure you have the icinga2-common package installed. This is a dependency of the icinga2 package, so it should be as easy as pie:
[root@icinga2 ~]# yum install icinga2
Loaded plugins: fastestmirror
icinga-stable-release             |  951 B  00:00:00
icinga-stable-release/7/primary   |  21 kB  00:00:00
Loading mirror speeds from cached hostfile
 * base: mirror.nl.leaseweb.net
foss-puppet-master:
provider:
type: virtualbox
customize:
- [modifyvm, !ruby/sym id, '--memory', 6144]
provisioners:
- type: hosts
add_localhost_hostnames: false
sync_hosts: true
- type: shell
walterheck@walter-envy:~/source/opstheater/deploy/vagrant-oscar$ vagrant provision foss-master
Vagrant failed to initialize at a very early stage:
There was an error loading a Vagrantfile. The file being loaded
and the error message are shown below. This is usually caused by
a syntax error.
Path: /home/walterheck/Dropbox/Source/opstheater/deploy/vagrant-oscar/Vagrantfile
Line number: 4
Message: LoadError: cannot load such file -- git
[root@icinga2 icinga2]# cat /etc/icingaweb2/resources.ini
[icingaweb_db]
type = db
db = "mysql"
host = "10.20.1.60"
port = "3306"
dbname = "icinga2_web"
username = "icinga2_web"
password = "password"
[root@yomama ~]# foreman-installer --enable-foreman-plugin-openscap
Could not start Service[postgresqld]: Execution of '/sbin/service postgresql start' returned 1: postgresql: unrecognized service
/Stage[main]/Postgresql::Server::Service/Service[postgresqld]/ensure: change from stopped to running failed: Could not start Service[postgresqld]: Execution of '/sbin/service postgresql start' returned 1: postgresql: unrecognized service
Installing Done [100%] [..........................................................................................................................................................]
Something went wrong! Check the log for ERROR-level output
* Foreman is running at https://yomama.someco.local
Initial credentials are admin / notgonnatellyou
* Foreman Proxy is running at https://yomama.someco.local:8443
* Puppetmaster is running at port 8140
The full log is at /var/log/foreman-installer/foreman.log