Skip to content

Instantly share code, notes, and snippets.

View ollie314's full-sized avatar

Mehdi Lefebvre ollie314

View GitHub Profile
@ollie314
ollie314 / API.md
Created October 25, 2016 06:04 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@ollie314
ollie314 / fnv_hash_example.cpp
Created September 28, 2016 09:46 — forked from filsinger/fnv_hash_example.cpp
C++11 : FNV-1 and FNV-1a compile-time string hashing
// C++11 32bit FNV-1 and FNV-1a string hasing (Fowler–Noll–Vo hash)
//
// Requires a compiler with C++11 support
// See main(...) for examples
#include <iostream>
#include <cassert>
namespace hash
{
@ollie314
ollie314 / hash.c
Created September 7, 2016 04:12 — forked from tonious/hash.c
A quick hashtable implementation in c.
#define _XOPEN_SOURCE 500 /* Enable certain library functions (strdup) on linux. See feature_test_macros(7) */
#include <stdlib.h>
#include <stdio.h>
#include <limits.h>
#include <string.h>
struct entry_s {
char *key;
char *value;
@ollie314
ollie314 / hbase-indexing-solr.md
Created August 23, 2016 17:27 — forked from abajwa-hw/hbase-indexing-solr.md
Hbase indexing to solr in HDP 2.3

Hbase indexing to solr in HDP 2.3

  • Background:

The HBase Indexer provides the ability to stream events from HBase to Solr for near real time searching. The HBase indexer is included with HDPSearch as an additional service. The indexer works by acting as an HBase replication sink. As updates are written to HBase, the events are asynchronously replicated to the HBase Indexer processes, which in turn creates Solr documents and pushes them to Solr.

@ollie314
ollie314 / sshpub-to-rsa
Created August 11, 2016 06:13 — forked from thwarted/sshpub-to-rsa
converts an openssh RSA public key into a format usable by openssl rsautl (if you don't have openssh 5.6 or later with ssh-keygen PEM export format)
#!/usr/bin/env python
# with help and inspiration from
# * ASN1_generate_nconf(3) (specifically the SubjectPublicKeyInfo structure)
# * http://www.sysmic.org/dotclear/index.php?post/2010/03/24/Convert-keys-betweens-GnuPG%2C-OpenSsh-and-OpenSSL
# * http://blog.oddbit.com/2011/05/converting-openssh-public-keys.html
import sys
import base64
import struct
@ollie314
ollie314 / 2arg_func.c
Created June 13, 2016 11:38 — forked from mikesmullin/2arg_func.c
C to Linux x86-64 Assembly (ASM) examples
#include <stdio.h>
int example(int a, int b) {
return a + b + 3;
}
int main(void) {
printf("%i\n", example(1, 2));
return 0;
}
@ollie314
ollie314 / step-by-step-gatling-idea.md
Created March 31, 2016 09:46 — forked from groovybayo/step-by-step-gatling-idea.md
Gatling: Step by step guide to IntelliJ integration

Step by step guide to setting up IDEA to write gatling simulations

Prerequisites:

Have [SBT plugin][sbt-plugin] installed

Begin

  • [Create a new project][create-project] in IDEA ( File > New Project ...)
    • Make sure you select a maven module
@ollie314
ollie314 / 0_reuse_code.js
Created January 7, 2016 10:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@ollie314
ollie314 / clojure-match.clj
Last active September 15, 2015 09:23 — forked from ckirkendall/clojure-match.clj
Language Compare F#, Ocaml, Scala, Clojure, Ruby and Haskell - Simple AST example
(use '[clojure.core.match :only [match]])
(defn evaluate [env [sym x y]]
(match [sym]
['Number] x
['Add] (+ (evaluate env x) (evaluate env y))
['Multiply] (* (evaluate env x) (evaluate env y))
['Variable] (env x)))
(def environment {"a" 3, "b" 4, "c" 5})