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
FROM mysql:8.0.32 | |
RUN microdnf install -y python3 wget | |
ENV GRC_VERSION 1.12 | |
RUN wget -q -O grc_$GRC_VERSION.tar.gz http://kassiopeia.juls.savba.sk/~garabik/software/grc/grc_$GRC_VERSION.orig.tar.gz \ | |
&& tar xf grc_$GRC_VERSION.tar.gz \ | |
&& cd grc-$GRC_VERSION \ | |
&& sh ./install.sh \ |
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 { chain, isNotNil } from 'ramda' | |
export const filterMap = <A, B>(fn: (a: A) => B | null, list: A[]): B[] => | |
chain((x: A): B[] => { | |
const result = fn(x) | |
return isNotNil(result) ? [result] : [] | |
}, list) |
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
version: '3' | |
vars: | |
PROJECT: rails80 | |
RUBY_VERSION: 3.3.4 | |
NODE_VERSION: 20.10.0 | |
BUN_VERSION: 1.2.0 | |
RAILS_VERSION: 8.0.2 | |
DATABASE: postgresql # mysql | postgresql |
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
// https://novajs.co/react-hook-key-press | |
import { useState, useEffect } from 'react' | |
type KeyConfig = { | |
key: string | |
ctrl?: boolean | |
alt?: boolean | |
shift?: boolean | |
meta?: boolean |
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
defmodule Tesla.Middleware.ContentLength do | |
@behaviour Tesla.Middleware | |
@impl Tesla.Middleware | |
def call(env, next, _options) do | |
env | |
|> Tesla.put_header( | |
"content-length", | |
(env.body || "") |> String.length() |> Integer.to_string() | |
) |
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
def save_full_screenshot(page, path) | |
width = page.execute_script('return Math.max(document.body.scrollWidth, document.body.offsetWidth, document.documentElement.clientWidth, document.documentElement.scrollWidth, document.documentElement.offsetWidth);') | |
height = page.execute_script('return Math.max(document.body.scrollHeight, document.body.offsetHeight, document.documentElement.clientHeight, document.documentElement.scrollHeight, document.documentElement.offsetHeight);') | |
window = page.driver.browser.manage.window | |
window.resize_to width + 100, height + 100 | |
page.save_screenshot path | |
end |
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
@doc """ | |
日時のタプルをメール日時形式でフォーマットする | |
### Example | |
``` | |
iex> {{2021, 4, 3}, {9, 46, 58}} |> datetime_to_str | |
"Sat, 03 Apr 2021 09:46:58 +0900" | |
``` | |
""" |
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
Name: openssl3.2 | |
Version: 3.2.0 | |
Release: 1%{?dist} | |
Summary: Utilities from the general purpose cryptography library with TLS implementation | |
License: Apache License v2.0 | |
URL: https://www.openssl.org/ | |
Source0: https://www.openssl.org/source/openssl-%{version}.tar.gz | |
BuildRequires: perl-IPC-Cmd |
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
const range = (begin: number, end: number) => ([...Array(end - begin)].map((_, i) => (begin + i))) |
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
defmodule Zip do | |
@moduledoc """ | |
Easy ZIP creator | |
you need to install zstream: | |
``` | |
{:zstream, "~> 0.6"} | |
``` | |
""" |
NewerOlder