Skip to content

Instantly share code, notes, and snippets.

View ryochin's full-sized avatar
🏠
Working at home

Ryo Okamoto ryochin

🏠
Working at home
View GitHub Profile
@tommmyy
tommmyy / ramdaDebounce.js
Last active October 19, 2023 15:14
Debounce function using Ramda.js
import { curry, apply } from 'ramda';
/**
* Debounce
*
* @param {Boolean} immediate If true run `fn` at the start of the timeout
* @param timeMs {Number} Debounce timeout
* @param fn {Function} Function to debounce
*
* @return {Number} timeout
@naokirin
naokirin / Dockerコンテナ上のログ集約に関するまとめ.md
Last active August 5, 2023 18:41
Dockerコンテナ上のログ集約に関するまとめ

検討するための情報

Dockerコンテナ上のログを集約する方法

  • コンテナの内部で集約する
    • e.g. fluentd、rsyslog等を各コンテナ内に立てる
    • e.g. 単純にファイルに保存する
  • コンテナの外部で集約する
    • e.g. ホスト側にfluentd、rsyslog等を起動して、各コンテナがマウントしたログファイルをtail等で読む
  • e.g. ホスト側にマウントしてファイルに保存する
@damusix
damusix / aws_iam_secret_to_smtp_password.md
Last active October 24, 2024 06:12
Convert AWS IAM credentials to AWS SMTP credentials

Convert AWS IAM credentials to AWS SMTP credentials

If you do, or want to, use AWS to deploy your apps, you will end up using AWS SES via SMTP when you're launching an app that sends out emails of any kind (user registrations, email notifications, etc). For example, I have used this configuration on various Ruby on Rails apps, however, it is just basic SMTP configurations and crosses over to any framework that supports SMTP sendmail.

There are two ways to go about this:

Luckily, you found this MD file and the NOT SO EASY WAY is suddenly copy-pasta... sudo yum....

電源を入れたときにtty1を自動ログインする設定あれこれ集.md

CentOS

CentOS7 (systemd)

次のコマンドを実行

$ sudo systemctl edit getty@tty1

@msiemens
msiemens / pre-commit.sh
Last active February 26, 2017 02:33
My git pre-commit hook
#!/bin/bash
# Git pre-commit hook
#####################
#
# - check for whitespace problems (trailing spaces, ...)
# - check for lines with 'FIXME'
# - running tests
# - running code style check (pep8) on modified files
# - designed for Windows, for Linux replace `> NUL` with `> /dev/null`
@toolmantim
toolmantim / application.html.erb
Created February 16, 2013 11:26
Pre-fetching your Rails asset hostname using dns-prefetch in your application's layout file
<!DOCTYPE html>
<html>
<head>
<title>App title</title>
<% if ActionController::Base.asset_host %>
<link rel="dns-prefetch" href="//<%= ActionController::Base.asset_host %>" />
<% end %>