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
function Get-RestartLog { | |
Get-EventLog System | | |
?{$_.Source -match '(USER32|EventLog)' -and 1074,1076,6005,6006,6008 -contains $_.EventId} | %{ | |
$record = new-object PSObject -property @{ | |
Time = $_.TimeGenerated | |
EventId = $_.EventId | |
} | |
if ($Matches[1] -eq 'USER32') { | |
$_.Message -split "`r`n" | ?{$_.Length -gt 0} | %{ | |
$line = $_ -split ":(?!\\)",2 |
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
cd ~/apps/coherence/lib | |
mvn install:install-file ` | |
-D groupId=com.oracle.coherence ` | |
-D artifactId=coherence ` | |
-D version=3.7.1.7 ` | |
-D file=coherence.jar ` | |
-D packaging=jar ` | |
-D generatePom=true |
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
cd ~/work | |
mvn archetype:generate ` | |
-D archetypeArtifactId=maven-archetype-quickstart ` | |
-D groupId=com.github.tkmtmkt ` | |
-D artifactId=study-coherence-java ` | |
-D version=1.0-SNAPSHOT |
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
// raw | |
System.getProperties.list(System.out) | |
// sorted | |
import scala.collection.JavaConverters._ | |
System.getProperties.asScala.toSeq.sortBy(_._1).foreach{x => println(x._1 + " = " + x._2)} |
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
#!/bin/bash | |
# | |
# target server | |
# /root/.ssh/authorized_keys | |
# | |
# backup server | |
# ssh-keygen -f .ssh/backup -C backup | |
# ssh-copy-id -i .ssh/backup.pub $TARGET | |
# | |
# /root/.ssh/config |
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
<# | |
.SYNOPSIS | |
パッケージ情報ファイルを作成します。 | |
#> | |
ls -dir -r | select -skip 3 | %{ | |
$dir = $_.fullname | |
$packageInfoFile = "$dir\package-info.java" | |
$packageName = (resolve-path $dir -rel).substring(2).replace('\','.') | |
if (test-path $packageInfoFile) { |
OlderNewer