Skip to content

Instantly share code, notes, and snippets.

View hjmr's full-sized avatar

Hajime Murao hjmr

View GitHub Profile

[Emacs] Search words and show results in EWW

A setting to enable search words in a region when the region is specified or a word at the point when the region is not specified. Results are displayed in EWW-mode which enables to do everything inside Emacs.

(setq eww-search-prefix "https://www.google.co.jp/search?btnI&q=")
;;
(defun my-eww-search--words (words)
  "search web search engine for word on cursor."

(let ((search_words (read-from-minibuffer "EWW search for: " words)))

[Emacs] Tabbar group handling

Requires 'tabbar.el'.

'Ctrl-C Ctrl-Tab' works as pressing the home button which shows groups in tabbar. The following key sequences 'Ctrl-Tab' and 'Ctrl-Shift-Tab' enable to move through groups forward and backward respectively. After a predefined period (3 seconds by default) the tabbar recovers to the normal mode.

(defvar my-tabbar-show-group-timer nil)
@hjmr
hjmr / pyproject.toml
Created March 2, 2020 13:13
A problematic pyproject.toml for Poetry
[tool.poetry]
name = "word2vec"
version = "0.1.0"
description = ""
authors = ["hjmr <2620990+hjmr@users.noreply.github.com>"]
[tool.poetry.dependencies]
python = "^3.7"
scikit-learn = "^0.22.2"
matplotlib = "^3.1.3"

CLI(Command-Line Interface)

CLIのためのアプリケーション

Gitを使いこなそうとするならば,macOSでは「ターミナル.app」,Windowsでは「コマンドプロンプト」などのアプリケーションを利用して,まず,コマンドライン(テキスト入力)でコンピュータを操作する方法を覚えておこう。こういったコンピュータの操作方法のことを CLI(Command-Line Interface) という。また,「ターミナル.app」や「コマンドプロンプト」など,CLI用のアプリケーションのことを ターミナルソフト などという。

基本的なCLIコマンド

CLIで利用できるコマンドは枚挙にいとまがないが,とりあえず以下のコマンドが利用できれば Git の利用ができる(と思う)。

@hjmr
hjmr / pyproject.toml
Created December 6, 2021 13:43
possible bug in python-poetry
[tool.poetry]
name = "tf-metal"
version = "0.1.0"
description = ""
authors = [""]
[tool.poetry.dependencies]
python = ">=3.9,<3.10"
[tool.poetry.dev-dependencies]