Skip to content

Instantly share code, notes, and snippets.

View ddossot's full-sized avatar
:shipit:
s̴̝̺̫͖̞͛̑͆̀̽̕ḩ̵͌̀͘í̴̝̰͉̒́̐͗p̶̯͍͎͒̿́̈́̕

David Dossot ddossot

:shipit:
s̴̝̺̫͖̞͛̑͆̀̽̕ḩ̵͌̀͘í̴̝̰͉̒́̐͗p̶̯͍͎͒̿́̈́̕
View GitHub Profile
@antirez
antirez / resp3.md
Last active June 2, 2020 08:41
RESP3 protocol draft

RESP3 specification

Versions history:

  • 1.0, 2 May 2018, Initial draft to get community feedbacks.

Background

The Redis protocol has served us well in the past years, showing that, if carefully designed, a simple human readable protocol is not the bottleneck in the client server communication, and that the simplicity of the design is a major advantage in creating a healthy client libraries ecosystem.

Yet the Redis experience has shown that after about six years from its introduction (when it replaced the initial Redis protocol), the current RESP protocol could be improved, especially in order to make client implementations simpler and to support new features.

@ddossot
ddossot / vagrant-scp.md
Last active February 2, 2016 22:26 — forked from geedew/vagrant-scp
Copying files to a Vagrant VM from host
OPTIONS=`vagrant ssh-config | grep -v '^Host ' | awk -v ORS=' ' 'NF{print "-o " $1 "=" $2}'`

To copy a file from the host to a Vagrant VM:

scp ${OPTIONS} $FILE v:$PATH

to copy a file from a Vagrant VM to the host:

scp ${OPTIONS} v:$PATH $FILE

@peterflynn
peterflynn / Useful GitHub bookmarklets
Last active August 30, 2023 06:54
GitHub comment thread bookmarklets
To use: create a new bookmark and paste into the URL field.
In Chrome, you can paste the full multiline code as shown below.
In other browsers, you may need to minify the code into one line first.
@apangin
apangin / HotSpot JVM intrinsics
Last active May 11, 2023 18:32
HotSpot JVM intrinsics
_hashCode java/lang/Object.hashCode()I
_getClass java/lang/Object.getClass()Ljava/lang/Class;
_clone java/lang/Object.clone()Ljava/lang/Object;
_dabs java/lang/Math.abs(D)D
_dsin java/lang/Math.sin(D)D
_dcos java/lang/Math.cos(D)D
_dtan java/lang/Math.tan(D)D
_datan2 java/lang/Math.atan2(DD)D
_dsqrt java/lang/Math.sqrt(D)D
_dlog java/lang/Math.log(D)D
@lewisd32
lewisd32 / iptableflip.sh
Created April 15, 2015 18:20
Snippet of Unbounce script for restarting HAProxy with zero downtime
echo "Flipping tables! (╯°□°)╯︵ ┻━┻"
num_rules=3
real=3 # exposed to the ELB as port 443
test=4 # used to install test certs for domain verification
health=5 # used by the ELB healthcheck
blue_prefix=855
green_prefix=866
@roman
roman / schedulers.clj
Last active April 25, 2018 15:47
Simplest example of concurrency with Schedulers
(ns rx.example.schedulers
(:require
[monads.core :refer [Monad] :as monad]
[clojure.core.match :refer [match]]
[disposables.core :as disposable]
[com.unbounce.treajure.io :as tio]
[rx.lang.clojure.core :as rx]
[clj-http.client :as http])
(:import
[java.util.concurrent Executors]
@evgeny-goldin
evgeny-goldin / 01-validate.sh
Created March 7, 2015 16:18
Validate project's JSON and YAMl files
# Validate project's JSON files
function vj()
{
if [ "$1" == "" ]; then
local path="."
else
local path="$1"
fi
for json in $(find "$path" -name "*.json"); do
@ddossot
ddossot / README.md
Last active August 29, 2015 14:14
EC2 node discovery for Hazelcast

Alternative implementation of TcpIpJoinerOverAWS

This is a workaround for this Hazelcast issue.

To use the alternative TcpIpJoinerOverAWS:

  • Remove hazelcast-cloud from your project's classpath,
  • Add this class in your project or JAR it up if you prefer,
  • Do not configure an accessKey nor a secretKey in Hazelcast's AwsConfig.
@timyates
timyates / ReactiveGameOfLife.java
Last active June 15, 2020 13:39
RxJava and Java 8 Game of Life
import rx.Observable;
import rx.functions.Action1;
import rx.subjects.BehaviorSubject;
import java.awt.*;
import java.util.Arrays;
import java.util.List;
import java.util.function.Function;
import java.util.stream.Collectors;
@johnnyopao
johnnyopao / ub-inline-content-lightbox-min.md
Last active December 15, 2022 11:43
Display your Unbounce form or any inline content in a lightbox without creating a new page (Two step opt-in form)

Display your Unbounce form or any inline content in a lightbox without creating a new page. This can be used to create a two step opt-in form

Example page:

http://unbouncepages.com/lightbox-form/

Steps:

  1. Drop in a button (if you haven’t already) which will act as the trigger that opens up your form lightbox. While this button is selected find it’s ID under the ‘advanced’ tag. Take note of this ID.