Skip to content

Instantly share code, notes, and snippets.

// Kudos to Grumdrig
// http://stackoverflow.com/questions/1207008/how-do-i-lock-the-orientation-to-portrait-mode-in-a-iphone-web-application
$(document).ready(function () {
function reorient(e) {
var portrait = (window.orientation % 180 == 0);
$("body > div").css("-webkit-transform", !portrait ? "rotate(-90deg)" : "");
}
window.onorientationchange = reorient;
window.setTimeout(reorient, 0);
@junheon
junheon / .jshintrc
Created August 23, 2013 13:46 — forked from taxilian/.jshintrc
{
// Settings
"passfail" : false, // Stop on first error.
"maxerr" : 100, // Maximum errors before stopping.
// Predefined globals whom JSHint will ignore.
"browser" : true, // Standard browser globals e.g. `window`, `document`.
"node" : true,
@junheon
junheon / screencast.md
Last active December 21, 2015 00:29
스크린캐스트 촬영법

Screencast 가이드

환경

Mac OS X

맥 기본 QuickTime 사용 Screencast 프로그램

1. QuickTime 실행

@junheon
junheon / gist:6161450
Created August 6, 2013 02:17
CentOS Rails 기본 환경 설치 가이드
# Centos 설치 후
# --------------
# 한글 설정
# /etc/sysconfig/i18n 파일에서 다음을 설정 한다.
LANG="ko_KR.UTF-8"
# 인터넷 접속여부 확인
ping -c3 google.com
// node.js proxy server example for adding CORS headers to any existing http services.
// yes, i know this is super basic, that's why it's here. use this to help understand how http-proxy works with express if you need future routing capabilities
var httpProxy = require('http-proxy'),
express = require('express');
var proxy = new httpProxy.RoutingProxy();
var proxyOptions = {
host: 'devpc.baedali.co.kr',
$ = jQuery
queues = {}
running = false
queue = (name) ->
name = 'default' if name is true
queues[name] or= []
next = (name) ->
@junheon
junheon / .gitignore
Created March 29, 2012 08:45
gitginore
#----------------------------------------------------------------------------
# Ignore these files when commiting to a git repository
#
# The original version of this file is found here:
# https://github.com/fortuity/rails3-gitignore/raw/master/gitignore.txt
#
# Corrections? Improvements? Create a GitHub issue:
# https://github.com/fortuity/rails3-gitignore/issues
#----------------------------------------------------------------------------