Skip to content

Instantly share code, notes, and snippets.

View mfks17's full-sized avatar

mfks17 mfks17

View GitHub Profile
  • 〜できたらいいね
    • I would like to ~
  • (準備できたら)声かけてね
    • Tell me something when you’re ready.
  • メモをとる
    • take a note
  • 続きをしよう
    • Let's continue.
  • その話は置いといて、
  • Putting that aside...
@mfks17
mfks17 / init.lua
Created January 5, 2018 22:16
My Hammerspoon init script 🔨
local function keyCode(key, modifiers)
modifiers = modifiers or {}
return function()
hs.eventtap.event.newKeyEvent(modifiers, string.lower(key), true):post()
hs.timer.usleep(1000)
hs.eventtap.event.newKeyEvent(modifiers, string.lower(key), false):post()
end
end
local function remapKey(modifiers, key, keyCode)
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
FIRApp.configure()
let types: UIUserNotificationType = [UIUserNotificationType.Badge, UIUserNotificationType.Alert, UIUserNotificationType.Sound]
let settings: UIUserNotificationSettings = UIUserNotificationSettings( forTypes: types, categories: nil )
application.registerUserNotificationSettings( settings )
application.registerForRemoteNotifications()
return true
}
[branchname]
# ==== Emojis ====
# ✏️ :pencil2: Writing docs
# 🐛 :bug: Fix bugs
# 👍 :+1: Feature improvements
# ✨ :sparkles: Additional partial feature
# 🎉 :tada: Grand major features added to celebrate
# ♻️ :recycle :Refactoring
# 🚿 :shower: Removal of obsolete functions or features.
#!/bin/sh
VAR1=`xcodebuild -version | head -1`
VAR2=`echo $VAR1 | sed -e "s/ /-/"`
VAR3=`echo $VAR2 | sed -e "s/$/.app/"`
VAR4=`defaults read /Applications/$VAR3/Contents/Info DVTPlugInCompatibilityUUID`
echo $VAR1 : $VAR4
FormView
titleTextField
issueTextView
issuePlaceholder
captureImage
indicator
postButton
cancelButton
issueImageData
issueThumbnailData
#!/bin/sh
export PATH=$PATH:/Users/mfks17/.rbenv/shims
jazzy \
--clean \
--author mfks17 \
--author_url https://mfks17.org \
--module-version 0.1.2 \
--xcodebuild-arguments -scheme,Ditto \
--module Ditto \
#!/bin/sh
lipo -info "${PROJECT_DIR}/${PROJECT_NAME}.framework/${PROJECT_NAME}"
#!/bin/sh
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal
# make sure the output directory exists
mkdir -p "${UNIVERSAL_OUTPUTFOLDER}"
# Step 1. Build Device and Simulator versions
xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build
if which swiftlint >/dev/null; then
swiftlint
else
echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint"
fi