Skip to content

Instantly share code, notes, and snippets.

View MasahiroSakoda's full-sized avatar

masahiroSkd MasahiroSakoda

  • Kanagawa Pref. Japan
View GitHub Profile
- (void)locationManager:(CLLocationManager *)manager didRangeBeacons:(NSArray *)beacons inRegion:(CLBeaconRegion *)region { NSString *message = nil;
for (CLBeacon *beacon in beacons) {
switch (beacon.proximity) {
case CLProximityImmediate:
message = @"CLProximityImmediate";
break;
case CLProximityNear:
message = @"CLProximityNear";
break;
case CLProximityFar:
@MasahiroSakoda
MasahiroSakoda / vagrant_tutorial.md
Last active August 29, 2015 14:01
Vagrant Tutorial

Vagrant Tutorial

Agenda

  • target
  • what is vagrant?
  • prepare
    • install VirutalBox
  • Install Vagrant
  • Create box
  • Initialize box
@MasahiroSakoda
MasahiroSakoda / Bowerfile
Created May 21, 2015 15:07
bower-railsでRailsのフロントエンド開発を少し幸せにする ref: http://qiita.com/MasahiroSakoda/items/1595b9605ed96c38e0c5
asset 'jquery-ujs'
asset 'bootstrap-sass'
asset 'fontawesome'
@MasahiroSakoda
MasahiroSakoda / .zshrc
Created November 24, 2011 01:18
.zshrc zsh environment settings
date '+%Y/%m/%d %H:%M:%S'
# history
HISTFILE=~/.zsh_history
HISTSIZE=100000
SAVEHIST=100000
## prompt settings
# autoload colors
# colors
@MasahiroSakoda
MasahiroSakoda / .inputrc
Created November 24, 2011 01:20
.inputrc
set kanji-code utf-8
set editing-mode vi
set meta-flag on
set convert-meta off
set input-meta on
set output-meta on
set completion-ignore-case on
set enable-keypad on
@MasahiroSakoda
MasahiroSakoda / .vimrc
Created November 24, 2011 01:20
.vimrc environment
" display/view setting
set tabstop=4
set shiftwidth=4
set laststatus=2
set ruler
set wildmenu
set nocompatible
set showmode
set title
set showcmd
@MasahiroSakoda
MasahiroSakoda / .vimperatorrc
Created November 24, 2011 01:24
vimperator environment settings
noremap H gT
noremap L gt
noremap h <A-Left>
noremap l <A-Right>
noremap <BS> <A-Left>
set titlestring=FireFox
noremap j 3j
noremap k 3k
@MasahiroSakoda
MasahiroSakoda / gist:3009337
Created June 28, 2012 05:37
Windows PowerShell Alias settings
Windows PowerShell Alias settings
alias behave like UNIX system
<!-- Add the following lines to theme's html code right before </head> -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
<script src="http://static.tumblr.com/fpifyru/VCxlv9xwi/writecapture.js"></script>
<script src="http://static.tumblr.com/fpifyru/AKFlv9zdu/embedgist.js"></script>
<!--
Usage: just add <div class="gist">[gist URL]</div>
Example: <div class="gist">https://gist.github.com/1395926</div>
-->
@MasahiroSakoda
MasahiroSakoda / ajax_func.coffee
Created April 22, 2013 10:06
Ajax function on jQuery 1.8 style by CoffeeScript
ajax_req = (param, beforeReq, doneReq, afterReq) ->
beforeReq = null if typeof beforeReq == 'undefined'
doneReq = null if typeof doneReq == 'undefined'
afterReq = null if typeof afterReq == 'undefined'
$.ajax 'http://www.example.com/blah',
type:'GET'
dataType:'json'
beforeSend: (jqXHR, settings) ->
console.log settings