Skip to content

Instantly share code, notes, and snippets.

println "yo"
import groovy.transform.Field
@Grapes(@Grab(group = 'net.sourceforge.nekohtml', module = 'nekohtml', version = '1.9.16'))
import org.cyberneko.html.parsers.SAXParser
@Field
static String tmpDir = "/tmp" //System.getProperty("java.io.tmpdir")
static def cache_file(url) {
def shortened_path = url.hashCode() + ".html"
alias gita="git add \$(gf)"
alias gitr="git reset HEAD \$(gf)"
alias gitc="git checkout \$(gf)"
alias gitb="git checkout \$(gb)"
# generates 'half-md5' hash by taking first 8 bytes of MD5 hash and converting
# those into Unsigned Int64
def halfMd5(some):
hmd5 = hashlib.md5()
hmd5.update(some.encode('utf-8'))
return struct.unpack(">Q", hmd5.digest()[:8])[0]
bkmz@MS-7587:~$ groovysh
Groovy Shell (2.3.8, JVM: 1.8.0_25)
Type ':help' or ':h' for help.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
groovy:000> import java.time.*
===> java.time.*
groovy:000> ZonedDateTime.now()
===> 2014-12-05T00:42:56.767+04:00[Europe/Moscow] <-- WTF??
1. Опыт разработки на .Net. Сколько по времени.
2. Опыт работы с WinForms. Сколько по времени.
3. Опыт работы с WPF, сколько по времени, какие проекты? Использовались ли MVVM + DI Container, MVP + DI Container?
4. Опыт работы с ASP.Net и MVC. Сколько по времени?
5. Писали ли UI?
public class DateTimeAdapter extends XmlAdapter<String, ZonedDateTime> {
public static final String UTC_FORMAT = "yyyy-MM-dd HH:mm:ss 'UTC'";
public static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern(UTC_FORMAT);
@Override
public String marshal(final ZonedDateTime date) {
return date != null ? DATE_TIME_FORMATTER.format(date) : null;
}
gradle.projectsLoaded {
rootProject.allprojects {
buildscript {
repositories {
maven { url nexusPublic }
mavenLocal()
}
}
repositories {
maven { url nexusPublic }
ibus-daemon -rd
using System;
using System.Linq;
using System.Text.RegularExpressions;
using System.Collections.Generic;
namespace test_recursive_query_string
{
class MainClass
{
public static void Main (string[] args)