This file contains 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
{ | |
"name": "reviung39", | |
"vendorProductId": 1196711696, | |
"macros": ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""], | |
"layers": [ | |
[ | |
"KC_TAB", | |
"KC_Q", | |
"KC_W", | |
"KC_E", |
This file contains 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
/* Copyright 2019 Naoto Takai | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 2 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
This file contains 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
// From snapshot to a simple JS object | |
const getObjFromDocumentSnapshot = snapshot => snapshot.data(); | |
// From an object like this -> { 'RIP Code': { en: { '8274': 'My english value' } } } | |
// To this -> 'My english value' | |
const getter = propName => either(pipe(path([propName, 'en']), values, head), always('')); | |
const ripCodeGetter = getter('RIP Code'); | |
// Check if the RIP Code property of the given object matchs ripCode | |
const ripCodeExistsInObj = ripCode => pipe(ripCodeGetter, equals(ripCode)); |
This file contains 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 R from 'ramda'; | |
const isModulo = R.curry(R.pipe(R.flip(R.modulo), R.equals(0))); | |
const fizzbuzz = R.pipe( | |
R.add(1), | |
R.range(1), | |
R.map( | |
R.cond([ | |
[R.both(isModulo(3), isModulo(5)), R.always('FizzBuzz')], |
This file contains 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
{ | |
"characters": [ | |
{ | |
"id": 1, | |
"image_path": "https://image.onepiecewt100.com/vote_image/0001.jpg", | |
"large_image_path": "https://image.onepiecewt100.com/vote_large_image/0001.jpg", | |
"name": { | |
"cn": "蒙奇·D·路飞", | |
"en": "MONKEY.D.LUFFY", | |
"ja": "モンキー・D・ルフィ", |
This file contains 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
// This script allows you to download the new albums created by the Studio Ghibli on their website | |
// For example, open this one: https://www.ghibli.jp/works/laputa/ | |
// Copy-paste this function in the console | |
// And then, simply call it! | |
async function getImages() { | |
const images = document.querySelectorAll('a.panelarea'); | |
// Count to know when to sleep and avoid the limit of simultaneous downloads in Chrome (10) | |
let count = 0; | |
for (let image of images) { | |
let newLink = document.createElement('a'); |
This file contains 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
module Main exposing (..) | |
import Browser | |
import Html exposing (Html, div, button, select, option, text) | |
import Html.Attributes exposing (style, value) | |
import Html.Events exposing (onInput) | |
-- MAIN | |
main = Browser.sandbox { init = init, update = update, view = view } |
This file contains 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
const fizzbuzz = number => { | |
const isFizz = number => number % 5 === 0; | |
const isBuzz = number => number % 3 === 0; | |
const genIterable = number => [...Array(number).keys()].map(i => i + 1); | |
const verification = number => { | |
if (isFizz(number) && isBuzz(number)) return 'fizzbuzz'; | |
if (isFizz(number)) return 'fizz'; | |
if (isBuzz(number)) return 'buzz'; | |
return number |