Giter VIP home page Giter VIP logo

toshimaru's Introduction

I'm Toshimaru 🙃

GitHub Badge Twitter Badge

📝 Blog

🔧 OSS

🧰 Web Tools

📊 Analytics

💓 Sponsorship

toshimaru's People

Contributors

toshimaru avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

toshimaru's Issues

sidekiq

  • start sidekiq
  • restart sidekiq
  • stop sidekiq

Google custom function `http request`

input: URL

output: Http Response Status Code

/**
 * Request and get response code
 * 
 * @param {String} given url 
 * @return {Integer} status code
 * @customfunction
 */
function HTTP_RESPONSE_CODE(url) {
  var response = UrlFetchApp.fetch(url);
  return response.getResponseCode();
}

Develop Hubot

Command Ides

  • ぬるぽ
  • ポルナレフ
  • Import from other repo (plugable?)

定時bot

お疲れさまー!!定時だよー!!カンカンカンカン!!カンカンカンカンカン!!定時だよ!!外暗い!!ねえねえ!!見て見て!!すごい!!外!!暗い!!!!カンカンカンカンカンカンカンカン!!カンカンカンカン!!帰るよー!!カンカンカン!!

Fix exception_notification

https://github.com/smartinez87/exception_notification

    def call(exception, options={})
      return if !active?

      message = "A new exception occurred: '#{exception.message}' on '#{exception.backtrace.first}'"
      @room.send(@from, message, @message_options)
    end
@backtrace = exception.backtrace || []
[2] pry(main)> exception = StandardError.new("error")
=> #<StandardError: error>
[3] pry(main)> message = "A new exception occurred: '#{exception.message}' on '#{exception.backtrace.first}'"
NoMethodError: undefined method `first' for nil:NilClass

ipstat on GoogleApp

Tech

  • PHP
  • GoogleAppEngine

outputs

  • whois info
  • request info

ip.toshimaru.net

Tidy up

  • Staff in the carboard
  • Clothes

[gem]HipChat wrapper

Easier HipChat notification gem.

  class Base
    def notify(user: 'HipChat', message: '', notify: false, color: 'green', format: 'text')
      hipchat_client.send(user, message, notify: notify, color: color, message_format: format)
    end

    def hipchat_client
      @hipchat ||= ::HipChat::Client.new(token)[room_id]
    end

    def token
      @token ||= Rails.application.secrets.hipchat_token
    end

    def room_id
      raise "No room_id set"
    end

    # The message body
    # Valid length range: 1 - 10000.
    def shorten_message(message)
      return message if message.length < 5_000
      message.slice!(0..5_000)
    end
  end

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.