*Logger.log('message')
コンソールログ
throw('message')
flash alert的なポップアップSpreadsheetApp.getActiveSpreadsheet().toast('message')
Spreadsheet等の右側にポップアップメッセージBrowser.msgBox('hello world');
中央にポップアップメニュー + button。Browerクラスでは文字列入力などのポップアップも出せる
# config/initializers/webpack_dev_server.rb | |
if Rails.development? | |
Rails.application.config.middleware.use WebpackDevServerProxy, dev_server_host: "localhost:9000" | |
end |
``` | |
cannot load such file -- teamcity/spec/runner/formatter/teamcity/formatter (LoadError) | |
``` | |
* RubyMine (installed by toolbox) | |
* rbenv | |
# workaround | |
found `teamcity/spec/runner/formatter/teamcity/formatter.rb` under `~/Library/Application\ Support/JetBrains/Toolbox/apps/RubyMine/ch-0/191.7479.66/RubyMine.app/Contents/rb/testing/patch/bdd`. |
#!/bin/bash | |
# | |
# http://tech.naviplus.co.jp/2014/01/09/tmuxで複数サーバの同時オペレーション/ | |
# | |
if [ -n "$SESSION_NAME" ];then | |
session=$SESSION_NAME | |
else | |
session=multi-ssh-`date +%s` | |
fi |
javascript: (() => { | |
const e = document.querySelector('#gollum-editor-body'); | |
const re = /^(#+)\s*(.+)$/; | |
const beginToc = '<!-- BEGIN TOC -->'; | |
const endToc = '<!-- END TOC -->'; | |
const lists = e.textContent.split("\n").filter(line => re.test(line)).map((line) => { | |
const m = line.match(re); | |
const tag = m[1].replace(/#$/, '*').replace(/#/g, ' '); | |
const desc = m[2]; |
# Title: A Liquid tag for Jekyll sites that allows embedding image file on | |
# Instagram. | |
# Authors: Nobuhiro Nikushi https://twitter.com/#!/niku4i | |
# Description: Easily embed image file on Instagram page. | |
# | |
# Syntax {% instag [class name(s)] http://instagr.am/p/IYYs5bo0jd/ [width [height]] [title text | "title text" ["alt text"]] %} | |
# | |
# Examples: | |
# {% instag http://instagr.am/p/IYYs5bo0jd/ %} | |
# {% instag left half http://instagr.am/p/IYYs5bo0jd/ my title %} |
desc "Memory growth test" | |
task :mem_benchmark do | |
require 'testlib' | |
N = (ENV['N'] || 100_000).to_i | |
N.times do |i| | |
Testlib::do_something | |
if (i%10_000) == 0 | |
GC.start | |
ruby_mem = ObjectSpace.memsize_of_all / 1_000 |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
require 'logger' | |
module Logging | |
def self.prepended(base) | |
target_methods = base.instance_methods - Object.methods | |
target_methods.each do |method| | |
define_method(method) do |*args| | |
log.debug "[Start] #{base}##{method}" | |
ret = super(*args) | |
log.debug "[End] #{base}##{method}" |
<?xml version="1.0"?> | |
<root> | |
<appdef> | |
<appname>ATOM</appname> | |
<equal>com.github.atom</equal> | |
</appdef> | |
<list> | |
<item> | |
<name>Command_R to Control_L (TERMINAL ONLY)</name> | |
<only>TERMINAL</only> |