Skip to content

Instantly share code, notes, and snippets.

View YutoMizutani's full-sized avatar

Yuto Mizutani YutoMizutani

View GitHub Profile
@lunark
lunark / GenderEstimate.bas
Last active October 14, 2023 04:04
VBAマクロ向け関数。GenderEstimate。漢字の名前とふりがなから、性別を推定する関数
Public Function GenderEstimate(ByVal strMK As String, Optional strMF As String = "") As String
GenderEstimate = ""
strMK = Replace(Replace(Replace(strMK, " ", ""), " ", ""), "「", "")
strMF = Replace(Replace(StrConv(strMF, vbHiragana), " ", ""), " ", "")
'デバッグ用。こいつをブレークポイントに持ってきて挙動を確認する
'If strMK Like "理世" Then
' Debug.Print strMK
'End If
@juno
juno / zsh-git-completion-setting.md
Created May 9, 2013 08:09
zshでgitの補完を設定する手順。

gitのソースツリーに含まれるgit-completion.zshをzshで使う手順

注意:gitコマンドがhubコマンドへのエイリアスに設定されている場合は補完が働かない。

補完用ファイルを置くディレクトリを作成する(既に同じ用途のディレクトリがある場合はそれを使う)。

$ mkdir ~/.zsh/completion/
@TomLiu
TomLiu / NSImage+ScreenShot.h
Created November 25, 2013 03:29
Get main screen shot as NSImage
//
// NSImage+ScreenShot.h
// YunPan for Mac
//
// Created by 61 on 13-11-25.
//
//
#import <Cocoa/Cocoa.h>
@miyakogi
miyakogi / nim_syntax.md
Last active April 30, 2023 07:24
Syntax of Nim
@figgleforth
figgleforth / NSImage+pixelData.swift
Last active July 22, 2022 15:22
Extract RGBA pixel data from an NSImage in Swift
//
// NSImage+pixelData.swift
//
// Created by Figgleforth on 5/21/15.
// Copyright (c) 2015 Bojan Percevic. All rights reserved.
//
import AppKit
extension NSImage {
@CodaFi
CodaFi / alltheflags.md
Last active October 26, 2022 20:09
Every Option and Flag /swift (1.2) Accepts Ever

#Every Single Option Under The Sun

  • optimization level options
  • automatic crashing options
  • debug info options
  • swift internal options
  • swift debug/development internal options
  • linker-specific options
  • mode options
@Daemon-Devarshi
Daemon-Devarshi / PasteboardWatcher.swift
Last active October 6, 2023 14:15
A class which performs polling to determine the newly copied url of desired kind in an external app
//
// PasteboardWatcher.swift
// PasteboardWatcher
//
// Created by Devarshi Kulshreshtha on 6/19/15.PasteboardWatcher
// Copyright © 2015 Devarshi Kulshreshtha. All rights reserved.
//
import Cocoa
@uupaa
uupaa / image.resize.in.github.flavored.markdown.md
Last active May 13, 2024 08:50
image resize in github flavored markdown.

Image source

https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png

Try resize it!

  • ![](https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png | width=100)
@steipete
steipete / ios-xcode-device-support.sh
Last active December 12, 2023 03:36
Using iOS 15 devices with Xcode 12.5 (instead of Xcode 13)
# The trick is to link the DeviceSupport folder from the beta to the stable version.
# sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :)
# Support iOS 15 devices (Xcode 13.0) with Xcode 12.5:
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
# Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions
# (A similar approach works for older versions too, just change the version number after DeviceSupport)
@nownabe
nownabe / .commit_template
Created July 5, 2016 06:54
Emojiで楽しく綺麗なコミットを手に入れる
# ==== Emojis ====
# 🐛 :bug: バグ修正
# 👍 :+1: 機能改善
# ✨ :sparkles: 部分的な機能追加
# 🎉 :tada: 盛大に祝うべき大きな機能追加
# ♻️ :recycle: リファクタリング
# 🚿 :shower: 不要な機能・使われなくなった機能の削除
# 💚 :green_heart: テストやCIの修正・改善