Skip to content

Instantly share code, notes, and snippets.

View masuhara's full-sized avatar

Daisuke Masuhara masuhara

View GitHub Profile
#!/bin/bash -eu
temp_dir=`mktemp --directory`
target_dir=/Applications/Xcode-beta.app/Contents/MacOS
if [ -e $target_dir/Xcode.signed ]; then
echo "already exists Xcode.signed"
exit 1
fi
import Cocoa
import MASShortcut
func pow() {
let rect = NSScreen.mainScreen()?.frame
let window = NSWindow(contentRect: rect!, styleMask: NSBorderlessWindowMask, backing: .Buffered, `defer`: false)
window.backgroundColor = NSColor.clearColor()
window.opaque = false
window.alphaValue = 1
window.makeKeyAndOrderFront(NSApplication.sharedApplication())
@chriseidhof
chriseidhof / tableviews.swift
Last active October 15, 2023 20:56
trySwift
import UIKit
// If you enjoyed this talk (video link will be up soon), then you might also enjoy our book Advanced Swift: http://www.objc.io/books/advanced-swift
struct Person {
let name: String
let city: String
}
let people = [
#!/usr/bin/env bash
# Automatically installs swiftenv and run's swiftenv install.
# This script was designed for usage in CI systems.
git clone --depth 1 https://github.com/kylef/swiftenv.git ~/.swiftenv
export SWIFTENV_ROOT="$HOME/.swiftenv"
export PATH="$SWIFTENV_ROOT/bin:$SWIFTENV_ROOT/shims:$PATH"
if [ -f ".swift-version" ] || [ -n "$SWIFT_VERSION" ]; then
swiftenv install -s

インスタグラムAPIが仕様変更し、アプリケーション・サービスへの利用には申請と承認が必要に

2015年11月17日からインスタグラムの提供しているAPIの仕様が大幅に変更されました。

仕様変更する前までは、インスタグラムのアカウント所有者であれば誰でも、開発者登録をするだけでAPI機能の全てを使用することができましたが、今回の変更で、APIの正式利用にはインスタグラムにレビューの申請をして承認されることが必須となりました。
また、17日以前に作成したアプリケーション・サービスについても、2016年6月1日までに申請し承認されなければ、自動的にテスト(サンドボックス)モードに切り替わるようです。

インスタグラムAPI利用規約の日本語訳

英語でしか表記のなかった規約の一部を日本語に翻訳したので、まとめておきます。

@stuffmc
stuffmc / composition.m
Created January 6, 2012 21:59
AVComposition & AVVideoComposition
// For whatever reason (I guess because my code is wrong) the "composition" returns twice the same asset (one transformed, one not),
// although it should display 2 different videos... If anybody has a clue :(
NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], AVURLAssetPreferPreciseDurationAndTimingKey, nil];
AVMutableComposition *composition = [AVMutableComposition composition];
CMTimeRange timeRange = CMTimeRangeMake(kCMTimeZero, CMTimeMakeWithSeconds(4, 1));
AVMutableVideoComposition *videoComposition = [AVMutableVideoComposition videoComposition];
// Track B