This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS> knife opc org user remove csm user01 | |
ERROR: You authenticated successfully to https://chefserver01:443 as user01 but you are not authorized for this action | |
Response: Please remove user01 from this organization's admins group before removing him or her from the organization. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# This is the configuration file for the Razor server. For each | |
# environment, the file contains a hash of configuration values. The | |
# special environment 'all' is used to set configuration values for all | |
# environments | |
# | |
# The *database_url* setting must be a connection URL for | |
# (Sequel)[http://sequel.rubyforge.org/rdoc/files/doc/opening_databases_rdoc.html] | |
production: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo -u zabbix -- cat /proc/diskstats | /bin/grep dm-`dmsetup ls | grep \`cat /etc/fstab | grep /u01/app/oracle/admin/mybi_domain/mserver/applications | awk '{print $1}' | awk -F/ '{print $NF}'\` | awk '{print $3}' | sed s'/.$//'` | awk '{print $13}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[vagrant@centos6 vagrant]$ chef exec knife cookbook upload confluence_install | |
ERROR: Could not find cookbook confluence_install in your cookbook path, skipping it | |
ERROR: Failed to upload 1 cookbook. | |
[vagrant@centos6 vagrant]$ chef exec knife cookbook upload confluence_install -o ./cookbooks/ | |
ERROR: Could not find cookbook confluence_install in your cookbook path, skipping it | |
ERROR: Failed to upload 1 cookbook. | |
[vagrant@centos6 vagrant]$ chef exec knife cookbook upload confluence_install -o /vagrant/cookbooks/ | |
ERROR: Could not find cookbook confluence_install in your cookbook path, skipping it | |
ERROR: Failed to upload 1 cookbook. | |
[vagrant@centos6 vagrant]$ chef exec knife cookbook upload confluence_install -o /vagrant/cookbooks/ --verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Zabbix MariaDB for 2.4 | |
Requires=docker.service | |
After=docker.service | |
[Service] | |
TimeoutStartSec=0 | |
Restart=always | |
ExecStart=/usr/bin/docker run -d --name zabbix-db -v /backups:/backups --volumes-from zabbix-db-storage --env="MARIADB_USER=zabbix" --env="MARIADB_PASS=my_password" zabbix/zabbix-db-mariadbserver-2.4 | |
ExecStop=/usr/bin/docker stop -t 2 zabbix-db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CMD="get -b java.lang:type=Memory HeapMemoryUsage" | |
echo $CMD | java -jar jmxterm-1.0-alpha-4-uber.jar -l localhost:1099 -n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# | |
# | |
@threads = [] | |
6.times do |i| | |
@threads[i] = Thread.new do | |
sum = 1 + rand(100) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cat /etc/my.cnf.d/server.cnf | |
# | |
# These groups are read by MariaDB server. | |
# Use it for options that only the server (but not clients) should see | |
# | |
# See the examples of server my.cnf files in /usr/share/mysql/ | |
# | |
# this is read by the standalone daemon and embedded servers | |
[server] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# | |
# | |
require 'yaml' | |
require 'fileutils' | |
def create_config_file | |
default_options = { | |
"ruby_dir" => "#{ENV['HOME']}/rubies", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$limit = (Get-Date).AddDays(-2) | |
$path = "E:\SSP\AttachContent" | |
# Delete files older than the $limit. | |
Get-ChildItem -Path $path -Recurse -Force | Where-Object { !$_.PSIsContainer -and $_.CreationTime -lt $limit } | Remove-Item -Force | |
# Delete any empty directories left behind after deleting the old files. | |
Get-ChildItem -Path $path -Recurse -Force | Where-Object { $_.PSIsContainer -and (Get-ChildItem -Path $_.FullName -Recurse -Force | Where-Object { !$_.PSIsContainer }) -eq $null } | Remove-Item -Force -Recurse |