Skip to content

Instantly share code, notes, and snippets.

View jkatayama's full-sized avatar
😷
Working from home

Jumpei Katayama jkatayama

😷
Working from home
  • Tokyo
View GitHub Profile
@jkatayama
jkatayama / ssh.md
Last active July 4, 2023 00:18
ssh

SSH

  • id_rsa is a privateky
  • id_rsa.pub is a public key
  • authorized_keys is a list of public keys that are allowed to connect to the server

When to renew ssh keys?

  • When you have a new computer
@jkatayama
jkatayama / gh_useful_commands.md
Last active July 3, 2023 13:27
gh command i often use
gh pr list -A @me               
date -j -v-24H +"%Y-%m-%dT%H:00"
@jkatayama
jkatayama / git_command
Last active July 3, 2023 12:52
git command
```
git branch -a | egrep "(bitrise)"| sed 's/remotes\/origin\///' | xargs git push --delete origin
```
```shell
gh pr list --limit 100 --json number,title,url --jq '.[] | .url' --search "is:pr is:open yml" | while read URL; do\ngh pr close ${URL} -c "duplicate pr"\ndone
```
@jkatayama
jkatayama / 0_reuse_code.js
Created May 22, 2017 03:19
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@jkatayama
jkatayama / Gemfile
Created May 19, 2017 10:09
Gemfile for iOS project
# Gemfile for iOS project
source "https://rubygems.org"
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
jkatayama / mac_command.md
Last active May 29, 2017 17:26
Max and Unixコマンド

Show all download url

sudo sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* '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 (https://keybase.io/jkatayama) on keybase.
  • I have a public key ASDVU4uE8Cs5l6YKnmXN4R2X2XnblcJq4vncMIUvRscfuQo

To claim this, I am signing this object:

@jkatayama
jkatayama / calendar_objc.md
Created March 2, 2016 09:20
calendar model

##calendar.h

#import <Foundation/Foundation.h>


@interface myCalender : NSObject{
    NSCalendar  *gcal;
    NSInteger   year;
    NSInteger   month;
}
### 二つの点の距離
``` 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
}