- その面白そうな話、私も参加していいよね?なぜなら私は無条件に受け入れられているからおじさん(闖入おじさん) #おじさんパターン
- 後出し難癖おじさん #おじさんパターン
- 困難は成長のチャンス!だから君たちに成長の機会をあげようおじさん (成長おじさん) #おじさんパターン
- あらゆる事案に一般論コメントおじさん #おじさんパターン
- 俺ってあらゆることに精通してるじゃん?だから力になるよおじさん (精通おじさん) #おじさんパターン
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
# app/models/mymodel.rb | |
# include Tokenable | |
### | |
# app/models/concerns/tokenable.rb | |
module Tokenable | |
extend ActiveSupport::Concern | |
included do | |
before_create :generate_token | |
end |
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 ActiveAdmin | |
module Filters | |
module FormtasticAddons | |
def klass | |
@object.class | |
end | |
def polymorphic_foreign_type?(method) | |
false |
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
var io = require('socket.io-client'); | |
var connection = process.env.LATENCY_CONNECTION || 100; | |
var host = process.env.LATENCY_HOST || 'localhost'; | |
var options = { | |
port: process.env.LATENCY_PORT || 3000, | |
'force new connection': true | |
}; | |
for (var i = 0; i < connection; i++) { | |
(function() { |
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
#!/bin/bash | |
## | |
# BlueNote Firewall Configuration | |
## | |
# ポリシーの決定 | |
/sbin/iptables -P INPUT DROP # 受信はすべて破棄 すべての穴をふさいでから必要なポートを空ける | |
/sbin/iptables -P OUTPUT ACCEPT #送信はすべて許可 | |
/sbin/iptables -P FORWARD DROP # 通過はすべて破棄 |