Skip to content

Instantly share code, notes, and snippets.

View geowarin's full-sized avatar

Geoffroy Warin geowarin

View GitHub Profile
@geowarin
geowarin / .editorconfig
Created February 5, 2022 01:50
C# editor config
# https://google.github.io/styleguide/csharp-style.html
[*.cs]
indent_style = space
indent_size = 2
tab_width = 4
insert_final_newline = true
max_line_length = 100
# Microsoft .NET properties
@geowarin
geowarin / MixamoImportTool.cs
Created May 5, 2020 12:29
Editor Window UIElements
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using UnityEditor;
using UnityEditor.Animations;
using UnityEditor.ShortcutManagement;
using UnityEditor.UIElements;
using UnityEngine;
using UnityEngine.Animations;
package com.geowarin.jooqgraphql
import java.util.*
class Node<T : Any>(
val data: T,
val dependencies: HashSet<Node<T>> = hashSetOf()
) {
override fun equals(other: Any?): Boolean = other is Node<*> && data == other.data
override fun hashCode(): Int = data.hashCode()
import com.sun.org.apache.xerces.internal.dom.DeferredAttrImpl
import org.intellij.lang.annotations.Language
import org.w3c.dom.Document
import org.w3c.dom.Node
import org.w3c.dom.NodeList
import java.io.File
import javax.xml.parsers.DocumentBuilderFactory
import javax.xml.xpath.XPath
import javax.xml.xpath.XPathConstants
import javax.xml.xpath.XPathFactory
package fds.zookeeper.toto;
import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.WatchedEvent;
import org.apache.zookeeper.Watcher;
import org.apache.zookeeper.ZooKeeper;
import java.io.IOException;
import java.util.concurrent.CountDownLatch;
import java.util.function.Consumer;
@geowarin
geowarin / getHtml.kt
Created February 27, 2018 10:16
SSR with J2V8
fun getHtml(componentPath: String, modelJson: String, currentUrl: String): String {
val nodeJS = NodeJS.createNodeJS()
nodeJS.runtime.add("componentPath", componentPath)
nodeJS.runtime.add("modelJson", modelJson)
nodeJS.runtime.add("currentUrl", currentUrl)
try {
val vendors = nodeJS.require(File(bundleLocation, "vendor.js"))
val mainModule = nodeJS.require(File(bundleLocation, "pages.js"))
export declare function pluck<T, K1 extends keyof T>(p: T, property: K1): T[K1];
export declare function pluck<
T,
K1 extends keyof T,
K2 extends keyof T[K1]
>(o: T, property1: K1, property2: K2): T[K1][K2];
export declare function pluck<
T,
K1 extends keyof T,
K2 extends keyof T[K1],
@Configuration
class StaticResourceConfiguration(
val reactOptions: ReactOptions,
val webProperties: WebProperties
) : WebMvcConfigurerAdapter() {
override fun addResourceHandlers(registry: ResourceHandlerRegistry) {
val staticPaths = arrayOf(
"classpath:/static/",
@geowarin
geowarin / CodegenApplicationTests.kt
Last active August 3, 2017 20:16
dialect specific SQL generation with jooq
package geowarin.codegen
import org.amshove.kluent.shouldEqualTo
import org.jooq.SQLDialect
import org.jooq.impl.DSL
import org.jooq.impl.DefaultConfiguration
import org.junit.Test
class CodegenApplicationTests {