Skip to content

Instantly share code, notes, and snippets.

View youngshook's full-sized avatar
🐝
Working

YoungShook youngshook

🐝
Working
View GitHub Profile
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 / 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 / curl.md
Created July 6, 2014 12:13 — forked from btoone/curl.md
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin

(a gist based on the old toolmantim article on setting up remote repos)

To collaborate in a distributed development process you’ll need to push code to remotely accessible repositories.

This is somewhat of a follow-up to the previous article setting up a new rails app with git.

For the impatient

Set up the new bare repo on the server:

@youngshook
youngshook / DYDB.h
Created August 22, 2014 20:22 — forked from lvjian700/DYDB.h
#import <Foundation/Foundation.h>
#import <FMDB/FMDatabase.h>
@interface DYDB : NSObject {
}
@property(nonatomic, readonly) FMDatabase *database;
+ (DYDB *) sharedDB;
-(void)drawTimecodeUsingGCD
{
if( dispatch_semaphore_wait( _timecodeSemaphore, DISPATCH_TIME_NOW ) != 0 )
{
return;
}
dispatch_async( _timecodeQueue, ^()
{
float fontSize = ceilf( self.scrubberSize * 0.425f );
//
// UILabel+MultiLineSupport.h
// giffgaffIOS
//
// Created by Nigel Barber on 23/10/2013.
// Copyright (c) 2013 confidence. All rights reserved.
//
#import <UIKit/UIKit.h>
//
// UILabel+MultiLineSupport.h
// giffgaffIOS
//
// Created by Nigel Barber on 23/10/2013.
// Copyright (c) 2013 confidence. All rights reserved.
//
#import <UIKit/UIKit.h>
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
//
// NTBProxyImageView.h
// Vectoria Squared
//
// Created by Nigel Barber on 22/04/2013.
// Copyright (c) 2013 Nigel Barber. All rights reserved.
//
#import <UIKit/UIKit.h>