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! TransRange() range | |
| let texts = [] | |
| for n in range(a:firstline, a:lastline) | |
| let line = getline(n) | |
| call substitute(line, '\n\+$', ' ', '') | |
| call add(texts, line) | |
| endfor | |
| 10new | put!=translategoogle#command(join(texts)) | |
| endfunction |
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
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # | |
| # Imperial | |
| # ====== | |
| # Copyright (C) 2015 FTG-Reversal | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at |
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
| #include <TimerOne.h> | |
| /** | |
| * デバッグ出力の切り替え | |
| */ | |
| #define DEBUG_MODE 0 | |
| /** | |
| * 最大入力受付数 | |
| */ |
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
| { | |
| "title": "Switch Option to Meta in Terminal and alacritty", | |
| "rules": [ | |
| { | |
| "description": "Switch Option to Meta in Terminal and alacritty", | |
| "manipulators": | |
| <%= | |
| TerminalKeys = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"] | |
| each_key( | |
| source_keys_list: TerminalKeys, |
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
| const fs = require("fs"); | |
| const { TypescriptParser } = require("typescript-parser"); | |
| function printWord(parsed) { | |
| for (let usage of parsed.usages) { | |
| console.log(usage); | |
| } | |
| for (let declaration of parsed.declarations) { | |
| if (declaration.name) { | |
| console.log(declaration.name); |
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
| import axios from "axios" | |
| import { Dispatch } from "redux" | |
| import actionCreatorFactory from "typescript-fsa" | |
| import { reducerWithInitialState } from "typescript-fsa-reducers" | |
| import { asyncFactory } from "typescript-fsa-redux-thunk" | |
| import Cookies from "js-cookie" | |
| export type UserState = { | |
| accessToken: string | |
| loggingIn: boolean |
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
| import axios from "axios" | |
| import { Reducer, Dispatch } from "redux" | |
| import Cookies from "js-cookie" | |
| export type UserState = { | |
| accessToken: string | |
| loggingIn: boolean | |
| error: string | |
| } |
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 | |
| require 'gruff' | |
| def calc_score(start_day, stop = 1000) | |
| score = [] | |
| card = 0 | |
| 0.step(1000, 20) do |day| | |
| card += 6 if start_day < day && day < stop |
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
| FZF_GH_PR_EXTRA_ARG=${FZF_GH_PR_EXTRA_ARG:-''} | |
| FZF_GH_PR_BINDKEY=${FZF_GH_PR_BINDKEY:-'^x^p^r'} | |
| function fzf-gh-pr-selection() { | |
| local out pr key fzf_command command | |
| pr_list_command='gh pr list' | |
| fzf_command='fzf --query "$LBUFFER" --prompt="Pull Request> " --preview="gh pr view {1}" --expect=ctrl-o,ctrl-c' | |
| command="$pr_list_command | $fzf_command" |
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 fzf-translate() { | |
| local out snippet key file candidate fzf_command command | |
| fzf_command="fzf --multi --phony --print-query --expect=ctrl-m,ctrl-q --bind=\"change:reload:echo '{q}' | nextword | tr ' ' '\n' | xargs -I WORD echo 'WORD' \" --preview='google-trans {q}'" | |
| IFS=$'\n' out=$(eval "echo '' | ${fzf_command}") | |
| while true; do | |
| query=$(echo "$out" | head -1) | |
| key=$(echo "$out" | head -2 | tail -1) |