Skip to content

Instantly share code, notes, and snippets.

View loicdescotte's full-sized avatar

Loïc Descotte loicdescotte

View GitHub Profile
@loicdescotte
loicdescotte / fpmax.scala
Created March 3, 2019 09:41 — forked from jdegoes/fpmax.scala
FP to the Max — Code Examples
package fpmax
import scala.util.Try
import scala.io.StdIn.readLine
object App0 {
def main: Unit = {
println("What is your name?")
val name = readLine()
const config = {
typeDirs: [
{ type: "pdf", directory: "documents" },
{ type: "png", directory: "images" },
{ type: "mp3", directory: "music" },
],
};
type Config = typeof config;
type TypeDirs = Config["typeDirs"];
@loicdescotte
loicdescotte / node_redis.md
Last active September 8, 2020 09:45 — forked from leommoore/node_redis.md
Node - Redis

Node - Redis

Redis is a simple key, value pair database. The common commands include:

Data StructureCommands
StringsSET, GET, DEL, APPEND, DECR, INCR...
HashsHSET, HGET, HDEL, HGETALL...
ListsLPUSH, LREM, LTRIM, RPOP, LINSERT...
SetsSADD, SREM, SMOVE, SMEMBERS...
@loicdescotte
loicdescotte / extract_mbox_attachments.py
Created August 5, 2021 15:16 — forked from georgy7/extract_mbox_attachments.py
Extract attachments from mbox file.
# Modified.
# Original script source:
# http://blog.marcbelmont.com/2012/10/script-to-extract-email-attachments.html
# Usage:
# Run the script from a folder with file "all.mbox"
# Attachments will be extracted into subfolder "attachments"
# with prefix "n " where "n" is an order of attachment in mbox file.
# ---------------