Skip to content

Instantly share code, notes, and snippets.

@szydan
szydan / docker-compose.yml
Created December 11, 2023 16:57 — forked from fpompermaier/docker-compose.yml
Federate plugin on standalone ES docker-compose.yml
services:
federate:
image: "docker.elastic.co/elasticsearch/elasticsearch:8.11.1"
user: elasticsearch
ports:
- "5005:5005"
- "9200:9200"
volumes:
# - ./plugin.zip:/tmp/plugin.zip
# - /home/flavio/git/siren-platform/core/target/releases/siren-federate-8.11.1-34.0-SNAPSHOT-plugin.zip:/tmp/plugin.zip
@szydan
szydan / web-servers.md
Created May 13, 2021 16:52 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@szydan
szydan / Object Flatten
Created May 25, 2018 14:05 — forked from penguinboy/Object Flatten
Flatten javascript objects into a single-depth object
var flattenObject = function(ob) {
var toReturn = {};
for (var i in ob) {
if (!ob.hasOwnProperty(i)) continue;
if ((typeof ob[i]) == 'object') {
var flatObject = flattenObject(ob[i]);
for (var x in flatObject) {
if (!flatObject.hasOwnProperty(x)) continue;
@szydan
szydan / _readme.md
Created March 25, 2018 21:21 — forked from pongstr/_readme.md
HTTP/2 Recipe: Nginx + Node.js

Imgur

Recipe

Install homebrew/services, this will be helpful, you'll see later. :D

$ brew tap homebrew/services 
@szydan
szydan / Shield-and-Kibi.md
Last active May 3, 2016 16:52 — forked from scampi/Shield-and-Kibi.md
Kibi bits and pieces
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.util.concurrent.Callable;
import javassist.util.proxy.MethodHandler;
import javassist.util.proxy.ProxyFactory;
import javassist.util.proxy.ProxyObject;
import net.sf.cglib.proxy.Enhancer;
import net.sf.cglib.proxy.MethodInterceptor;
package learning_tests;
import static org.custommonkey.xmlunit.XMLAssert.*;
import org.custommonkey.xmlunit.XMLUnit;
import org.junit.Test;
public class XmlUnitTest {
@Test
@szydan
szydan / gist:4048731
Created November 9, 2012 22:28 — forked from padolsey/gist:527683
interesting technic to detect IE version
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}