Skip to content

Instantly share code, notes, and snippets.

@yyjim
yyjim / gist:9a5b880fb2b7fa8e3cf8a7609ce8572c
Last active December 23, 2018 14:10
JIA壓克力訂製
5mm開方壓克力盒(46x10x17cm)
5mm開放壓克力盒(33.4x10x17cm)
3mmL型壓克力檔板(79.4x10.3cm)
請幫我注意一下長誤差請別超過上面尺寸, 不然無法塞入訂製的魚缸中
謝謝
https://tw.bid.yahoo.com/item/PN%E3%80%82%E3%80%82%E3%80%82%E9%9D%92%E5%B3%B6%E6%B0%B4%E6%97%8F%E3%80%82%E3%80%82%E3%80%82%E7%86%B1%E5%B8%B6%E9%9B%A8%E6%9E%97%E7%A0%82-%E7%86%B1%E5%B8%B6%E9%9B%A8%E6%9E%97%E6%B2%99-%E5%8F%A2%E6%9E%97%E5%AF%B6-100506909548
https://tw.bid.yahoo.com/item/%E4%B8%83%E6%9C%88%E7%BC%BAY%E3%80%82%E3%80%82%E3%80%82%E9%9D%92%E5%B3%B6%E6%B0%B4%E6%97%8F%E3%80%82%E3%80%82%E3%80%824015100%E5%BE%B7%E5%9C%8BEHEIM-L%E5%B0%8F%E5%BD%8E-100032488823
@yyjim
yyjim / CGImage Rotation.png
Created June 20, 2018 11:13 — forked from josephsieh/CGImage Rotation.png
Rotate CGImage 90 degree clock wise
CGImage Rotation.png
@yyjim
yyjim / CBMediaFormat.h
Created February 5, 2018 16:25
NS_STRING_ENUM example
// Media types
// Reference: AVMediaType
typedef NSString * CBMediaType NS_STRING_ENUM;
FOUNDATION_EXPORT CBMediaType const CBMediaTypeImage;
FOUNDATION_EXPORT CBMediaType const CBMediaTypeVideo;
FOUNDATION_EXPORT CBMediaType const CBMediaTypeGif;
FOUNDATION_EXPORT CBMediaType const CBMediaTypeAnimatedOutput;
CBMediaType const CBMediaTypeImage = @"image";
@yyjim
yyjim / PagingScrollView.h
Created February 24, 2016 03:08
EXP PagingScrollView
//
// PagingCollectionView.h
// PicCollage
//
// Created by yyjim on 2/22/16.
//
//
#import <UIKit/UIKit.h>
#!/usr/bin/env ruby
require 'fileutils'
working_dir = File.expand_path File.dirname(__FILE__)
["drawable-xxhdpi","drawable-xhdpi", "drawable-hdpi", "drawable-mdpi"].each do |dir|
directory = "#{working_dir}/#{dir}"
FileUtils.rm_rf(directory)
FileUtils.mkdir_p(directory)
end
@yyjim
yyjim / gist:0b13e823646921827220
Created April 1, 2015 09:01
taipei opendata test
NSURL *url = [NSURL URLWithString:@"http://opendata.dot.taipei.gov.tw/opendata/alldescriptions.json"];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[NSURLConnection sendAsynchronousRequest:request
queue:[NSOperationQueue mainQueue]
completionHandler:^(NSURLResponse *response, NSData *data, NSError *connectionError) {
unsigned long big5 = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingBig5_HKSCS_1999);
NSString *json = [[NSString alloc] initWithData:data encoding:big5];
NSError *error;
NSDictionary *dictionary =
[NSJSONSerialization JSONObjectWithData:[json dataUsingEncoding:NSUTF8StringEncoding]
@yyjim
yyjim / gist:1336020
Created November 3, 2011 08:09
Mixi revoke and Mixi setup
// in Mixi.m
/*
is there a way can check revoke successful?
i can not find where return kMixiAppApiTypeRevoke value in
- (NSString*)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation error:(NSError**)error
but in README said we can check it.
*/
NSError *error = nil;
NSString *apiType = [[Mixi sharedMixi] application:application openURL:url sourceApplication:sourceApplication annotation:annotation error:&error];
@yyjim
yyjim / gist:1332964
Created November 2, 2011 05:28
MixiSDK problem
// Mixi.m
- (void)clear {
NSUserDefaults *defaults = [self userDefaults];
[defaults removeObjectForKey:@"clientId"];
[defaults removeObjectForKey:@"expiresIn"];
[defaults removeObjectForKey:@"state"];
[defaults removeObjectForKey:@"accessTokenExpiryDate"];
// yyjim: is this need to do synchronize after removeObjectForKey?
// [defaults synchronize]
@yyjim
yyjim / gist:af710722ef508e784c60
Created April 24, 2015 09:03
show real names of provisions profiles
# http://stackoverflow.com/a/29576280
# Go to ~/Library/MobileDevice/Provisioning Profiles
grep -a -A1 "<key>Name</key>" *.mobileprovision | grep -v "<key>Name</key>" | grep -v "^--"