Skip to content

Instantly share code, notes, and snippets.

@lyokato
lyokato / MyVideoSourceFilter.m
Created June 12, 2017 15:09
WebRTC iOS SDK用 Video Source Filter 実装例1
@interface MyVideoSourceFilter : NSObject<RTCVideoCapturerDelegate>
- (instancetype)initWithSource:(RTCVideoSource *)source;
@end
@implementation MyVideoSourceFilter
- (instancetype)initWithSource:(RTCVideoSource *)source {
if (self = [super init]) {
self.source = source;
}
return self;
@lyokato
lyokato / build_aar.py
Created March 27, 2017 08:53
src/tools-webrtc/android/build_aar.py patched for arm64-v8a
#!/usr/bin/env python
# Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "AppKit"
on run {input, parameters}
set bundle to current application's NSBundle's bundleWithPath:"/Applications/Utilities/Keychain Access.app/Contents/Resources/Keychain.menu/"
bundle's load
@lyokato
lyokato / LockScreen.scpt
Created November 22, 2016 02:49
LockScreen AppleScript
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "AppKit"
my lockscrn()
on lockscrn()
set bundle to current application's NSBundle's bundleWithPath:"/Applications/Utilities/Keychain Access.app/Contents/Resources/Keychain.menu/"
bundle's load
#import "UIView+LKViewUtil.h"
#import "LKMacro.h"
#import <QuartzCore/QuartzCore.h>
@implementation UIView (LKViewUtil)
- (void)centerizeInRect:(CGRect)rect
{
self.frame = CGRectMake((rect.size.width - self.frame.size.width)/2.0,
(rect.size.height - self.frame.size.height)/2.0,