Skip to content

Instantly share code, notes, and snippets.

@akisute
akisute / UIApplication+UIID.h
Created August 22, 2011 01:16
Unique Installation Identifier (UIID) as a replacement of the depreciated UDID. Repository available here: https://github.com/akisute/UIApplication-UIID
//
// UIApplication+UIID.h
// UIID
//
// Created by akisute on 11/08/22.
//
#import <UIKit/UIKit.h>
@kishikawakatsumi
kishikawakatsumi / gist:3024000
Created June 30, 2012 14:30
Find View Controller placed a view
- (UIViewController *)viewControllerForView:(UIView *)view {
UIResponder *nextResponder = [view nextResponder];
if (nextResponder) {
if ([nextResponder isKindOfClass:[UIViewController class]]) {
return (UIViewController *)nextResponder;
} else {
return [self viewControllerForView:view.superview];
}
}
return nil;
@ole
ole / update_storyboard_strings.sh
Last active April 4, 2022 06:11
Automatically extract translatable strings from Xcode storyboards and update .strings files. Original version by MacRumors forum user mikezang (http://forums.macrumors.com/showpost.php?p=16060008&postcount=4). Slightly updated by Ole Begemann. NOTE: this Gist moved to a regular repo at https://github.com/ole/Storyboard-Strings-Extraction.
# (File moved to https://github.com/ole/Storyboard-Strings-Extraction)
@kishikawakatsumi
kishikawakatsumi / main.m
Created January 14, 2014 18:52
One-line fix for UITextView on iOS 7
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[])
{
@autoreleasepool {
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"UIDisableLegacyTextView"];
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
@mvarie
mvarie / WhereAmIRunning.swift
Last active September 16, 2020 10:33
Detects whether we're running in a Simulator, TestFlight Beta or App Store build
//
// WhereAmIRunning.swift
// https://gist.github.com/mvarie/63455babc2d0480858da
//
// ### Detects whether we're running in a Simulator, TestFlight Beta or App Store build ###
//
// Based on https://github.com/bitstadium/HockeySDK-iOS/blob/develop/Classes/BITHockeyHelper.m
// Inspired by http://stackoverflow.com/questions/18282326/how-can-i-detect-if-the-currently-running-app-was-installed-from-the-app-store
// Created by marcantonio on 04/11/15.
//
@kotakanbe
kotakanbe / mohikan_slack_channels.md
Last active October 14, 2023 19:26
モヒカンslack( https://mohikan.slack.com )のチャネルリスト
@z80oolong
z80oolong / 00_TMUX_FIX.md
Last active October 4, 2021 22:50
tmux 2.5 以降において East Asian Ambiguous Character を全角文字の幅で表示する

tmux 2.5 以降において East Asian Ambiguous Character を全角文字の幅で表示する

告知 (2019/03/15, 2020/04/29)

これまで、本稿の Gist にて公開しておりました [tmux 2.5][TMUX] 以降において [East Asian Ambiguous Character][EAWA] を全角文字の幅で表示する為の差分ファイルについて、差分ファイルの分量が多くなったことに伴い、今後は以下の [Github][GITH] のリポジトリにて [tmux][TMUX] の [East Asian Ambiguous Character][EAWA] 対応差分ファイルを公開することと致します。

また、今後 [East Asian Ambiguous Character][EAWA] 対応の [tmux][TMUX] の導入を御考えの方は、後述する [Linuxbrew][BREW] を用いた差分ファイルの適用及びインストール若しくは、 [AppImage パッケージ][APPR]を用いたインストールを御勧め致します。

@tx-TEM
tx-TEM / sample01.md
Last active September 22, 2022 07:07
Swift 個人用コードまとめ

コードから利用できるUIViewを作成する

import UIKit

final class CommonSectionHeader: UIView {
    @IBOutlet var titleLabel: UILabel!
    override init(frame: CGRect) {
        super.init(frame: frame)
        commonInit()
    }
@bvlion
bvlion / code.gs
Last active February 24, 2023 04:20
GAS で土日祝日一覧を作成する
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
function doGet(e) {
if (e.parameter == undefined) {
throw new Error("固定パラメータなし");
}
// 日付を取得
var date = e.parameter.date;
@bvlion
bvlion / payBackContact.js
Created June 6, 2021 03:48
Google スプレッドシートで始めるアプリ運用
var userName = ''
var gmailUserName = ''
var gmailAddress = ''
function reply() {
var sheet = SpreadsheetApp.getActiveSheet()
var active = sheet.getActiveCell()
if (sheet.getName() != 'contact') {
return
}