Skip to content

Instantly share code, notes, and snippets.

View YutoMizutani's full-sized avatar

Yuto Mizutani YutoMizutani

View GitHub Profile
@YutoMizutani
YutoMizutani / file0.swift
Created June 24, 2018 12:49
CGImageは画像の向きを保持していない ref: https://qiita.com/YutoMizutani/items/de6c0f2200bdbab10624
let uiImage = UIImage()
let cgImage = uiImage.cgImage
@YutoMizutani
YutoMizutani / file0.sh
Last active December 20, 2019 04:02
pyenvでPythonの最新安定版をインストールするワンライナー ref: https://qiita.com/YutoMizutani/items/ebee5c107b216b03a130
$ pyenv install -l | grep -v '[a-zA-Z]' | grep -e '\s2\.?*' | tail -1
@YutoMizutani
YutoMizutani / file0.sh
Last active June 5, 2018 04:05
配列内のパッケージをOS問わず自動でインストールするShellScript ref: https://qiita.com/YutoMizutani/items/bb98e27c0c52d5053ff4
#!/bin/bash
# 必要なパッケージ名; ()内を変更する。
required=(foo bar)
# パッケージマネージャ一覧
pm=(brew apt yum port pacman)
# パッケージごとにチェック
for r in ${required[@]}; do
# パッケージが存在しなければインストールする
@YutoMizutani
YutoMizutani / file0.txt
Created June 2, 2018 16:15
Raspberry Pi 3にUSB無線LANアダプタを接続し,インターネット接続を維持しつつアドホック通信を行う ref: https://qiita.com/YutoMizutani/items/a74af25c856a14d9fd0b
pi@~ $ cat /proc/cpuinfo
Hardware : BCM2835
Revision : a22082
pi@~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
class Main {
class func say() {
print("Hello, world!!")
}
}
Main.say()
https://qiita.com/CirocMK2/items/8929a67a3cd7223fb90c
http://archlinux-blogger.blogspot.jp/2014/11/pacman-arch-linux-pacman.html
http://note.kurodigi.com/post-0-21/
https://www.reddit.com/r/archlinux/comments/69r15f/xorgserverutils_removed/
https://blanktar.jp/blog/2013/02/startx-timeout_in_locking.html
http://futurismo.biz/archives/2488
http://cotaro-science.blogspot.jp/2016/02/ttf-ricty.html
https://kashimiaring.wordpress.com/2017/03/08/arch%E3%82%92%E5%86%8D%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E5%82%99%E5%BF%98%E9%8C%B2/
@YutoMizutani
YutoMizutani / Git emoji
Created April 15, 2018 13:02
An agreement of a commit message with emoji
💎 :gem: Release バージョン更新
✨ :sparkles: 部分的な機能追加
🎉 :tada: 盛大に祝うべき大きな機能追加
🎨 :art: when improving the format/structure of the code コードの書式/構造を「改善」するとき
📁 :file_folder: when adding source files without codes (e.g. images, musics) コード以外のファイルを追加したとき
🐎 :racehorse: when improving performance パフォーマンスを向上させるとき
🚱 :non-potable_water: when plugging memory leaks メモリリークを塞ぐとき
😡 :rage: when breaking codes 破壊されているコードをあげるとき
#
# Executes commands at the start of an interactive session.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Source Prezto.
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
@YutoMizutani
YutoMizutani / file0.swift
Last active March 19, 2018 05:27
RxBluetoothKit 5.0.0 (was 4.0.2) 変更点 ref: https://qiita.com/YutoMizutani/items/c2e104918b15987f8491
// Before ver_4.0.2
private let state: BluetoothManager
// After ver_5.0.0
private let state: CentralManager