Instantly share code, notes, and snippets.

View gist:fbbfc14ecfbad1b7bd97
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
View gist:3885607
var Calcurator = {
"add" : function(a, b){
return parseInt(a) + parseInt(b);
},
"minus" : function(a, b){
return a - b;
}
};
View gist:3885593
<!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">
View gist:3885547
$(document).ready(function(){
test("add 함수 테스트", function(){
ok(Calcurator.hasOwnProperty("add"), "add 함수 존재");
equal(Calcurator.add(1, 2), 3, "add 함수에 1과 2를 더한 결과는 3");
});
});
View gist:3885496
test("테스트 명", function(){
// ....
})
View gist:3885477
<!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(){
View gist:3885470
var Calcucator = {
"add" : function(a, b){
return a + b;
},
"minus" function(a, b){
return a - b;
}
};
View helloGist.js
alert("Hello Gist!");
View social-context.xml
<?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