Skip to content

Instantly share code, notes, and snippets.

@norio-nomura
norio-nomura / project.js.patch
Last active Aug 29, 2015
Additional patch for project.js
View project.js.patch
--- /Applications/Atom.app/Contents/Resources/app/src/project.js.orig 2014-03-24 09:39:52.000000000 +0900
+++ /Applications/Atom.app/Contents/Resources/app/src/project.js 2014-03-25 15:53:16.000000000 +0900
@@ -335,6 +335,7 @@
searchOptions = {
ignoreCase: regex.ignoreCase,
inclusions: options.paths,
+ follow: options.follow,
includeHidden: true,
excludeVcsIgnores: atom.config.get('core.excludeVcsIgnoredPaths'),
exclusions: atom.config.get('core.ignoredNames')
View testMutableChildren.m
#pragma mark - MutableChildren
- (void)testMutableChildren
{
NSArray *array = @[@"0",
@"1",
[NSNull null],
@"2",
@[@"0",
[NSNull null],
View keybase.md

Keybase proof

I hereby claim:

  • I am norio-nomura on github.
  • I am norio_nomura (https://keybase.io/norio_nomura) on keybase.
  • I have a public key whose fingerprint is 0010 36FA 2504 DBFF 37BA 2EF8 D4A7 318E B7F7 138D

To claim this, I am signing this object:

@norio-nomura
norio-nomura / audioVolume.js
Created Aug 19, 2014
Restore/Save Audio Volume
View audioVolume.js
javascript:$.getScript('//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js', function(){
audioVolume = $.cookie('audioVolume');
$('audio').each(function(){
if (audioVolume) {
this.player.setVolume(audioVolume);
}
$(this).on('volumechange', function(){
$.cookie('audioVolume', this.player.getVolume(), {expires: 100, path: '/'});
});
});
View gist:f1f3a09e316c54bd26b0
"NSBadge1&2",
"NSBadge3",
"NSBadge4",
"NSBadge5",
"NSBottomBevel",
"NSBottomLeftCorner",
"NSBottomLeftCornerMask",
"NSBottomRightCorner",
"NSBottomRightCornerMask",
"NSClosedHandCursor",
@norio-nomura
norio-nomura / printExcludedFromBackup.swift
Created Nov 17, 2014
NSURLIsExcludedFromBackupKeyがtrueなものをリストアップする
View printExcludedFromBackup.swift
#!/usr/bin/env xcrun swift
import Cocoa
extension NSURL {
var isDirectory: Bool {
return resourceValue(NSURLIsDirectoryKey)
}
var isExcludedFromBackup: Bool {
return resourceValue(NSURLIsExcludedFromBackupKey)
@norio-nomura
norio-nomura / patch.diff
Created Dec 28, 2014
AVMutableComposition使う必要ないのでは?
View patch.diff
diff --git a/SimpleGaplessPlayer/HKLGaplessPlayer/AssetReaderFragment.swift b/SimpleGaplessPlayer/HKLGaplessPlayer/AssetReaderFragment.swift
index 9fdd89d..2d41bf4 100644
--- a/SimpleGaplessPlayer/HKLGaplessPlayer/AssetReaderFragment.swift
+++ b/SimpleGaplessPlayer/HKLGaplessPlayer/AssetReaderFragment.swift
@@ -121,7 +121,7 @@ internal class AssetReaderFragment: NSObject {
// 注意点:
// - このビデオトラックにはコンポジション上のビデオトラックを指定すること
// - IOSurfaceで作成しなくても再生できるが、念のため付けておく
- let compoVideoTracks = composition.tracksWithMediaType(AVMediaTypeVideo)
+ let compoVideoTracks = asset.tracksWithMediaType(AVMediaTypeVideo)
@norio-nomura
norio-nomura / indexof.asm
Last active Aug 29, 2015
swift-demangle-filter.py -g indexof.swift -o indexof.asm
View indexof.asm
.section __TEXT,__text,regular,pure_instructions
.section __DWARF,__debug_info,regular,debug
Lsection_info:
.section __DWARF,__debug_abbrev,regular,debug
Lsection_abbrev:
.section __DWARF,__debug_aranges,regular,debug
.section __DWARF,__debug_macinfo,regular,debug
.section __DWARF,__debug_line,regular,debug
Lsection_line:
.section __DWARF,__debug_loc,regular,debug
@norio-nomura
norio-nomura / indexof-O.sil
Created Jan 15, 2015
`swift-demangle-filter.py -emit-sil -O indexof.swift -o indexof-O.sil`
View indexof-O.sil
This file has been truncated, but you can view the full file.
sil_stage canonical
import Builtin
import Swift
import SwiftShims
// indexof.a : Swift.Array<Swift.Int>
sil_global indexof.a : [Swift.Int] : $Array<Int>
@norio-nomura
norio-nomura / indexof.sil
Last active Aug 29, 2015
`swift-demangle-filter.py -emit-sil indexof.swift -o indexof.sil`
View indexof.sil
sil_stage canonical
import Builtin
import Swift
import SwiftShims
// indexof.a : Swift.Array<Swift.Int>
sil_global indexof.a : [Swift.Int] : $Array<Int>
// indexof.c (Swift.Int) -> Swift.Bool