View TreeVisitor.groovy
package com.panbet.tree
import groovy.transform.ToString
import spock.lang.Shared
import spock.lang.Specification
* Simple example of deep-first and breath-first tree traversal
* Sample tree
* <pre>
View FSMonTest.groovy
package com.panbet.tree
import static*
View logback.xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="30 seconds" debug="true">
<property name="FILE_LOG_PATTERN"
value="%d{dd/MM HH:mm:ss:SS} %level [%thread] %logger{10} [%file:%line] %msg%n"/>
<property name="LOG_PATH"
value="#[[$logPrefix$]]#" />
View getters-to-builder.groovy
import groovy.text.SimpleTemplateEngine
import java.lang.reflect.Method
def classFQN = args.length > 0? args[0]: System.exit(1)
Class<?> clazz = Class.forName(classFQN, false, getClass().getClassLoader())
class BuilderTemplateWrapper {
final Class<?> clazz
View govorim-pravilno.m3u
#EXTINF:2061, Норма современного языка
#EXTINF:2539, Языковые изменения и проблемы орфографии
#EXTINF:2105, Латиница и кириллица: соперники или союзники?
#EXTINF:2223, Паронимы
#EXTINF:2035, Омонимы
public interface DemoInterface {
HelloMsg sayHelloImpl(AddresseeRequest request);
@RequestMapping(value = "/hello")
default HelloMsg sayHello(@RequestBody AddresseeRequest request) {
return sayHelloImpl(request);
View brendyatina.m3u
#EXTINF:1874, Metro-Goldwyn-Mayer
#EXTINF:1427, Xerox
#EXTINF:1491, Versace
#EXTINF:1463, Siemens
#EXTINF:1374, Хоккей
View gist:7f5a48f30cdf6a6d87e71e793fb2d589
// Useful for students in need of block quotes for their paper, etc.
// Execute the line in your JavaScript console;new_window.document.body.innerHTML = $('iframe').contents().find('iframe').contents().find('body').get(1).innerHTML;;new_window.document.body.innerHTML = $('iframe').contents().find('iframe').contents().find('body').get(1).innerHTML;
##### ea - alias for editing aliases
#When setting up a new aliases file, or having creating a new file.. About every time after editing an aliases file, I source it. This alias makes editing alias a
#bit easier and they are useful right away. Note if the source failed, it will not echo "aliases sourced".
#Sub in gedit for your favorite editor, or alter for ksh, sh, etc.
alias ea='gedit ~/.bash_aliases; source ~/.bash_aliases && source $HOME/.bash_aliases && echo "aliases sourced --ok."'
View get_email.groovy
import javax.mail.internet.InternetAddress
import javax.mail.Address
import javax.mail.Message
import javax.mail.Session
import javax.mail.Folder
def props = new Properties()
props.put '', 'imaps'
def host = ''