Skip to content

Instantly share code, notes, and snippets.

@tomaskraina
tomaskraina / CollectionSeparatorView.swift
Last active July 20, 2021 14:04
Show Separators in Collection View Between Cells - make spaces between cells have different color than the background
//
// CollectionSeparatorView.swift
// tomkraina.com
//
// Created by Tom Kraina on 25.7.2017.
// Copyright © 2017 Tom Kraina. All rights reserved.
//
import UIKit
@naokits
naokits / ipa_generator.swift
Last active August 29, 2015 14:08
XcodeプロジェクトをビルドしてIPAファイルを生成するだけのSwiftスクリプト?
#!/usr/bin/swift
//
// ipa_generator.swift
//
// Created by Naoki Tsutsui on 2014/10/29.
// Copyright (c) 2014年 Naoki Tsutsui All rights reserved.
//
/*
@ksmandersen
ksmandersen / JSONFixture
Created April 8, 2014 16:42
Load JSON fixture files for your XCTests
@interface JSONFixture : NSObject
+ (id)fixtureDataWithName:(NSString *)fixtureName;
@end
@implementation JSONFixture
+ (id)fixtureDataWithName:(NSString *)fixtureName {
@hmml
hmml / storefronts.py
Created February 11, 2014 20:00
List of Storefront IDs (http://www.apple.com/itunes/affiliates/resources/documentation/linking-to-the-itunes-music-store.html#appendix) is not complete. Here's the full list of all 155 countries (2014-02-11) along with ids. Everything wrapped in tasty python dictionary. List produced with API from https://appfigures.com.
appStores = {
"Albania": 143575,
"Algeria": 143563,
"Angola": 143564,
"Anguilla": 143538,
"Antigua And Barbuda": 143540,
"Argentina": 143505,
"Armenia": 143524,
"Australia": 143460,
"Austria": 143445,
@myaumyau
myaumyau / NumRefToString.js
Created February 18, 2013 03:55
[js]数値文字参照(16進数, 10進数)を文字列に変換
function hexNumRefToString(hexNumRef) {
return hexNumRef.replace(/&#x([0-9a-f]+);/ig, function(match, $1, idx, all) {
return String.fromCharCode('0x' + $1);
});
}
function decNumRefToString(decNumRef) {
return decNumRef.replace(/&#(\d+);/ig, function(match, $1, idx, all) {
return String.fromCharCode($1);
});
}