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
Invoke-WebRequest -Uri https://raw.githubusercontent.com/ansible/ansible-documentation/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 -OutFile ConfigureRemotingForAnsible.ps1 | |
powershell -ExecutionPolicy RemoteSigned .\ConfigureRemotingForAnsible.ps1 | |
ipconfig |
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
[info] Starting scala interpreter... | |
[info] | |
Welcome to Scala version 2.10.3 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0-ea). | |
Type in expressions to have them evaluated. | |
Type :help for more information. | |
scala> import java.time._; import etude.calendar._; import etude.region._ | |
import java.time._ | |
import etude.calendar._ | |
import etude.region._ |
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
<configuration> | |
<conversionRule conversionWord="coloredLevel" converterClass="play.api.Logger$ColoredLevel" /> | |
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | |
<file>${application.home}/logs/application.log</file> | |
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | |
<fileNamePattern>${application.home}/logs/application.%d{yyyy-MM-dd}.log</fileNamePattern> | |
<maxHistory>14</maxHistory> | |
</rollingPolicy> | |
<encoder> | |
<charset>UTF-8</charset> |
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
interface Animal { | |
default void say() { | |
System.out.println("I'm Animal"); | |
} | |
} | |
enum Bird implements Animal { | |
Sparrow, | |
Pigeon | |
} |
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
object SurrogatePair { | |
case class Pair(x: Char, y: Option[Char] = None) { | |
lazy val surrogatePair = y match { | |
case None => false | |
case Some(yy) => Character.isSurrogatePair(x, yy) | |
} | |
lazy val text = surrogatePair match { |
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
import scala.util.parsing.combinator.RegexParsers | |
import scala.util.parsing.input.Positional | |
object SimpleAnalyzer { | |
trait SearchKeyword extends Positional | |
case class KeywordIgnore(content:String) extends SearchKeyword | |
case class KeywordDefPackage(packageName:List[String]) extends SearchKeyword | |
case class KeywordDefClass(className:List[String]) extends SearchKeyword | |
case class KeywordRefSymbol(packageName:List[String]) extends SearchKeyword | |
case class KeywordComment(content:String) extends SearchKeyword |
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
<html><head/><body><code class="prettyprint prettyprinted"><span class="kwd">public</span><span class="pln"> </span><span class="kwd">class</span><span class="pln"> </span><span class="typ">Sakura</span><span class="pln"> </span><span class="pun">{</span><span class="pln"> </span><span class="kwd">public</span><span class="pln"> </span><span class="kwd">static</span><span class="pln"> </span><span class="kwd">void</span><span class="pln"> main</span><span class="pun">(</span><span class="typ">String</span><span class="pun">...</span><span class="pln"> args</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln"> </span><span class="typ">System</span><span class="pun">.</span><span class="kwd">out</span><span class="pun">.</span><span class="pln">println</span><span class="pun">(</span><span class="str">"bloom!"</span><span class="pun">);</span><span class="pln"> </span><span class="com">/* hanami */</span><span class="pln"> </span><span class="pun">}</sp |
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
function sourcecolon(source){ | |
var body = document.documentElement.childNodes[1]; | |
var tag = document.createElement("code"); | |
tag.className = "prettyprint"; | |
tag.innerHTML = source.code; | |
body.appendChild(tag); | |
prettyPrint(); | |
var printed = document.innerHTML; |
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
public static void loadScript(Context context, Scriptable scope, String name) throws IOException { | |
String path = "src/main/resources"; | |
try (Reader reader = new FileReader(new File(path + "/" + name))) { | |
Script script = context.compileReader(reader, name, 1, null); | |
script.exec(context, scope); | |
} | |
} | |
public static String[] getGoogleCodePrettifyScripts() { |
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
Dir.entries('.').keep_if {|x| x.start_with?('2') }.each do |d| | |
d =~ /^(2[0-9]{3})([0-9]{2})([0-9]{2})$/ | |
puts "mv #{d} #{$1}-#{$2}-#{$3}" | |
end | |
NewerOlder