Skip to content

Instantly share code, notes, and snippets.

View 1024jp's full-sized avatar
👻
boo

1024jp 1024jp

👻
boo
View GitHub Profile
@1024jp
1024jp / Go to Folder in Terminal.applescript
Last active December 18, 2023 19:45
open Terminal at the identical directory of the current document in CotEditor
(*
Go to Folder in Terminal Script for CotEditor
[description]
Open Terminal at the identical directory of current document in CotEditor.
[version] 1.1
[release] 2012-02-27
[lastmod] 2014-10-16
@1024jp
1024jp / Extract Presenter Notes.applescript
Last active September 3, 2021 09:35
Extract Presenter Notes
(*
Extract presenter notes of the front most Keynote document and save to Desktop as Markdown file.
Created by 1024jp on 2019-03-16.
© 2019 1024jp
*)
-- collect presenter notes
tell front document of application "Keynote"
set thePresentationTitle to name
enum DogCow: Int {
case dog, cow
}
struct Wrapper<Value> {
func newValue(from value: Any?) -> Value? {
return value as? Value ?? Optional<Any>.none as? Value

Unicode General Category “Format” (Cf)

2020-04-29 Unicode 13.0.0

List of All characters in Format category

code point Qty Name block flag note
@1024jp
1024jp / CastTimingComparison.swift
Last active February 28, 2020 08:40
Swift String cast timing comparison
protocol Foo {
var string: String
}
protocol Bar {
var string: NSString
}
class FooManager: Manager, Foo {
var string: String { self.attributedString().string }
}
@1024jp
1024jp / SetAnimationTest.svg
Created January 31, 2020 08:24
Test SVG file to check set element behavior with class toggling.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
//
// AppDelegate.swift
// Moof
//
// Created by 1024jp on 2019-10-10.
// © 1024jp
//
import Cocoa
@1024jp
1024jp / .gitignore
Last active October 7, 2019 16:23
Documents for CotEditor prerelease
# macOS
.DS_Store
@1024jp
1024jp / symbolizing_osx_crash_logs.md
Created October 16, 2016 12:40 — forked from bmatcuk/symbolizing_osx_crash_logs.md
How to symbolize OSX crash logs

How to Symbolize OSX Crash Logs

Unfortunately, xcode does not yet have support for importing OSX crash logs and symbolizing them. Therefore, you must use the command line and a little bit of manual work.

  1. Find your dSYM file.
    1. Assuming you are using xcode's archive functionality, open the Organizer window from the Window menu.
    2. Click the Archives tab.
    3. Right click on the appropriate build and select Show in Finder.
    4. When Finder opens, right click on the selected archive and select Show Package Contents.
    5. Navigate to the dSYM directory and copy the appropriate dSYM file to a temporary directory.
  2. Then navigate to Products, then Applications, and copy the app file to the same temporary directory.
@1024jp
1024jp / MyCenteringClipView.h
Created December 19, 2013 00:22
NSScrollViewの内容センタリング ref: http://qiita.com/1024jp/items/f3cd7bc7765cf090fa31
#import <Cocoa/Cocoa.h>
@interface MyCenteringClipView : NSClipView
@end