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
// gcc check_clock.c -ldl -o check_clock | |
// ripped from http://hg.openjdk.java.net/jdk8u/jdk8u-gate/hotspot/file/9c2ddd17626e/src/os/linux/vm/os_linux.cpp | |
#include <dlfcn.h> | |
#include <stdio.h> | |
#include <linux/time.h> | |
typedef int clockid_t; | |
int main(int argc, const char* argv[]) { |
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
private static <T> boolean fillIf(final Supplier<T> supplier, final Consumer<T> consumer) { | |
return fillIf(supplier, consumer, null); | |
} | |
private static <T> boolean fillIf(final Supplier<? extends T> supplier, final Consumer<T> consumer, final Consumer<Exception> exceptionHandler) { | |
try { | |
final T data = supplier.get(); | |
if (null == data) { | |
return false; | |
} |
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
#!/usr/bin/env ruby | |
require 'parslet' | |
require 'pp' | |
require 'awesome_print' | |
class InspectParser < Parslet::Parser | |
# TOKENS |
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 io.mikael.convert; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.function.*; | |
public class LambdaConverter { | |
public static class Foo { | |
public String getA() { return "A"; } |
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 io.mikael.peg; | |
import java.util.Arrays; | |
public class Sandbox { | |
public static void main(String[] args) { | |
System.out.printf("character('a', 'h').match(\"far\") = <%s>%n", | |
character('a', 'h').match("far")); |
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
xinput list | |
xinput list 9 | |
xinput get-button-map 9 | |
xinput set-button-map 9 1 2 3 4 5 6 7 2 2 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | |
/usr/share/X11/xorg.conf.d/logitech-usb-gaming-mouse.conf |
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 test; | |
import org.jooq.SQLDialect; | |
import org.jooq.impl.DSL; | |
import org.postgresql.ds.PGSimpleDataSource; | |
import java.sql.Connection; | |
import java.util.Objects; | |
public class JooqDslTest { |
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
@GrabResolver(name="OJO", root="https://oss.jfrog.org/artifactory/repo") | |
@Grab(group = "io.ratpack", module = "ratpack-groovy", version="0.9.15-SNAPSHOT") | |
@Grab(group = "org.springframework.amqp", module="spring-rabbit", version="1.4.5.RELEASE") | |
import com.rabbitmq.client.Channel | |
import groovy.transform.TupleConstructor | |
import org.springframework.amqp.core.MessageListener | |
import org.springframework.amqp.rabbit.core.ChannelAwareMessageListener | |
import org.springframework.amqp.rabbit.core.RabbitAdmin | |
import org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer |
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 foo.bar.baz; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; | |
import junit.framework.Assert; | |
import org.junit.Before; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.mock.web.MockHttpServletRequest; |
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
BEGIN; | |
INSERT INTO users (id, name, password, email, fullname) | |
SELECT u.id, u.username, u.passwd, | |
(SELECT string_val FROM os_propertyentry | |
WHERE entity_id = u.id AND entity_key = 'email'), | |
(SELECT string_val FROM os_propertyentry | |
WHERE entity_id = u.id AND entity_key = 'fullName') | |
FROM os_user u | |
WHERE u.id NOT IN ( |
OlderNewer