Skip to content

Instantly share code, notes, and snippets.

View peco8's full-sized avatar
💭
Where's my Boy Bawang?

Toshiki Inami peco8

💭
Where's my Boy Bawang?
  • Rakuten, Inc
  • Tokyo
View GitHub Profile
@yuya-takeyama
yuya-takeyama / README.md
Last active January 14, 2023 11:15
DevOps な組織で Monorepo から Argo CD を使って Kubernetes にデプロイする仕組みの草案

概要

image

前提条件

  • アプリケーションは Mono Repo 上にサブディレクトリとして数十ほど存在
  • 各アプリケーションは独立してリリース可能とする
    • そのためにリリースブランチ等には */release といった形でそのアプリケーションの名前を持つ
  • 開発チームは self-contained な DevOps チームへの変化を目指している

sysctlで設定可能な項目について調査した内容。

@ozzozz
ozzozz / about_cf-ssh.md
Last active February 28, 2020 10:50
cf ssh コマンドについて

cf ssh コマンドについて

この記事は、Cloud Foundry Advent Calendar 2017の10日目の記事です。

アプリケーションコンテナの中にSSHしたいだと?

Cloud Foundryがユーザとして想定している人たちって、どういう人達なのでしょう。

それはやっぱり、このAdvent Calender1日目で @jacopen さんがKubernetesとの使い分けの中で言及していたように、あくまでも アプリケーション開発をしており、それの運用を楽にしたいということでプラットフォームを選ぶ ような人なのです。 そういう人って、以下のような考え方が強いんじゃないですかね。

@Amit-PivotalLabs
Amit-PivotalLabs / bosh-links-why-and-how.md
Last active December 10, 2021 21:33
BOSH Links: Why and How
@dorelljames
dorelljames / laravel-nginx-config-make-http-exception-url-and-make-all-others-https.md
Last active December 18, 2023 10:05
Laravel nginx config to redirect all requests to https and an exception URL that can still be accessible via http

Pre-condition

One day in your Laravel app, you were required to redirect all http requests to https but need to make a certain URL route accessible via http for a certain reason; perhaps a portion of your javascript code needs to redirect to http URL but it can't because redirection to secure URL to insecure is prohibited. Therefore, in cases like this, you need to just allow just one URL to make an http connection.

NOTE: There are obvious security implications here so don't just follow this blindly and understand if this is really the solution you're looking for. The nginx config can somehow be improved, I just don't have the time yet. It sure do look redundant.

Understanding and examples

  • Redirect everything from http to https
@icy
icy / expand.rb.md
Last active March 6, 2019 14:20
Bash-liked Curly Brace Expansion in ruby

System-call method

Use Bash to expand the brace. If you don't like this, you may look at more professional way at https://gist.github.com/ewoodh2o/3829405 This method invokes a system call to ask Bash to expand.

FIXME: This is not secure!!!

class String
@azu
azu / js.md
Last active December 28, 2021 07:19
JavaScriptのレベル別書籍のまとめ

前提: 完成していて、比較的支持を集めていて、JavaScriptを中心にした書籍 (DOM APIよりは言語を中心とした内容)

追記: JavaScriptの入門書 #jsprimerを書いている

最初からES2015で学ぶことを前提にした初心者〜中級者向けのJavaScript本がなかったので書いてる。 ES2015でJavaScriptという言語のコア部分は大きく変わったので、それを前提とした内容にする予定。

@solnic
solnic / am_dry_validation_1.rb
Last active May 21, 2022 13:42
dry-validation vs activemodel
require 'benchmark/ips'
require 'active_model'
require 'virtus'
require 'dry-validation'
require 'dry/validation/schema/form'
class User
include ActiveModel::Validations
include Virtus.model
@francisco-rojas
francisco-rojas / ruby_splat.rb
Last active January 12, 2019 04:23
Ruby Splat Operator
# https://gist.github.com/francisco-rojas/db0fb04ed6aa509acc18
# https://dev.firmafon.dk/blog/drat-ruby-has-a-double-splat/
# http://blog.simplificator.com/2015/03/20/ruby-and-the-double-splat-operator/
# http://chriszetter.com/blog/2012/11/02/keyword-arguments-in-ruby-2-dot-0/
# ------------------------------------------------------Method Definition-----------------------------------------------------
puts "\n---Method Definition---\n"
def say(what, *people)
people.each { |person| puts "#{person}: #{what}" }
end
say "Hello!", "Alice", "Bob", "Carl"