This file contains hidden or 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
#!/bin/bash | |
set -e | |
# Je récupère l'adresse IP que ma filé Avahi | |
LOCAL_AVAHI_AUTO_IP="$( ip addr show | grep "tun0" | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" )" | |
# Idem, mais celle de raspberrypi-01 | |
REMOTE_AVAHI_AUTO_IP="$( avahi-resolve -4 -n raspberrypi-01.local | cut -d" " -f2 )" | |
DEFAULT_GATEWAY="92.92.92.254" |
This file contains hidden or 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 radium226; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.http.MediaType; | |
import org.springframework.stereotype.Controller; | |
import org.springframework.ui.Model; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RequestMethod; | |
import org.springframework.web.bind.annotation.ResponseBody; | |
import org.springframework.web.servlet.ModelAndView; |
This file contains hidden or 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
object ImageApp extends App { | |
import cats._ | |
import cats.free._ | |
import cats.data._ | |
case class Image(bytes: Array[Byte]) | |
sealed trait ImageOp[A] // Image Algebra |
This file contains hidden or 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
import akka.actor.ActorSystem | |
import akka.stream._ | |
import akka.stream.scaladsl._ | |
import akka.stream.stage.{ GraphStageLogic, GraphStageWithMaterializedValue, OutHandler} | |
import scala.concurrent._ | |
import scala.concurrent.duration._ | |
object IntSource { |
This file contains hidden or 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
#!/bin/bash | |
export REAL_DEVICE="/dev/video0" | |
export FAKE_DEVICE="/dev/video1" | |
export DURATION="5" | |
export SIZE="320x240" | |
export AVD="Nexus_5X_API_25" |
This file contains hidden or 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
#!/bin/bash | |
export RED_COLOR="\033[0;31m" | |
export DEFAULT_COLOR="\033[0m" | |
declare message=" ${RED_COLOR}/!\ ${DEFAULT_COLOR}${1}${RED_COLOR} /!\ ${DEFAULT_COLOR}" | |
declare index= | |
ls -1 "/dev/pts" | grep -E '[0-9]+' | while read index; do | |
echo -e "${message}" >>"/dev/pts/${index}" | |
done |
This file contains hidden or 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 python3 | |
from rx import Observable, Observer, AnonymousObservable | |
from time import sleep | |
from rx.concurrency import NewThreadScheduler | |
from concurrent.futures import ThreadPoolExecutor | |
from rx.internal import extensionmethod | |
@extensionmethod(Observable) |
This file contains hidden or 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 python3 | |
import time | |
import random | |
import queue | |
import threading | |
from concurrent import futures | |
SHORT_DURATION_RANGE = (1, 2) | |
LONG_DURATION_RANGE = (2, 4) |
This file contains hidden or 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
#!/bin/env python | |
class Option(object): | |
def __init__(self, key, name, expects_value): | |
self.key = key | |
self.name = name | |
self.expects_value = expects_value | |
def format_value(self, value): |
This file contains hidden or 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 com.github.radium226.gists; | |
import com.esotericsoftware.kryo.Kryo; | |
import com.esotericsoftware.kryo.io.Input; | |
import com.esotericsoftware.kryo.io.Output; | |
import com.esotericsoftware.kryo.serializers.ClosureSerializer; | |
import java.io.*; | |
import java.lang.invoke.SerializedLambda; | |
import java.util.concurrent.Callable; | |
import org.objenesis.strategy.StdInstantiatorStrategy; |
NewerOlder