Skip to content

Instantly share code, notes, and snippets.

View githiro's full-sized avatar

Hiro githiro

  • Tokyo
View GitHub Profile
@githiro
githiro / .bash_profile
Last active April 27, 2018 05:50
Bash: Bash profile
# PS1
export PS1="\t \W \\$ "
# Read "~/.bashrc". ".bashrc" is only read by a shell that's both interactive and non-login
test -r ~/.bashrc && . ~/.bashrc
@githiro
githiro / guide_gitignore_global.md
Last active April 26, 2018 02:27
git: .gitignore_global settings

.gitignore_global用設定

コミット不要なファイルを管理してくれる.gitignoreだが、   プロジェクトのルートでgit initした後に自分で作成しなければならない。
.DS_Storeなど明らかにコミット不要なファイルも、git initしたタイミングでは無視対象に入っていない。   プロジェクト直下の.gitignoreに毎回必ず書くような内容はプロジェクトを横断した形で(globalで)無視して欲しいので、下記設定を行う。  

gitconfigを作成してgitignore_globalとユーザー名、メールアドレス、ショートカットを登録する

gitconfigについてはhttps://qiita.com/shionit/items/fb4a1a30538f8d335b35。 ひとまずglobalでデフォルトのユーザー名とメールアドレス登録も行ってしまう。 これで、globalの~/.gitconfigに設定内容が記載される。

@githiro
githiro / mac-auto-setup.sh
Last active May 18, 2019 17:42
Shell: Auto setup system for macOS.
# Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew upgrade --all
brew doctor
brew -v
# Install CLI Commands
brew install wget
brew install tree
@githiro
githiro / _component-card-items.scss
Created May 12, 2017 10:47
SASS: Flexbox card layout, also supporting old browser(~android 4.3, IE9)
// CARD ITEMS
// flexbox対応が不完全なブラウザ(~Android 4.3)向けにfloatで対処
// largeの時のカラム数は3,4,5に対応
////////////////////////////////////
$card-items-classname: "card-items" !default;
$card-items-children-classname: "item" !default;
$card-items-flex-align-items: stretch !default;
$card-items-flex-justify-content: flex-start !default;
$card-items-flex-wrap: wrap !default;
@githiro
githiro / _noto-sans-jp.scss
Created April 21, 2017 02:06
SASS: Use CDN's Noto Sans JP but use LOCAL one preferentially if exists.
// NOTO SANS JP
////////////////////////////////////
/*! "Noto Sans JP" is licensed under the SIL Open Font License 1.1 by https://www.google.com/get/noto/ */
@font-face {
font-family: 'Noto Sans JP';
font-style: normal;
font-weight: 100;
src: local("Noto Sans CJK JP"),
url(//fonts.gstatic.com/ea/notosansjp/v5/NotoSansJP-Thin.woff2) format('woff2'),
@githiro
githiro / sendmail.mc
Created May 28, 2015 08:20
sendmail: basic sendmail.mc
divert(-1)dnl
dnl #
dnl # This is the sendmail macro config file for m4. If you make changes to
dnl # /etc/mail/sendmail.mc, you will need to regenerate the
dnl # /etc/mail/sendmail.cf file by confirming that the sendmail-cf package is
dnl # installed and then performing a
dnl #
dnl # /etc/mail/make
dnl #
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
@githiro
githiro / ssl.conf
Created May 28, 2015 08:07
Apache: basic ssl.conf file
#
# This is the Apache server configuration file providing SSL support.
# It contains the configuration directives to instruct the server how to
# serve pages over an https connection. For detailing information about these
# directives see <URL:http://httpd.apache.org/docs/2.2/mod/mod_ssl.html>
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
@githiro
githiro / php.conf
Created May 28, 2015 08:04
PHP: basic php.conf
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#
<IfModule prefork.c>
LoadModule php5_module modules/libphp5.so
</IfModule>
<IfModule !prefork.c>
LoadModule php5_module modules/libphp5-zts.so
@githiro
githiro / httpd.conf
Last active August 29, 2015 14:22
Apache: basic httpd.conf
#
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
#
# Do NOT simply read the instructions in here without understanding
@githiro
githiro / gist:656030f793d653ce1f7f
Created March 19, 2015 00:23
TortoiseSVN Diff Viewer External path setting
C:\Program Files (x86)\WinMerge\WinMergeU.exe -e -x -ub -dl %bname -dr %yname %base %mine