Skip to content

Instantly share code, notes, and snippets.

Jumpei Katayama jkatayama

Block or report user

Report or block jkatayama

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jkatayama / 0_reuse_code.js
Created May 22, 2017
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
jkatayama / Gemfile
Created May 19, 2017
Gemfile for iOS project
View Gemfile
# Gemfile for iOS project
source ""
gem 'cocoapods'
# Folder reorganizer
gem 'synx'
# Task Automation
gem 'fastlane'

git-nuke multiple feature branches

for i in {1..10}\ndo\ngit-nuke feature/\#${i}\ndone
jkatayama /
Last active May 29, 2017
Max and Unixコマンド

Show all download url

sudo sqlite3 ~/Library/Preferences/* 'select LSQuarantineDataURLString from LSQuarantineEvent' | more

quicklook files or directories with preview

qlmanage -p

Keybase proof

I hereby claim:

  • I am jkatayama on github.
  • I am jkatayama ( on keybase.
  • I have a public key ASDVU4uE8Cs5l6YKnmXN4R2X2XnblcJq4vncMIUvRscfuQo

To claim this, I am signing this object:



#import <Foundation/Foundation.h>

@interface myCalender : NSObject{
    NSCalendar  *gcal;
    NSInteger   year;
    NSInteger   month;
View useful function for math
### 二つの点の距離
``` swift
func distance(pointA: CGPoint, pontB: CGPoint) -> Float {
let dx: Float = abs(pointA.x - pontB.x)
let dy: Float = abs(pointA.y - pontB.y)
let dist = sqrt(dx*dx + dy*dy)
return dist
View iOS

iOS sheat-sheet

Get a selected cell's index

override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
    let path = self.tableView.indexPathForSelectedRow
    segue.destinationViewController.detail = self.detailForIndexPath(path)

iOS9 improvement

Disblae ATS(AppTransportSecurity) to allow http

jkatayama /
Created Feb 17, 2016
go to the directory in which your command exists
cd $(dirname "$(which npm)")
You can’t perform that action at this time.