Skip to content

Instantly share code, notes, and snippets.

View alex-cellcity's full-sized avatar

Alex Yao Cheng alex-cellcity

  • CellCity Ltd.
  • Singapore
View GitHub Profile
@alex-cellcity
alex-cellcity / ShareKit.podspec
Created July 30, 2012 04:53
Sharekit.podspec + Fix Twitter weak_framework
Pod::Spec.new do |s|
s.name = 'ShareKit'
s.version = '2.0'
s.platform = :ios
s.summary = 'Drop in sharing features for all iPhone and iPad apps.'
s.homepage = 'http://getsharekit.com/'
s.author = 'ShareKit Community'
s.source = { :git => 'https://github.com/ShareKit/ShareKit.git', :commit => 'b8129c7c229a383ea5926aaa7869aadbccb71e8f' }
s.license = { :type => 'MIT',
:text => %Q|Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n| +
@alex-cellcity
alex-cellcity / SVWebViewController.podspec
Created July 30, 2012 04:36
SVWebViewController.podspec MRC Version
Pod::Spec.new do |s|
s.name = 'SVWebViewController'
s.version = '0.1'
s.summary = 'A drop-in inline browser for your iOS app.'
s.homepage = 'https://github.com/samvermette/SVWebViewController'
s.author = { 'Sam Vermette' => 'http://samvermette.com' }
s.source = { :git => 'https://github.com/samvermette/SVWebViewController.git',
:commit => '3044698e210318cca7d9acf5b2ca3394ea389723' }
s.platform = :ios
s.source_files = 'SVWebViewController/*.{h,m}'
@alex-cellcity
alex-cellcity / league.json
Created April 3, 2012 10:43
example of League data
[
{
"team":"JSSL Walcott",
"pos":"1",
"P":"13",
"W":"11",
"D":"2",
"L":"0",
"GF":"74",
"GA":"3",
@alex-cellcity
alex-cellcity / teams.json
Created April 3, 2012 09:55
example of Premier League Teams data
[
{
"gourp": "Under 6",
"teams": [
"JSSL Walcott",
"JSSL Wilshere",
"JSSL Arshavin",
"Shoot Football Academy",
"JSSL Tanglin/UWC",
"ANZA"
@alex-cellcity
alex-cellcity / solve_pbxproj_merge_conflict.sh
Created April 3, 2012 09:25 — forked from zbyhoo/solve_pbxproj_merge_conflict.sh
Solving pbxproj files git merge conflicts when two users add files at the same time.
#!/bin/sh
projectfile=`find -d . -name 'project.pbxproj'`
projectdir=`echo *.xcodeproj`
projectfile="${projectdir}/project.pbxproj"
tempfile="${projectdir}/project.pbxproj.out"
savefile="${projectdir}/project.pbxproj.mergesave"
cat $projectfile | grep -v "<<<<<<< HEAD" | grep -v "=======" | grep -v "^>>>>>>> " > $tempfile
cp $projectfile $savefile
@alex-cellcity
alex-cellcity / gist:2290627
Created April 3, 2012 09:23 — forked from zbyhoo/gist:1450703
print sorted by size list of all files/folders in current directory in human readable form
du -s * | sort -nr | cut -f2- | xargs -I {} du -hs {}
#!/bin/sh
# Map LISTENing TCP ports to their PIDs using lsof
LSOF=/usr/sbin/lsof
# e.g. netstat -an
# 127.0.0.1.25 *.* 0 0 49152 0 LISTEN
# *.22 *.* 0 0 49152 0 LISTEN
@alex-cellcity
alex-cellcity / .gitconfig
Created October 11, 2011 06:55
Use FileMerge as Git diff tool
...
[diff]
external = /usr/local/bin/gitdiffcmd.sh
@alex-cellcity
alex-cellcity / UIColor+RGBHex.m
Created September 27, 2011 02:54
UIColor RGB Hex
#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
@alex-cellcity
alex-cellcity / HowToUse.m
Created September 2, 2011 06:50
ShareKit share facebook stream with image (Stream Attachments)
NSString *title = @"Sed adipiscing ornare risus. Morbi est est, blandit sit amet, sagittis vel, euismod vel, velit. Pellentesque egestas sem. Suspendisse commodo ullamcorper magna.";
NSString *imageURL = @"http://img.chinaluxus.com/pic/spts/2011/05/19/20110519080415136.jpg";
NSURL *url = [NSURL URLWithString:@"http://example.com"];
SHKItem *item = [SHKItem URL:url title:title];
[item setCustomValue:imageURL forKey:FBImageURL];
[SHKFacebook shareItem:item];