remote_file distzipexe do
source node['drupal']['windows']['sqlserv-driver']['source']
checksum node['drupal']['windows']['sqlserv-driver']['checksum']
notifies :run, 'windows_batch[open-sqlserv-driver]', :immediately
notifies :run, 'windows_batch[move-sqlserv-plugin]', :immediately
end
# unroll and dump in same dir
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
[alias] | |
st = status | |
ci = commit | |
br = branch | |
co = checkout | |
df = diff | |
lg = log -p | |
tree = log --graph --decorate --pretty=oneline --abbrev-commit | |
lol = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%cr)%C(reset) %C(white)%s%C(reset) %C(bold white)— %cn%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit --date=relative | |
unstage = reset HEAD -- |
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
$shell_app=new-object -com shell.application | |
$filename = "vmwaretools.zip" | |
$zip_file = $shell_app.namespace((Get-Location).Path + "\$filename") | |
$destination = $shell_app.namespace((Get-Location).Path) | |
$destination.Copyhere($zip_file.items(), 20) |
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
$shell = new-object -com shell.application | |
$zip = $shell.NameSpace(“C:\howtogeeksite.zip”) | |
foreach($item in $zip.items()) | |
{ | |
$shell.Namespace(“C:\temp\howtogeek”).copyhere($item) | |
} |
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 python | |
import subprocess | |
import datetime | |
import time | |
from os.path import expanduser | |
home = expanduser("~") | |
today=datetime.date.today() |
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
powershell "disable netbios over tcpip" do | |
code <<-EOH | |
wmic /interactive:off nicconfig where TcpipNetbiosOptions=0 call SetTcpipNetbios 2 | |
wmic /interactive:off nicconfig where TcpipNetbiosOptions=1 call SetTcpipNetbios 2 | |
EOH | |
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
# | |
# set this up for reboot should we join domain successfully | |
# | |
windows_reboot 5 do | |
reason 'Reboot after joining AD' | |
action :nothing | |
end | |
# | |
# import mixin powershellout here |
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
Ohai::Config::disabled_plugins= [ | |
# | |
# add to client.rb file -- c:\chef\client.rb | |
# | |
# ref: http://www.slideshare.net/opscode/chef-conf-windowsdougireton # slide 30 | |
# ohai plugins that have poor perf or are irrelevant to windows | |
# | |
"c", "cloud", "ec2", "rackspace", "eucalyptus", "command", "dmi", "dmi_common", | |
"erlang", "groovy", "ip_scopes", "java", "keys", "lua", "mono", "network_listeners", | |
"passwd", "perl", "php", "python", "ssh_host_key", "uptime", "virtualization", |
adding a variable into the object
Here's now we dynamically add that variable/accessor on an already created object:
def tagList(item_list)
item_list.each do |item|
item.class.module_eval { attr_accessor :source_type}
item.source_type = some_source_type_A
done
itemlist
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "centos6.4" | |
# Every Vagrant virtual environment requires a box to build off of. | |
config.vm.define "master", primary: true do |box| | |
box.vm.hostname = "salt" | |
box.vm.network "public_network" | |
box.vm.network "private_network", ip: "192.168.56.160" |
OlderNewer