Skip to content

Instantly share code, notes, and snippets.

View youngshook's full-sized avatar
🐝
Working

YoungShook youngshook

🐝
Working
View GitHub Profile
@youngshook
youngshook / gist:7719183
Created November 30, 2013 13:36
Fix DVTPlugInCompatibilityUUID Error
XCODEUUID=`defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID`
defaults write ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/*.xcplugin/Contents/Info DVTPlugInCompatibilityUUIDs -array-add $XCODEUUID
@youngshook
youngshook / Automatic_distribution_and_upload.sh
Last active April 11, 2016 02:07
Automatic Distribution of In-House and upload .ipa to web server( fir.im )
#/bin/sh
# Update: 2014-06-24
# Author: YoungShook
# compress application.
if [ "${CONFIGURATION}" = "Release" ]; then
# Local Display App Name And Default [email protected] ------------ need developer custom
ICON_NAME="[email protected]"
require 'rubygems'
require 'plist'
require 'securerandom'
# Plist format:
# <?xml version="1.0" encoding="UTF-8"?>
# <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
# <plist version="1.0">
# <dict>
# <key>IDECodeSnippetCompletionPrefix</key>
@youngshook
youngshook / orphanBranch.sh
Last active January 1, 2016 07:49
Create a new orphan branch, use three ways. A orphan branch like Github Pages(create a gh-pages branch).
#1. Hack ./git/HEAD file
echo ref: refs/heads/orphan_branch_name
git rm -rf .
# .............. # add file ... commit file ...
#2.Use --orphan parameter
git checkout --orphan orphan_branch_name
git rm -rf .
@youngshook
youngshook / gitconfig
Created December 30, 2013 03:28
Useful set of Git Config
[sendemail]
chainreplyto = false
smtpserver = /usr/bin/msmtp
[color]
ui = true
[core]
editor = vim
excludesfile = ${HOME}/.gitignore_global
[merge]
tool = vimdiff
@youngshook
youngshook / rails_resources.md
Created January 6, 2014 05:55 — forked from jookyboi/rails_resources.md
Rails-related Gems and guides to accelerate your web project.

Gems

  • Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
  • rabl - General ruby templating with json, bson, xml, plist and msgpack support
  • Thin - Very fast and lightweight Ruby web server
  • Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
  • SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
  • Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
  • [factory_girl](h
@youngshook
youngshook / Trim.m
Created January 21, 2014 07:32
Objective-C Trim implementation
NSString *trimmedString = [string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
@youngshook
youngshook / unusedImages.sh
Created March 14, 2014 08:19
Find unused images in an XCode project
#!/bin/sh
# -------
# Usage sh unusedImages.sh (jpg|png|gif)
# -------
# Caveat
# 1 -
# NSString *imageName = [NSString stringWithFormat:@"image_%d.png", 1];
# This script would incorrectly list these images as unreferenced. For example, you might have
# This script will incorrectly think image_1.png is unreferenced.
# 2 - If you have a method, or variable with the same name as the image it won't pick it up
@youngshook
youngshook / unused_images.sh
Created March 14, 2014 08:21
List unused images in an Xcode Project
#!/bin/sh
 
# Find PNG images not referenced by any xib, m/h, and plist files
# Works from current directory downward.
 
refs=`find . -name '*.xib' -o -name '*.[mh]' -o -name '*.plist'`
 
for image in `find . -name '*.png'`
do
image_basename=`basename $image`
@youngshook
youngshook / blocks-cheat-sheet.m
Created April 2, 2014 18:14
Objective-C Blocks Cheat Sheet
// block typedef:
typedef void(^Block)();
typedef void(^ConditionalBlock)(BOOL);
typedef NSString*(^BlockThatReturnsString)();
typedef NSString*(^ConditionalBlockThatReturnsString)(BOOL);
// block property with typedef:
@property(copy)Block theBlock;