Skip to content

Instantly share code, notes, and snippets.

View inkdrop-toggle-sidebar.js
inkdrop.commands.add(document.body, "mycmd:toggle-distraction-free", () => {
const sidebar = document.querySelector(".sidebar-layout");
const notelist = document.querySelector(".note-list-bar-layout");
// toggle to min header
if (sidebar != null || notelist != null) {
if (sidebar != null) {
inkdrop.commands.dispatch(document.body, "view:toggle-distraction-free");
} else if (notelist != null) {
inkdrop.commands.dispatch(document.body, "view:toggle-distraction-free");
@basyura
basyura / gist:6cac94a9dbdf4c2b917916b279de0260
Last active Sep 16, 2019
VBA のコードを書き換えるやつ
View gist:6cac94a9dbdf4c2b917916b279de0260
' 事前準備
' https://hake.hatenablog.com/entry/20170812/p1
' 更新用マクロを動作させるExcelで以下の設定を行う
' ファイル
' →オプション
' →セキュリティセンター
' →セキュリティセンターの設定
' →マクロの設定
' →VBAプロジェクトオブジェクトモデルへのアクセスを信頼する。にチェック
@basyura
basyura / keyhack.config.py
Last active Sep 8, 2017
keyhack.config.py
View keyhack.config.py
import sys
import os
import datetime
import pyauto
from keyhac import *
def configure(keymap):
View cvimrc
let locale = "jp"
let barposition = "bottom"
let hintcharacters = "asdfghjkl"
let searchlimit = 5
set noautofocus
set cncpcompletion
set nohud
unmap s u o yy yY yh yA y i v V x X
iunmap <C-o> <C-u> <C-y> <C-k>
map <C-d> scrollPageDown
View WPF_Button_Image.xaml
<Window x:Class="WPF_LayoutTest.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525"
Icon="BuildSolution_104.png"
>
<Window.Resources>
<ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
<Border Name="ButtonTemplate_Border" Padding="2">
<ContentPresenter />
View Vim_2015-12-12-104407_xxxxx-no-MacBook-Pro.crash
Process: Vim [1643]
Path: /Applications/MacVim.app/Contents/MacOS/Vim
Identifier: Vim
Version: 0
Code Type: X86-64 (Native)
Parent Process: zsh [528]
Responsible: Terminal [217]
User ID: 501
Date/Time: 2015-12-12 10:44:04.707 +0900
@basyura
basyura / FindCmdForm.xla.diff
Last active Aug 2, 2016
VimExcel - FindCmdForm
View FindCmdForm.xla.diff
Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
- If lang_mode = True Then
+ If lang_mode = "jp" Then
TextBox1.IMEMode = fmIMEModeHiragana
Else
View vimproc fixed back quote
diff --git a/autoload/vimproc/parser.vim b/autoload/vimproc/parser.vim
index b1965ad..dcd65e8 100644
--- a/autoload/vimproc/parser.vim
+++ b/autoload/vimproc/parser.vim
@@ -779,7 +779,7 @@ function! s:parse_double_quote(script, i) "{{{
elseif has_key(escape_sequences, script[i])
let arg .= escape_sequences[script[i]]
else
- let arg .= '\' . script[i]
+ let arg .= script[i]
View delete_kindle_item.user.js
// ==UserScript==
// @name delete kindle item
// @namespace basyura@gmail.com
// @include https://www.amazon.com/gp/digital/fiona/manage*
// @include https://www.amazon.co.jp/gp/digital/fiona/manage*
// @version 1
// ==/UserScript==
jQuery('<button id="delete_all_item" style="margin-left:10px;">delete all</button>').insertAfter('#searchTextGoButton');
View gist:2862951
function! s:source.get_keyword_pos(cur_text)
let col = col('.')
let pos = 0
while 1
let idx = stridx(a:cur_text, '@', pos + 1)
if idx == -1 || idx >= col
break
endif
let pos = idx