Skip to content

Instantly share code, notes, and snippets.

@kigiri
kigiri / rules.md
Created April 14, 2017 19:17
regles de l'ordre des shlags

✨ Salut à toi, bienvenue sur ***l’Ordre des Schlags ***! Pends le temps de lire les règles pour éviter d’être perdu(e) lors de ton arrivée. ✨

infos: Ici se trouvent les informations importantes du Discord, son mode d'emploi et ses règles. Lisez tout ce qu’il s’y trouve dès votre arrivée. general: Dites bonjour et présentez-vous. bla-bla-bla: Si vous voulez échanger avec des membres de l’Ordre, c’est le bon salon. projets-tables-rondes: Proposez ou participez à une TR, regardez les messages épinglés pour vous mettre au courant des TR proposées. videos-tables-rondes: Ici sont présentes toutes les TR réalisées par les schlags. youtube-des-schlags: Présentez VOTRE chaîne et VOS nouvelles vidéos, nous serons heureux de contempler VOTRE travail. Postez les vidéos youtube qui ne sont pas de vous dans le salon #videos-yt. creations-artistiques: Montrez-nous VOS créations, (tout travail manuel : dessin, bricolage, etc…) nous serons heureux de contempler VOTRE travai

const wilder = {
firstName: 'Clément',
lastName: 'Denis',
age: 30,
isExperienced: true,
}
const showWilder = (w) => {
const firstName = w.firstName.toLowerCase()
const DB_PATH = process.env.DB_PATH || './db.json'
const SAVE_INTERVAL = process.env.SAVE_INTERVAL || 60*1000
const db = require(DB_PATH)
const fs = require('fs')
const saveDB = () => {
const start = Date.now()
try {
fs.writeFile(DB_PATH, JSON.stringify(db), 'utf8', err => {
if (err) {
@kigiri
kigiri / ai.js
Last active July 26, 2018 19:42
initial raiders of nan ai
// code here...
const update = state => {
const { cell } = state
const cells = [
cell + 1,
cell - 1,
cell + 14,
cell - 14,
].filter(_ => _)
@kigiri
kigiri / Dockerfile
Created August 1, 2018 18:33
node 10 + dependencies for puppeteer (without chromium binary) for now deploy
FROM node:10-alpine
RUN \
echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
&& echo "http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories \
&& echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
&& apk --no-cache update \
&& apk --no-cache upgrade \
&& apk add --no-cache --virtual .build-deps \
gifsicle pngquant optipng libjpeg-turbo-utils \
local function empty(tbl)
if type(tbl) == 'string' then return #tbl == 0 end
if type(tbl) ~= 'table' then return true end
if #tbl ~= 0 then return false end
for k, v in pairs(tbl) do return false end
return true
end
local function len(tbl)
const { createServer, get } = require('http')
const index = `
<!DOCTYPE html>
<html>
<head>
<title>streamable</title>
<meta charset="utf-8">
</head>
<body>
@kigiri
kigiri / test.js
Last active March 11, 2020 19:22
const eq = (a, b) => {
if (a === b) return true
if (!a || !b) return false
if (typeof a !== typeof b) return false
if (typeof a === 'number' && Number.isNaN(a) && Number.isNaN(b)) return true
if (typeof a === 'object') {
if (a.constructor !== b.constructor) return false
const entries = Object.entries(a)
if (entries.length !== Object.values(b).length) return false
for (const [k,v] of entries) {
@kigiri
kigiri / tbp-top-100-movies.txt
Last active March 23, 2020 11:49
ThePirateBay - top 100 of the 23/05/2020 as a JSON dataset
(HD - Movies) Birds.Of.Prey.2020.1080p.WEBRip.x264.AAC5.1-MP4, Uploaded Y-day 06:49, Size 2.01 GiB, ULed by MrStark
(HD - Movies) The.Invisible.Man.2020.1080p.WEBRip.x264.AAC5.1-MP4, Uploaded 03-20 17:45, Size 2.29 GiB, ULed by MrStark
(HD - Movies) The.Invisible.Man.2020.720p.WEBRip.x264.AAC2.0-MP4, Uploaded 03-20 15:43, Size 1.12 GiB, ULed by MrStark
(HD - Movies) Onward.2020.720p.WEBRip.x264.AAC2.0-MP4, Uploaded 03-21 21:06, Size 939.84 MiB, ULed by MrStark
(HD - Movies) Contagion.2011.1080p.BRRip.x264.AAC5.1-MP4, Uploaded 03-20 16:35, Size 1.89 GiB, ULed by MrStark
(HD - Movies) Star.Wars.Episode.IX.The.Rise.Of.Skywalker.2019.1080p.BRRip.x264, Uploaded 03-16 08:29, Size 2.61 GiB, ULed by MrStark
(HD - Movies) Contagion.2011.720p.BRRip.x264.AAC2.0-MP4, Uploaded 03-20 16:34, Size 978.29 MiB, ULed by MrStark
(HD - Movies) Parasite.2019.1080p.HDRip.X264.AC3-EVO[TGx], Uploaded 08-16 2019, Size 2.8 GiB, ULed by sotnikam
(HD - Movies) Jumanji.The.Next.Level.2019.720p.BRRip.x264.AAC2.0-MP4, Uploaded 03-01