Skip to content

Instantly share code, notes, and snippets.

View rotoshine's full-sized avatar
🎸
Rock!

Roto (TAEHEE KIM) rotoshine

🎸
Rock!
View GitHub Profile
@rotoshine
rotoshine / gist:fbbfc14ecfbad1b7bd97
Created June 12, 2015 05:34
telegram-cli bot test
assembler = {}
function on_msg_receive (msg)
print_r(msg)
local chat_name = msg.to.print_name
local username = msg.from.print_name
local receive_msg = string.lower(msg.text)
if ( string.find(receive_msg, "assemble!") or string.find(receive_msg, "어셈블!") ) then
assembler[username] = username
local assemble_users = "";
for k, v in pairs(assembler) do
@rotoshine
rotoshine / gist:3885607
Created October 13, 2012 18:10
Calculator.add refactoring
var Calcurator = {
"add" : function(a, b){
return parseInt(a) + parseInt(b);
},
"minus" : function(a, b){
return a - b;
}
};
@rotoshine
rotoshine / gist:3885593
Created October 13, 2012 18:05
Calculator.add test2
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Calculator Test</title>
<link rel="stylesheet" href="http://code.jquery.com/qunit/qunit-1.10.0.css">
<script type="text/javascript" src="http://code.jquery.com/qunit/qunit-1.10.0.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="Calculator.js"></script>
<script type="text/javascript">
@rotoshine
rotoshine / gist:3885547
Created October 13, 2012 17:54
Calculator.add test
$(document).ready(function(){
test("add 함수 테스트", function(){
ok(Calcurator.hasOwnProperty("add"), "add 함수 존재");
equal(Calcurator.add(1, 2), 3, "add 함수에 1과 2를 더한 결과는 3");
});
});
@rotoshine
rotoshine / gist:3885496
Created October 13, 2012 17:39
qunit test sample
test("테스트 명", function(){
// ....
})
@rotoshine
rotoshine / gist:3885477
Created October 13, 2012 17:33
QUnit Sample
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>QUnit Example</title>
<link rel="stylesheet" href="http://code.jquery.com/qunit/qunit-1.10.0.css">
<script type="text/javascript" src="http://code.jquery.com/qunit/qunit-1.10.0.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
@rotoshine
rotoshine / gist:3885470
Created October 13, 2012 17:31
Calcurate.js sample code
var Calcucator = {
"add" : function(a, b){
return a + b;
},
"minus" function(a, b){
return a - b;
}
};
@rotoshine
rotoshine / helloGist.js
Created March 19, 2012 11:50
Gist Test
alert("Hello Gist!");
@rotoshine
rotoshine / social-context.xml
Created March 19, 2012 11:26
Spring Social을 위한 Spring Context
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jee="http://www.springframework.org/schema/jee"
xsi:schemaLocation="
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
http://www.springframework.org/schema/beans