Skip to content

Instantly share code, notes, and snippets.

View hidakatsuya's full-sized avatar
🏡
Working from home

Katsuya HIDAKA hidakatsuya

🏡
Working from home
View GitHub Profile
@robzolkos
robzolkos / Dockerfile
Last active March 2, 2024 20:59
Kamal / SQLite3 issue
# syntax = docker/dockerfile:1
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile
ARG RUBY_VERSION=3.2.2
FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim as base
# Rails app lives here
WORKDIR /rails
# Set production environment
@mpppk
mpppk / clean_architecture.md
Last active April 30, 2024 14:19
クリーンアーキテクチャ完全に理解した

2020/5/31追記: 自分用のメモに書いていたつもりだったのですが、たくさんのスターを頂けてとても嬉しいです。
と同時に、書きかけで中途半端な状態のドキュメントをご覧いただくことになっており、大変心苦しく思っています。

このドキュメントを完成させるために、今後以下のような更新を予定しています。

  • TODO部分を埋める
  • 書籍を基にした理論・原則パートと、実装例パートを分割
    • 現在は4層のレイヤそれぞれごとに原則の確認→実装時の課題リスト→実装例という構成ですが、同じリポジトリへの言及箇所がバラバラになってしまう問題がありました。更新後は、実装時の課題リストを全て洗い出した後にまとめて実装を確認する構成とする予定です。

2021/1/22追記:

@voluntas
voluntas / react.rst
Last active May 25, 2022 11:57
React コトハジメ

React コトハジメ

日時

2017-01-02

@voluntas

バージョン

2.1.0

URL

https://voluntas.githu.io/

突っ込みは Twitter @voluntas まで。

@wakamsha
wakamsha / memo.md
Last active October 11, 2021 01:40
VirtualBox 内のゲスト OS からホスト OS にアクセスしたい

VirtualBox仮想マシンのネットワークはデフォルトでNATとなっている。 VirtualBox の場合、NAT ネットワークアダプタには 10.0.2.0/24 の IP アドレスが割り当てられ、ゲスト OS から見える ホスト OS の IP アドレスには 10.0.2.2 が設定される仕様。

したがってホストOS上に建てたサーバーにゲストOSからアクセスしたい場合は、http://10.0.2.2とアクセスすれば普通に見ることができる。

参考

@thelibrarian
thelibrarian / Fixing XCode Command Line Tools.md
Last active November 6, 2017 03:28
How to fix compile errors with the XCode command line tools on Mac OS X. Solves problems such as failing to find Framework header files (e.g. ruby.h).

The Problem

If you have installed the standalone Command Line Tools for XCode on your Mac (i.e. without having XCode.app installed), some of these tools can get a bit confused due to a couple of oversights on Apple's part in finalising the setup.

Note: all commands below will need to be run from an Administrator account, or by an account with appropriate permission in /etc/sudoers.

The Solution

1. Failing to Find Frameworks

Sometime when compiling against the preinstalled Frameworks (e.g. Ruby or Python), various tools will inexplicable fail to find header files that are quite clearly there. This is caused by the fact that no XCode has been selected for the command-line tools. Wait, I hear you cry, I don't have XCode installed! Indeed, but you nonetheless need to select one, and point it somewhere where the command line tools exist, like so

@hayajo
hayajo / changelog_en.md
Last active April 16, 2024 12:57
ChangeLog を支える英語

ChangeLog を支える英語

ChangeLog を書く際によく使われる英語をまとめました。

ほとんど引用です。

基本形

@moro
moro / unit_test_spec.rb
Created September 19, 2012 02:31
unit_test_spec.rb
class A
def foo(num)
%w[one two three][num - 1]
end
end
describe A do
describe "#foo" do
RSpec::Matchers.define :do_foo do |args|
match do |instance|
@Gab-km
Gab-km / github-flow.ja.md
Last active April 25, 2024 04:01 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@Mithrandir0x
Mithrandir0x / gist:3639232
Created September 5, 2012 16:15
Difference between Service, Factory and Provider in AngularJS
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
@shugo
shugo / fizzi.rb
Created August 10, 2012 04:45
@yhara こんな感じ
module FizzBuzzInteger
refine Fixnum do
def to_s
self % 15 == 0 ? "FizzBuzz" :
self % 5 == 0 ? "Fizz" :
self % 3 == 0 ? "Buzz" :
super
end
end
end