Skip to content

Instantly share code, notes, and snippets.

import { IpcMessageEvent, ipcRenderer } from 'electron'
import { Channel, eventChannel, SagaIterator } from 'redux-saga';
import { apply, call, fork, put, take } from 'redux-saga/effects';
import { ActionCreator } from 'typescript-fsa'
function createIpcChannel(action: ActionCreator<any>): Channel<{}> {
return eventChannel(emit => {
ipcRenderer.on(action.type, (_event: IpcMessageEvent, payload: any) => {
emit(payload);
FROM ruby:2.5-alpine
WORKDIR /app
COPY . /app
RUN bundle install
ENV APP_ENV production
EXPOSE 8080
web: bin/hubot -a slack
@kechol
kechol / _README.md
Created January 13, 2018 04:52
Configuration for broadlink-rm-server on Raspberry Pi
#!/usr/bin/env ruby
require "yaml"
require "open-uri"
d = Date.today; h = YAML.load_file(open("https://raw.githubusercontent.com/holiday-jp/holiday_jp/master/holidays.yml")).keys
exit (1..5).include?(d.wday) && !h.include?(d) ? 0 : 1
#!/usr/bin/env ruby
repos = %w(
dotfiles
)
authors = %w(
kechol
)
@kechol
kechol / anyframe-source-git-ls-tree
Created August 5, 2017 17:28
anyframe git ls-tree
# anyframe-source-git-ls-tree
git ls-tree -r --name-only HEAD
# Local Variables:
# mode: Shell-Script
# End:
# vim: ft=zsh
@kechol
kechol / ghq-projects.rb
Last active July 10, 2017 03:33
Generate projects.cson from `ghq list` for Atom project-manager plugin
#!/usr/bin/env ruby
require 'json'
cson = []
del = '/'
begin
ghqlist = `ghq list --full-path`
ghqroot = File.expand_path(`git config --get ghq.root` || '~/.ghq').strip
rescue => e
function __ssh_peco_ctrl_s -d 'Select hosts from ssh config'
grep 'Host ' ~/.ssh/config | awk '{print $2}' | peco | read host
[ -n "$host" ]; and ssh $host
commandline -f repaint
end
function __git_branch_peco_ctrl_b -d 'Select branch and checkout'
git branch | awk '{print $2}' | peco | read branch
[ -n "$branch" ]; and git checkout $branch
commandline -f repaint