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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Vue-cross</title> | |
| <!-- Required meta tags --> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
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
| =begin | |
| ## ruby-ldap-auth-sample | |
| RubyでLDAP認証するサンプルコード。 | |
| ### setup | |
| Kitematicで実行すると楽。 | |
| 設定値は特に変更していない。 |
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
| # frozen_string_literal: true | |
| source "https://rubygems.org" | |
| # gem "rails" | |
| gem "awesome_print" | |
| gem "wrk_parser", git: "https://github.com/jacoyutorius/wrk_parser.git" |
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
| module Monitoring | |
| module Command | |
| class Uptime | |
| def exec | |
| parsed = parse_uptime | |
| # only over v2.4 | |
| # puts parsed.named_captures.to_json | |
| # ~v2.3 |
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
| require "rspec" | |
| require "pry" | |
| class HamamatsuEventCalendar | |
| def parse text | |
| ret = text.match(/(?<year>(\d*))年(?<month>(\d*))月(?<day>(\d*))日/) | |
| Date.new(ret[:year].to_i, ret[:month].to_i, ret[:day].to_i) | |
| rescue | |
| nil | |
| 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
| module Ruboty | |
| module Handlers | |
| class RamenPolice < Base | |
| on(/.*(hi|profile|名前|自己紹介|).*/, name: :profile, description: "名乗る") | |
| on(/.*(麺|めん|面|免|綿).*/, name: :examine, description: "ラーメン食べたか聞いてくる ", all: true) | |
| on(/.*(rand|random).*/, name: :random, description: "ランダムにラーメン店を教える") | |
| on(/.*map*./, name: :map, description: "地図") | |
| def profile message | |
| message.reply("ラーメン警察です") |
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
| function ParamParser(){ | |
| var search_params = decodeURI(window.location.search); | |
| if(search_params == ""){ | |
| return {}; | |
| } | |
| // 検索パラメータの冒頭の"?"を削除 | |
| if(search_params[0] == "?"){ | |
| search_params = search_params.substr(1); | |
| } |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Click Counter</title> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.6/react.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.6/react-dom.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.23/browser.min.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> | |
| <style media="screen"> |
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
| # 保存するログを格納しているディレクトリへのパス | |
| target_dir_path = [ | |
| "/var/log/httpd", | |
| "/var/log/mysql", | |
| "/var/log/messages" | |
| ] | |
| target_file_path = [ | |
| "/var/log/lastlog", | |
| "/var/log/maillog"," | |
| ""/var/log/yum-log", |
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
| before_save do | |
| self.closed = false | |
| self | |
| end |