Skip to content

Instantly share code, notes, and snippets.

View style.css
@charset "utf-8";
html,body { margin:0; padding:0; }
sazameki / index.html
Last active Jan 2, 2016
HTML5 Sample
View index.html
<!DOCTYPE html>
<html lang="ja">
<meta charset="utf-8"/>
<link rel="stylesheet" href="css/style.css"/>
sazameki / UIView+ConstraintsUtil.h
Last active Jan 2, 2016
A utility category for utilizing UIKit Auto Layout features efficiently.
View UIView+ConstraintsUtil.h
// UIView+ConstraintsUtil.h
// Created by numata on 2014/01/02.
// Copyright (c) 2014 Sazameki and Satoshi Numata, Ph.D. All rights reserved.
@import UIKit;
sazameki / NSObject + CATransactionSupport
Last active Dec 25, 2015
Make it possible to write Core Animation's animation code with blocks using timers.
View NSObject + CATransactionSupport
@import QuartzCore;
@interface NSObject (CATransactionSupport)
- (NSTimer *)startTimerWithInterval:(NSTimeInterval)interval block:(void (^)(void))block;
- (void)startAnimationWithDuration:(NSTimeInterval)duration block:(void (^)(void))block;
- (void)startAnimationWithDuration:(NSTimeInterval)duration block:(void (^)(void))block completionHandler:(void (^)(void))completionHandler;
View gist:6016275



sazameki / RVNReceiptValidation.m
Created Jul 1, 2012
Mac App Store Receipt Validation Sample (Mac OS X 10.7)
View RVNReceiptValidation.m
// RVNReceiptValidation.m
// Created by Satoshi Numata on 12/06/30.
// Copyright (c) 2012 Sazameki and Satoshi Numata, Ph.D. All rights reserved.
// This sample shows how to write the Mac App Store receipt validation code.
// Replace kRVNBundleID and kRVNBundleVersion with your own ones.
// This sample is provided because the coding sample found in "Validating Mac App Store Receipts"
View gist:185814
texturetool -e PVRTC --channel-weighting-linear --bits-per-pixel-2 -o <OUTPUT-FILENAME> -f PVR <INPUT-FILENAME>
texturetool -e PVRTC --channel-weighting-linear --bits-per-pixel-4 -o <OUTPUT-FILENAME> -f PVR <INPUT-FILENAME>
texturetool -e PVRTC --channel-weighting-perceptual --bits-per-pixel-2 -o <OUTPUT-FILENAME> -f PVR <INPUT-FILENAME>
texturetool -e PVRTC --channel-weighting-perceptual --bits-per-pixel-4 -o <OUTPUT-FILENAME> -f PVR <INPUT-FILENAME>
View gist:185812
# ひとつ前のコミットを取り消す
git reset --soft HEAD^
# 直前のコミットに新しい変更点を追加する。
git commit --amend
git push --force
# タグを取り除く
git tag -d TAGNAME
git push origin :refs/tags/TAGNAME
View JSONParseSample.m
#import "SZJsonParser.h"
NSString *str = @"[ 'Apple', 'Banana' ]";
id obj = [str jsonObject]; // obj will be an array or a dictionary
NSLog(@"JSON Object: %@", obj);
View OpenGLVersionChecker.m
// Use these codes below after NSOpenGLView is prepared.
#include <OpenGL/gl.h>
- (void)doCheck
NSLog(@"gl_version={%s}", glGetString(GL_VERSION));
NSLog(@"gl_renderer={%s}", glGetString(GL_RENDERER));
NSLog(@"gl_vendor={%s}", glGetString(GL_VENDOR));