Skip to content

Instantly share code, notes, and snippets.

View toruuetani's full-sized avatar

Toru Uetani toruuetani

View GitHub Profile
@toruuetani
toruuetani / gist:10101751
Created April 8, 2014 08:29
PowerShell V2 でネットワークアダプター名を変更する
Get-WmiObject -Class Win32_NetworkAdapter -Filter "NetConnectionID = 'ローカル エリア接続'" | %{
$_.NetConnectionID = 'Connection2'
$_.Put()
}
@toruuetani
toruuetani / gist:10101784
Created April 8, 2014 08:30
バッチファイルから PowerShell スクリプトを起動する。
@powershell -NoProfile -ExecutionPolicy unrestricted -File "path/to/powershell.ps1"
@toruuetani
toruuetani / gist:10219003
Last active August 29, 2015 13:58
Vagrant で起動したゲスト Windows に WinRM で接続する
winrm -r:127.0.0.1:15985 -u:vagrant -p:vagrant [COMMAND]
@toruuetani
toruuetani / gist:26786ed316a6f3a0962d
Last active August 29, 2015 14:01
rubyinstaller-2.0.0-p481 で fluentd -c fluent.conf -vv したときのエラーログ
* rubyinstaller-2.0.0-p481 を `C:\Ruby` にインストール
* DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe を解凍して、 ruby dk.rb init -> ruby dk.rb install
* gem install fluentd-0.10.42.gem
この時点の `C:\Ruby\lib\ruby\gems\2.0.0\gems` は以下の通り。
* cool.io-1.2.3-x86-mingw32
* ffi-1.9.3-x86-mingw32
* fluentd-0.10.42
* http_parser.rb-0.5.3-x86-mingw32
* msgpack-0.5.8-x86-mingw32
* rake-0.9.6
@toruuetani
toruuetani / gist:69552f805b4ea1397abc
Last active August 29, 2015 14:03
Vagrantについて調べること
@toruuetani
toruuetani / gist:10227e933024471a6679
Last active August 29, 2015 14:03
Vagrant 1.6.3 作業ログ

インストール

  • vagrant_1.6.3.msi
vagrant plugin list
=> vagrant-login (1.0.1, system)
=> vagrant-share (1.1.0, system)
@toruuetani
toruuetani / bootstrap.bat
Last active August 29, 2015 14:03
コマンドプロンプト起動バッチ
@ECHO OFF
SET BASE_DIR=%~DP0
CD /d %BASE_DIR%
REM ***************************************************************************
REM コマンドプロンプトのタイトルをフォルダ名に変更します。
:CMD_TITLE
set x=%BASE_DIR:~0,-1%
for /F "delims=" %%a in ('echo "%x%"') do SET DIRNAME=%%~na
@toruuetani
toruuetani / xlrd_test.py
Created July 4, 2014 08:31
xlrd 使い方メモ
import xlrd
book = xlrd.open_workbook(__name__, encoding_override="cp932")
sheet = book.sheet_by_name("シート名")
# 行数・列数取得
rows = sheet.nrows
cols = sheet.ncols
# 値の取得
@toruuetani
toruuetani / HowToManageRealmSwift.md
Created February 24, 2016 08:32
Cocoapod で RealmSwift を追加したあとで、 Pods ごとリポジトリに追加する

Init

pod init

Install

use_frameworks!

target 'YOUR_PROJECT_NAME' do
2016-03-04 17:01:22.452 ParkingDemo[4049:2668694] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
"<NSLayoutConstraint:0x1366aa540 H:[_UIButtonBarStackView:0x1366a4c40(<=0)]>",
"<NSLayoutConstraint:0x1366a5940 'UIView-leftMargin-guide-constraint' H:|-(5)-[UILayoutGuide:0x1366a5770'UIViewLayoutMarginsGuide'](LTR) (Names: '|':_UIButtonBarStackView:0x1366a4c40 )>",
"<NSLayoutConstraint:0x1366a59e0 'UIView-rightMargin-guide-constraint' H:[UILayoutGuide:0x1366a5770'UIViewLayoutMarginsGuide']-(5)-|(LTR) (Names: '|':_UIButtonBarStackView:0x1366a4c40 )>"
)