Skip to content

Instantly share code, notes, and snippets.

@ishidur
ishidur / vscode-remote-dev-docker.md
Last active July 21, 2019 07:34
Dockerを使ってVSCodeでRemote Developmentをする

Developing inside a Container

これをやりたかった. https://code.visualstudio.com/docs/remote/containers?origin_team=TJ8BCJSSG

なぜか

現在,macOS(個人用PC)とWindowsの両方で開発を行っている. その際に,設定の違いやファイルパスの記述法の違いなどいろいろと面倒が生じる, そのため,どちらのOSでもLinuxのContainerを作ってContainer上でプログラムを実行するようしたいなと思った.
あと,最近話題になっているので,触ってみたかった.

手順(Windows)

  1. Docker IDを取得
@ishidur
ishidur / clang-format-setup.md
Last active July 12, 2020 03:54
clang-formatの設定 #windows

clang-formatを使ってC++のコードを自動で整形させる

なぜ自動整形する必要があるのか

  • コードを見やすくすることができる.
  • 書き方を統一することができる.
  • 毎回コミット前にformatする習慣をつけることで,無意味な変更がログに乗らなくなるのでlogを汚さずに済む

Setup

  1. LLVM Clangをインストールする
  2. http://releases.llvm.org/download.html より,Pre-Built BinariesのWindows(64-bit)版をダウンロードする.
  3. ダウンロードしたインストーラを実行し,インストールを行う.(LVVMをsystem PATHに追加すること)
@ishidur
ishidur / cmake-opengl.md
Last active October 16, 2024 07:53
CmakeでOpenGLを使えるようにする #windows

CmakeでOpenGLを使えるようにする(Windows 10)

CLionでOpenGLを使ったプログラムを作成したい.でもfind_packageしても見つからない...
調べたらやり方について説明してあるyoutubeの解説動画があったので手順をメモ. 参考:https://youtu.be/AUFZnA3lW_Q

前提

MinGWをインストール済みであること.

手順

  1. Martin Payne's Windows binaries (MSVC and MinGW) からfreeglut MinGW Package(私の場合は3.0.0)をダウンロードそして展開.
@ishidur
ishidur / average_test.py
Last active January 8, 2019 11:24
局所的な平均化を繰り返すことで全体の平均値に収束するかの実験 #code
from functools import reduce
import random
import numpy as np
import matplotlib.pyplot as plt
print(plt.style.available)
plt.style.use('fivethirtyeight')
threshold = 0.8
@ishidur
ishidur / git-update.md
Created October 16, 2018 23:40
Gitのupdateコマンド #shell #git #windows

updating git for windows

git update-git-for-windows
@ishidur
ishidur / .travis.yml
Last active May 8, 2019 08:22
Travis CIでGoogle Testを実行するための設定
language: cpp
sudo: false
matrix:
include:
# works on Precise and Trusty
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
@ishidur
ishidur / latex_mac.md
Last active September 11, 2018 03:31
macOSでLatex環境を設定する #settings #macos
@ishidur
ishidur / dict_nonecheck.py
Last active September 8, 2018 16:11
PythonでDictionary型のValueにnoneがないかを判定 #code
def NoneCheckDict(dictionary):
return list(map(lambda key: ('parameter \'%s\' is None' % key),
filter(lambda key: dictionary[key] is None, dictionary.keys())))
if __name__ == '__main__':
# non None value
params = {
'aaa': 111,
'bbb': 222,
@ishidur
ishidur / mykeymap.md
Last active September 11, 2018 05:27
Windowsのキーマップについて #settings #windows

Windowsのキーマップについて

CtrlとCapsLockを入れ替える

remapkey.exeを使いレジストリを入れ替える

  • remapkey.exeはWindows Server 2003 Resource Kit Toolsに含まれるソフトウェア
  • 管理者権限にて起動する必要がある
  • AutoHotKeyでは入れ替えがうまく出来ない
  • You can get Windows Server 2003 Resource Kit Tools from here

AutoHotKeyについて