Skip to content

Instantly share code, notes, and snippets.

# .kube contents
▶ ls -al /Users/mmoci/.kube/
total 32
drwxr-xr-x 12 mmoci 1668562246 384 Dec 11 10:01 .
drwxr-xr-x+ 148 mmoci 1668562246 4736 Mar 25 17:09 ..
-rw-r--r--@ 1 mmoci 1668562246 6148 Jan 28 2019 .DS_Store
drwxr-xr-x 3 mmoci 1668562246 96 Mar 20 2017 cache
-rw------- 1 mmoci 1668562246 5862 Dec 11 10:01 config
drwxr-xr-x 3 mmoci 1668562246 96 Nov 26 2018 some-directory
▶ ls -al /Users/mmoci/.kube/
total 32
drwxr-xr-x 12 mmoci 1668562246 384 Dec 11 10:01 .
drwxr-xr-x+ 148 mmoci 1668562246 4736 Mar 25 17:09 ..
-rw-r--r--@ 1 mmoci 1668562246 6148 Jan 28 2019 .DS_Store
drwxr-xr-x 3 mmoci 1668562246 96 Mar 20 2017 cache
-rw------- 1 mmoci 1668562246 5862 Dec 11 10:01 config
drwxr-xr-x 3 mmoci 1668562246 96 Nov 26 2018 a-directory
~
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(package-initialize)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
@mox601
mox601 / ReaderTest.java
Created December 27, 2017 21:40
Test with functional java's Reader to demonstrate Dependency Injection
package fm.mox.spikes.functionaljava;
import fj.F;
import fj.data.Reader;
import lombok.Value;
import lombok.experimental.Tolerate;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import java.math.BigInteger;
@Test
public void throttlingRxJava() throws Exception {
Observable<Long> everySecond = Observable.fromIterable(Arrays.asList(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L))
.map(aLong -> {
try {
Thread.sleep(1_000L);
} catch (InterruptedException e) {
//
}
public class ATest {
@Test
public void test() {
JSONObject root = new JSONObject("{}");
List<TestC> list = new ArrayList<>();
TestC testC = new TestC("type", "bucket", "code", null, DateTime.now(),
null);
TestC testC1 = new TestC("type", "bucket", "code", null, DateTime.now(),
null);
@Test
public void test() {
JSONObject root = new JSONObject("{}");
List<TestC> list = new ArrayList<>();
TestC testC = new TestC("type", "bucket", "code", null, DateTime.now(),
null);
TestC testC1 = new TestC("type", "bucket", "code", null, DateTime.now(),
null);
root.put("1", testC);
private static List<ServerAddress> parseServerAddresses(final String serverAddressesString) {
final String[] serversSplitOnComma = serverAddressesString.split(",");
final List<ServerAddress> serverAddresses = new ArrayList<>(3);
for (final String serverAndPort : serversSplitOnComma) {
final String[] splitOnColon = serverAndPort.split(":");
{
"message": "ok",
"msgCode": 0,
"challengerSquad": {
"formation": "F_3_4_3",
"gk": {
"id": "p55083",
"position": "G",
"name": "Marco",
"lastName": "Sportiello",
@mox601
mox601 / request.md
Last active January 27, 2016 09:45
check
  • Header Authorization Token di autorizzazione Alfanumerico 100

Il token passato nell’header deve esser stato ottenuto attraverso un’autenticazione con credenziali applicative (application key)

  • FormParam token Token di cui va verificata l’autenticità Alfanumerico 100