Skip to content

Instantly share code, notes, and snippets.

chrome.action.onClicked.addListener((tab) => {
chrome.tabs.sendMessage(tab.id, { action: "summarizeAndShowModal" }, (response) => {
if (chrome.runtime.lastError) {
console.error("Error sending message:", chrome.runtime.lastError);
} else if (response && response.status === "received") {
console.log("Message received by content script");
}
});
});
@vexus2
vexus2 / import_and_export_firebase_auth.txt
Created February 18, 2019 07:01
2019-02-18_Firestoreリージョン移行に伴うFirebaseプロジェクト移行手順
$ firebase auth:export firebase-auth-users.json --format json --project 旧Firebaseプロジェクト
$ firebase auth:import firebase-auth-users.json --project 新Firebaseプロジェクト
@vexus2
vexus2 / bot2bot.coffee
Created April 20, 2015 08:41
Slack内で外部Bot/API経由の特定の発言を受け取って別のアクションを実行するスクリプト
# Description:
# 外部Bot/API経由の特定の発言を受け取って別のアクションを実行する
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
@vexus2
vexus2 / gist:7c36c33c206f96dd4bfd
Last active August 29, 2015 14:07
リモートワーク_マイクを選ぶときの観点
@vexus2
vexus2 / private.xml
Created August 8, 2014 01:38
Ctrl+P→手前のUnreadチャンネル、Ctrl+N→次のUnreadチャンネルに移動
<?xml version="1.0"?>
<root>
<appdef>
<appname>SLACK</appname>
<equal>com.tinyspeck.slackmacgap</equal>
</appdef>
<item>
<name>For Slack CTRL+N=move previous unread hannel, CTRL+P=move unread next channel</name>
<identifier>private.app_slack_move_channel_with_altn_altp</identifier>
<only>SLACK</only>
@vexus2
vexus2 / joke.coffee
Created June 4, 2014 02:11
"ぬるぽ"に反応してガッしてくれるHubotスクリプト Slack内での表示に最適化済
# Description:
# Joke commands.
#
# Commands:
# ぬるぽ - You reply with, "ガッ" When you post a "ぬるぽ" word.
#
# Notes:
# ネタ/ジョーク系のbot全般
module.exports = (robot) ->
@vexus2
vexus2 / gist:3f2d7eb8fd9b59b383d5
Created May 9, 2014 04:23
Update local ruby to 2.1.2
$ sudo brew update
$ sudo brew upgrade ruby-build
$ rbenv install 2.1.2
$ rbenv global 2.1.2
$ rbenv rehash
$ ruby --version
@vexus2
vexus2 / .pryrc
Created April 8, 2014 07:13
.pryrc
begin
require "awesome_print"
AwesomePrint.pry!
rescue LoadError => err
puts "no awesome_print :("
end
# hirbの設定
begin
require 'hirb'
@vexus2
vexus2 / send_pr_count_to_chatwork.rb
Last active August 29, 2015 13:56
特定リポジトリにたまっているPull Request数をChatWorkに通知
#!/usr/bin/env ruby
#-*- encoding: utf-8 -*-
require 'json'
require 'pit'
require 'time'
require 'net/https'
require 'octokit'
## get config from pit
@vexus2
vexus2 / contributor.java
Created November 21, 2013 04:32
completion contributor
@Override
public void fillCompletionVariants(CompletionParameters parameters, CompletionResultSet result) {
String arr$[] = new String[] {"foo", "bar"};
int len$ = arr$.length;
for (int i$ = 0; i$ < len$; i$++) {
String s = arr$[i$];
result.addElement(createDocTagLookup(false, s));
}