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) { |
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
| // 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
| 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
| 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
| 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
| function IsAdministrator { | |
| [Security.Principal.WindowsPrincipal]$id = [Security.Principal.WindowsIdentity]::GetCurrent() | |
| $id.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) | |
| } |
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
| (date "2012/10/04 22:00").Subtract((date "1970/01/01 09:00")).TotalSeconds | |
| ((date "2012/10/04 22:00") - (date "1970/01/01 09:00")).TotalSeconds | |
| date (date "2012/10/04 22:00").ToUniversalTime() -u "%s" | |
| date (date "2012/10/04 22:00").AddHours(-9) -u "%s" | |
| (date "2012/10/04 22:00" -u "%s") - 9*60*60 |
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
| import sbt._ | |
| import Keys._ | |
| object TestBuild extends Build { | |
| lazy val root: Project = Project("root", file("."), aggregate = nonRoots) | |
| lazy val nonRoots = projects.filter(_ != root).map(p => LocalProject(p.id)) | |
| lazy val main = consoleProject("main", file("main")) dependsOn(sub1, sub2, sub3) | |
| lazy val sub1 = webProject("sub1", file("sub1")) |
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
| name := "My Project" | |
| version := "0.1-SNAPSHOT" | |
| organization := "home" | |
| unmanagedBase <<= baseDirectory / "lib" | |
| sourceDirectory in Test <<= baseDirectory / "test" |
NewerOlder