This file contains hidden or 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
<cacti> | |
<hash_0000248223b362bd688a74951a1ee6323e69d1> | |
<name>Windows - DedupSavedSpace(WMI)</name> | |
<graph> | |
<t_title>on</t_title> | |
<title>|host_description| - DedupSavedSpace</title> | |
<t_image_format_id></t_image_format_id> | |
<image_format_id>1</image_format_id> | |
<t_height></t_height> | |
<height>120</height> |
This file contains hidden or 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 | |
# -*- coding: utf-8 -*- | |
# Usage: | |
# script.py <robocopy.log> [robocopy.log]... | |
import re | |
from sys import argv | |
# key = division name |
This file contains hidden or 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 logging | |
import urllib2 | |
import hmac | |
import hashlib | |
import base64 | |
import time | |
import datetime | |
import sys |
This file contains hidden or 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
Configuration ServerSetup | |
{ | |
param | |
( | |
[string[]] | |
$Node | |
) | |
Node $Node | |
{ |
This file contains hidden or 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
# http://gallery.technet.microsoft.com/scriptcenter/101ebd1a-effe-4a89-9c38-7673fa4d1687 | |
$domain = [directoryServices.ActiveDirectory.Domain]::GetComputerDomain() | |
$domain.FindAllDomainControllers() |
This file contains hidden or 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
$json = @" | |
{ | |
"matcher": | |
[ | |
{ | |
"regexp" : "^re$", | |
"dest" : "dest1" | |
}, | |
{ | |
"regexp" : "^h\\w+eほげ.{3}我$", |
This file contains hidden or 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
host = "192.168.0.1" | |
user = "user" | |
password = "password" | |
batch_path = "C:\Users\user\echo.bat" | |
Const WbemAuthenticationLevelPktPrivacy = 6 | |
Set objWbemLocator = CreateObject("WbemScripting.SWbemLocator") | |
Set objWMIService = objWbemLocator.ConnectServer(host, "root\cimv2", user, password, "", "") | |
objWMIService.Security_.authenticationLevel = WbemAuthenticationLevelPktPrivacy | |
Set objWin32_Process = objWMIService.Get("Win32_Process") |
This file contains hidden or 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
# Get local wsus object. | |
[reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration") | out-null | |
$WsusServerAdminProxy = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer(); | |
# Decline itanium updates. | |
$ItaniumUpdates = $WsusServerAdminProxy.GetUpdates() | ?{-not $_.IsDeclined -and $_.Title -match "IA64|Itanium" -and $_.Title -notmatch "x86|x64"} | |
If ($ItaniumUpdates) { | |
$ItaniumUpdates | %{$_.Decline()} | |
} |
This file contains hidden or 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
" NeoBundle | |
set nocompatible | |
filetype plugin indent off | |
if has('vim_starting') | |
let g:neobundle#types#git#default_protocol = has('gui_win32') ? 'https' : 'git' | |
set runtimepath+=~/vimfiles/bundle/neobundle.vim/ | |
endif | |
call neobundle#rc(expand('~/vimfiles/bundle/')) | |
let g:neobundle#default_options._ = { 'verbose' : 1, 'focus' : 1 } |
This file contains hidden or 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
@implementation NSArray(ValueAtIndex) | |
- (NSArray *)valueAtIndex:(NSUInteger)index | |
{ | |
NSMutableArray *array = [NSMutableArray array]; | |
for (NSArray *a in self) | |
if (a.count >= index + 1) | |
[array addObject:a[index]]; | |
return [NSArray arrayWithArray:array]; | |
} | |
@end |