Skip to content

Instantly share code, notes, and snippets.

@shoya140
shoya140 / setup-python-on-m1-mac.md
Last active August 28, 2021 21:22
Install TensorFlow on Mac with Apple Silicon

Install asdf

$ git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.8.1
$ echo ". $HOME/.asdf/asdf.sh\nfpath=(${ASDF_DIR}/completions $fpath)\nautoload -Uz compinit && compinit" >> "~/.zshrc"
$ source ~/.bashrc

Install miniforge python

@shoya140
shoya140 / profiles.json
Created September 25, 2019 17:37
Profile for Git Bash on WindowsTerminal
{
"globals" :
{
"alwaysShowTabs" : true,
"defaultProfile" : "{bf17bf33-d2ce-489c-9904-4fb4619ff579}",
"initialCols" : 120,
"initialRows" : 30,
"keybindings" :
[
{
@shoya140
shoya140 / install_python.md
Last active August 9, 2018 10:33
macOSにPythonの環境を構築する方法

Install Homebrew

$ xcode-select --install
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install Miniconda

$ brew install Caskroom/cask/miniconda
$ echo PATH="/usr/local/miniconda3/bin:$PATH" >> ~/.bash_profile
@shoya140
shoya140 / main.tex
Last active July 13, 2018 11:43
SIGCHI Formatで左下のcopyrightをテキストで埋めるには
%以下を\begin{document}の前に入れる
\makeatletter
\def\@copyrightspace{\relax}
\makeatother
## This file is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of
## the License, or (at your option) any later version.
## This file is distributed in the hope that it will be
## useful, but WITHOUT ANY WARRANTY; without even the implied
## warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
## PURPOSE. See the GNU General Public License for more details.
@shoya140
shoya140 / style.less
Created May 2, 2018 07:51
Adding padding-top to Zen mode in Atom
[data-zen="true"] atom-text-editor:not(.mini) {
div.scroll-view {
padding-top: 60px;
}
div.gutter-container {
padding-top: 60px;
}
}
$('#save-button').on('click', function () {
const data = [
['name', document.getElementById('name-input').value],
['email', document.getElementById('email-input').value],
['age', document.getElementById('age-input').value]
]
var csv = 'id,value'
data.forEach(function(row) {
csv += '\n'
const electron = require('electron')
// Module to control application life.
const app = electron.app
// Module to create native browser window.
const BrowserWindow = electron.BrowserWindow
const path = require('path')
const url = require('url')
// Keep a global reference of the window object, if you don't, the window will
alias open='cygstart'
export WIN_HOME=/c/Users/Shoya
export PATH=$WIN_HOME/Miniconda3:$PATH
export PATH=$WIN_HOME/Miniconda3/Scripts/:$PATH
export PATH=$WIN_HOME/Miniconda3/Library/bin:$PATH
export PATH=/c/Program\ Files/nodejs:$PATH
export PATH=$WIN_HOME/AppData/Roaming/npm:$PATH
# optional
@shoya140
shoya140 / gist:1c081c6e429168aaeb8f
Last active June 27, 2016 15:05
Mac設定(簡易版)

Finder設定

階層表示 参考

不可視ファイルを表示

defaults write com.apple.finder AppleShowAllFiles true

フォルダを英語名に 参考