Skip to content

Instantly share code, notes, and snippets.

View sjoonk's full-sized avatar

Sukjoon Kim sjoonk

View GitHub Profile
@sjoonk
sjoonk / naver_syndication_document_sample.xml
Last active August 29, 2015 14:09
네이버 신디케이션 제대로 쓰기
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://webmastertool.naver.com">
<id>
http://www.syndi-example.com/bbs/
</id>
<title>Naver Syndication Sample Document</title>
<author>
<name>webmaster</name>
<email>webmaster@donotsend.email</email>
</author>
add_action( 'init', 'usefulpa_add_kakao_provider_to_wsl' );
function usefulpa_add_kakao_provider_to_wsl() {
if ( function_exists ('wsl_version') ) {
global $WORDPRESS_SOCIAL_LOGIN_PROVIDERS_CONFIG;
$WORDPRESS_SOCIAL_LOGIN_PROVIDERS_CONFIG[] = ARRAY(
"provider_id" => "Kakao",
add_filter( 'validate_username', 'usefulpa_validate_username_fix' );
function usefulpa_validate_username_fix( $valid, $username ) {
if ( empty($username) ) return false;
}
@sjoonk
sjoonk / main.js
Created December 4, 2014 05:50
Backbone sample code in a page
// main.js
// Change Underscore's default delimiters
// 'cause ERB-style delimiters aren't my cup of tea
// http://documentcloud.github.io/underscore/#template
_.templateSettings = {
interpolate: /\{\{(.+?)\}\}/g
};
var App = (function() {
@sjoonk
sjoonk / gist:1091615
Created July 19, 2011 07:44
FeedWordPress face image sample
// In a post context
<?php $img = get_feed_meta('face'); if (strlen($img) > 0): ?>
<img src="<?=$img?>" alt="" />
<?php endif; ?>
@sjoonk
sjoonk / gist:1099227
Created July 22, 2011 10:42
Facebook OpenGraph Integration with WordPress
<meta property="og:title" content="기업용으로 활용가능한 오픈소스 SNS 솔루션들" />
<meta property="og:site_name" content="유스풀패러다임" />
<meta property="og:description" content="시중에 출시되어 있는 많은 소셜 네트워킹(SNS) 솔루션들 중 기업이나 공공기관, 학교, 비영리단체 등 조직 내부에서 사용할 수 있는 오픈소스 기반 SNS 솔루션들을 몇 가지 소개합니다." />
<meta property="og:type" content="article" />
<meta property="og:url" content="http://usefulparadigm.com/2011/06/21/oss-social-networking-solutions-for-enterprise/" />
<meta property="og:image" content="http://usefulparadigm.com/wp-content/uploads/2011/06/yammericon1.jpg" />
<meta property="fb:admins" content="[여기에 관리자 ID를 등록합니다]" />
<meta property="fb:app_id" content="[여기에 APP_ID를 등록합니다]" />
@sjoonk
sjoonk / gist:1199582
Created September 7, 2011 02:16
A Rails 3.1 template for adding the Backbone.js skeleton structure
inside('app/assets/javascripts') do
run "mkdir models"
run "mkdir views"
run "mkdir routes"
run "touch app.js"
end
@sjoonk
sjoonk / gist:1357064
Created November 11, 2011 02:59
Hello World Gadget
<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="HelloWorld">
<Require feature="opensocial-0.9"/>
</ModulePrefs>
<Content type="html">
<![CDATA[
Hello World!
]]>
</Content>
@sjoonk
sjoonk / fan_event.html
Created November 28, 2011 08:47
Facebook Page Tab template
<!doctype html>
<html xmlns:fb="https://www.facebook.com/2008/fbml">
<head>
<meta charset="utf-8">
<title>Fan Event</title>
<script src="http://code.jquery.com/jquery-1.6.2.min.js" type="text/javascript"></script>
</head>
<body>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/ko_KR/all.js"></script>
@sjoonk
sjoonk / tr_server.erl
Created November 30, 2011 06:55
a erlang/otp gen_server module
%%%-------------------------------------------------------------------
%%% @author Martin & Eric <erlware-dev@googlegroups.com>
%%% [http://www.erlware.org]
%%% @copyright 2008-2010 Erlware
%%% @doc RPC over TCP server. This module defines a server process that
%%% listens for incoming TCP connections and allows the user to
%%% execute RPC commands via that TCP stream.
%%% @end
%%%-------------------------------------------------------------------