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
#! /bin/bash | |
i=1 | |
for f in IMG_* | |
do | |
if [ $i -ge 10 ]; then | |
mv $f 010_00$i.jpg | |
else | |
mv $f 010_000$i.jpg | |
fi |
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 'net-snmp2' | |
Net::SNMP.init | |
Net::SNMP::Debug.logger = Logger.new(STDOUT) | |
session = Net::SNMP::TrapSession.open( | |
peername: 'localhost:199', | |
version: '2c', |
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
control 'check-dot-net-3.5-installed' do | |
impact 1.0 | |
title 'check dot net 3.5 installed' | |
desc 'Check dot net 3.5 is installed' | |
describe windows_feature('.NET Framework 3.5 Features') do | |
it { should be_installed } | |
end | |
end | |
control 'check-sql-server-installed' do |
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
require 'chefspec' | |
RSpec.configure do |config| | |
config.platform = 'windows' | |
config.version = '2012R2' | |
end | |
describe 'sqlserver::default' do | |
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) } | |
before do |
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
# | |
# Cookbook Name:: sqlserver | |
# Recipe:: default | |
# | |
# Copyright 2016, YOUR_COMPANY_NAME | |
# | |
# All rights reserved - Do Not Redistribute | |
# | |
powershell_script 'delete-install-directory' do | |
code <<-EOC |
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
FROM oraclelinux:6 | |
MAINTAINER tsubasa1173@gmail.com | |
### setup | |
RUN groupadd -g 200 oinstall | |
RUN groupadd -g 201 dba | |
RUN groupadd -g 202 oper | |
RUN useradd -m -g oinstall -G oinstall -u 440 oracle | |
RUN echo oracle:oracle | /usr/sbin/chpasswd | |
RUN gpasswd -a oracle dba | |
RUN gpasswd -a oracle oper |
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
=IFERROR(VLOOKUP(LOOKUP(0,0/FIND(Sheet1!$A$2:$A$8,B2),Sheet1!$A$2:$A$8),Sheet1!$A$2:$B$100,2,0),"N/A") |
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 "zabbixapi" | |
require "yaml" | |
require "time" | |
config = YAML.load(File.read(".zabbix/config.yml")) | |
zabbix_url = config['URL'] | |
zabbix_user = config['USER'] | |
zabbix_passwd = config['PASSWORD'] |
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 | |
#./user_macro_reg.rb host01 '{$INSTANCEID}' "i-a1b2c3d4" | |
require "zabbixapi" | |
unless ARGV.size == 3 | |
puts "Usage: #{$0} [AGENT_HOST_NAME] [USERMACRO_NAME] [USERMACRO_VALUE]" | |
exit 1 | |
end |
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 'net/http' | |
require 'openssl' | |
require 'base64' | |
require 'cgi' | |
require 'yaml' | |
require 'json' | |
require 'time' | |
begin |