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
learn triangle $x { | |
fw $x | |
tr 120 | |
fw $x | |
tr 120 | |
fw $x | |
tr 120 | |
} | |
learn serpinsky $x, $level { | |
triangle $x |
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
### Keybase proof | |
I hereby claim: | |
* I am akhikhl on github. | |
* I am akhikhl (https://keybase.io/akhikhl) on keybase. | |
* I have a public key whose fingerprint is 3817 213B F592 2F04 4534 C0EC 125B 5BF8 F575 C5C0 | |
To claim this, I am signing this object: |
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
@Grab('org.jdom:jdom2:2.0.5') | |
@Grab('xerces:xercesImpl:2.11.0') | |
@Grab('xml-apis:xml-apis:1.4.01') | |
@Grab('jaxen:jaxen:1.1.4') | |
@GrabExclude(group='jdom', module='jdom') | |
@GrabExclude(group='org.jdom', module='jdom') | |
import org.jdom2.Document | |
import org.jdom2.Element | |
import org.jdom2.JDOMException |
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
// This is working gradle script for uploading artifacts of the given project | |
// to bintray/jcenter and to maven central (via bintray "sync to maven central" function). | |
// This script can be included from other scripts via `apply from: 'filename'` syntax. | |
apply plugin: 'signing' | |
apply plugin: 'maven-publish' | |
apply plugin: 'bintray' | |
import org.gradle.api.internal.artifacts.publish.DefaultPublishArtifact |
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
Issue 1 | |
-------- | |
Requested project: /home/ahi/Projects/SampleProject | |
Stack trace: | |
org.gradle.tooling.BuildException: Could not run build action using Gradle installation '/home/ahi/.gvm/gradle/2.0-rc-2'. | |
at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:53) | |
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:57) | |
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64) |
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
// The code below produces ClassNotFoundError. How to fix it? | |
import groovy.transform.ToString | |
@ToString | |
class P2ModuleSource implements Serializable { | |
private static final long serialVersionUID = 3526473395612776159L | |
List uris | |
P2ModuleSource(List uris) { | |
this.uris = uris |
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
buildscript { | |
repositories { mavenCentral() } | |
dependencies { classpath 'org.ajoberstar:gradle-git:0.5.0' } | |
} | |
import org.ajoberstar.gradle.git.tasks.* | |
def onEachGitFolder(File folder, Closure closure) { | |
File gitServiceFolder = new File(folder, ".git") | |
if(gitServiceFolder.exists() && gitServiceFolder.isDirectory()) |
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
package testpackage | |
import ch.qos.logback.classic.Level | |
import ch.qos.logback.classic.Logger | |
import ch.qos.logback.classic.LoggerContext | |
import ch.qos.logback.classic.encoder.PatternLayoutEncoder | |
import ch.qos.logback.core.ConsoleAppender | |
import ch.qos.logback.core.rolling.RollingFileAppender | |
import ch.qos.logback.core.rolling.TimeBasedRollingPolicy |
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
class Main { | |
public void main(String[] args) { | |
Person p = new Person("Andrey", "Hihlovskiy", "12.07.1969"); | |
boolean hasBirthDayToday = p.hasBirthDay(new Date()); | |
if(hasBirthDayToday) | |
p.say("Friends", "Hey, guys, have a cake, it's my birthday!") | |
while(isWorkingHours()) { | |
p.work(); | |
p.drink(DRINK.COFFEE, STRENGTH.EXTREME, 0.2); |
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
package org.akhikhl.test | |
import org.apache.tika.metadata.Metadata | |
import org.apache.tika.parser.rtf.RTFParser | |
class ParseRtf { | |
def parse(String rtfText) { | |
// not validating, not ns-aware | |
XmlSlurper slurper = new XmlSlurper(false, false) |
OlderNewer