Skip to content

Instantly share code, notes, and snippets.

View hascode's full-sized avatar

Micha Kops hascode

View GitHub Profile
@davideicardi
davideicardi / README.md
Last active March 8, 2023 15:05
Write and read Avro records from bytes array

Avro serialization

There are 4 possible serialization format when using avro:

@briandominick
briandominick / asciidoc-static.adoc
Last active July 6, 2024 19:39
Static Site Generators with AsciiDoc Support

There are 28 static site generators that support AsciiDoc sourcing.

@ptrthomas
ptrthomas / karate-answers2.feature
Last active January 27, 2019 14:04
Karate example that replaces the combination of REST-Assured and TestNG data-provider | https://bit.ly/2G4qvBe
Feature: karate answers 2
Background:
* url 'http://localhost:8080'
Scenario Outline: given circuit name, validate country
Given path 'api/f1/circuits/<name>.json'
When method get
Then match $.MRData.CircuitTable.Circuits[0].Location.country == '<country>'
@jexp
jexp / load_conference.groovy
Last active July 25, 2021 05:02
Importing JSON data into Neo4j with Groovy & Cypher
/*
{
"talks": [{
"title": "Building 'Bootiful' Applications",
"abstract": "Alright, so maybe “bootiful” won’t ever work,...",
"topics": ["topic"],
"room": "Auditorium",
"timeslot": "Wed 29th, 11:00-11:50",
"speaker": {
"name": "Josh Long",
@dpryden
dpryden / ClassLoaderLeakExample.java
Created October 20, 2014 00:01
Example of a ClassLoader leak in Java
import java.io.IOException;
import java.net.URLClassLoader;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.Path;
/**
* Example demonstrating a ClassLoader leak.
*
* <p>To see it in action, copy this file to a temp directory somewhere,
@technige
technige / zen_of_cypher.md
Last active April 1, 2020 09:57
The Zen of Cypher

The Zen of Cypher

  • Write functions() in lower case, KEYWORDS in upper.
  • START each keyword clause
    ON a new line.
  • Use either camelCase or snake_case for node identifiers but be consistent.
  • Relationship type names should use UPPER_CASE_AND_UNDERSCORES.
  • Label names should use CamelCaseWithInitialCaps.
  • MATCH (clauses)-->(should)-->(always)-->(use)-->(parentheses)-->(around)-->(nodes)
  • Backticks `cân éscape odd-ch@racter$ & keyw0rd$` but should be a code smell.
@mojavelinux
mojavelinux / steps.asciidoc
Created June 7, 2013 21:24
Steps to convert WordPress post to AsciiDoc
  1. Pull out content from <content> tag in exported XML file

  2. Replace blank lines w/ </p><p>, add <p> as first line and </p> as last line

  3. Put that content into the body of a basic HTML document structure (so it looks like an HTML file)

  4. convert using

    pandoc --no-wrap -f html -t asciidoc post-content.html > post-content.adoc
  5. use sed to cleanup

    sed -i s/^image:/image::/ post-content.adoc