Skip to content

Instantly share code, notes, and snippets.

@osmszk
osmszk / .zshrc
Created June 17, 2021 23:41
m1macの rbenv初期化コマンド(.zshrc に書き込む)
# rbenv
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
@osmszk
osmszk / .zshrc
Last active May 8, 2021 23:51
miniforge3(@m1 Mac)の、condaの初期化コマンド(.zshrcに書き込むもの)
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('~/miniforge3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "~/miniforge3/etc/profile.d/conda.sh" ]; then
. "~/miniforge3/etc/profile.d/conda.sh"
else
export PATH="~/miniforge3/bin:$PATH"
@osmszk
osmszk / Javaの開発環境構築(インストール〜Hello Worldまで).md
Last active January 6, 2020 12:37
Javaの開発環境構築on Mac[2020年版]初学者向け

Javaの開発環境構築 インストール〜Hello Worldまで

環境

  • macOS Catalina 10.15.1
  • MacBook Pro 13inch メモリ16GB, SSD 2TB, CPU Core i7
  • JDK未インストール状態(java -version 叩くと、JDKをインストールしてください、と言われる)

アジェンダ

@osmszk
osmszk / 初学者向け環境構築うまくいかないときの対応.md
Created October 19, 2019 06:11
初学者向け環境構築うまくいかないときの対応

環境構築失敗したらやること

  • OSフォーマット(初期化)しましょう
    • 「Mac フォーマット」でぐぐる

初学者が一番やってはいけないこと

  • 最もやってはいけないこと: 「新しいOSにアップデート」
    • ネット上に情報がない。開発環境を揃えるのが重要。

Pythonの開発環境について

  • Python はMacにもとから入ってる。Python2.xでよければ、それをつかえばよし。仮想環境は初学者には難しい。慣れてからで良い。
@osmszk
osmszk / gist:4eb913f07db44b9f99546ec4e5c707e7
Created June 22, 2019 22:33
AI(ディープラーニング)プログラミング 開発環境構築
(0)前提
Macのバージョン確認
$ which brew
$ brew list
$ which pyenv
$ which conda
$ which python
$ python --version
$ which pip
@osmszk
osmszk / bashrc
Last active November 13, 2019 23:39
bashrc
alias ll='ls -laG'
alias rm='rm -i'
alias f="open ."
cdf () {
finderPath=`osascript -e 'tell application "Finder"
try
set currentFolder to (folder of the front window as alias)
on error
set currentFolder to (path to desktop folder as alias)
end try
#colab
# google-drive-ocamlfuseのインストール
# https://github.com/astrada/google-drive-ocamlfuse
!apt-get install -y -qq software-properties-common python-software-properties module-init-tools
!add-apt-repository -y ppa:alessandro-strada/ppa 2>&1 > /dev/null
!apt-get update -qq 2>&1 > /dev/null
!apt-get -y install -qq google-drive-ocamlfuse fuse
# Colab用のAuth token作成
from google.colab import auth
func printIntMaxValue() {
let maxInt16 = Int16.max
let maxInt32 = Int32.max
let maxInt64 = Int64.max
let maxUInt16 = UInt16.max
let maxUInt32 = UInt32.max
let maxUInt64 = UInt64.max
let maxInt = Int.max
Log.d("maxInt16 \(maxInt16)")
Log.d("maxInt32 \(maxInt32)")
@osmszk
osmszk / bashrc
Created April 5, 2015 03:46
bashrc
#commnd aliases
alias ll='ls -la'
case "${OSTYPE}" in
darwin*)
alias ls="ls -G"
alias ll="ls -laG"
alias la="ls -laG"
;;
linux*)
alias ls='ls --color'
@osmszk
osmszk / PlayMovie
Created April 5, 2015 01:49
Play Movie
@property (strong,nonatomic) MPMoviePlayerController *player;
- (void)viewDidLoad
{
NSURL *url = [NSURL URLWithString:@"http://www.gomplayer.jp/img/sample/mp4_h264_aac.mp4"];
MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:url];
player.controlStyle = MPMovieControlStyleNone;
self.player = player;
[[NSNotificationCenter defaultCenter] addObserver:self