Skip to content

Instantly share code, notes, and snippets.

@urstory
urstory / gist:dfdb9e0b10fd8109b0d8fd27fe227573
Created September 10, 2019 08:34
kafka docker-compose & test
docker-compose.yml 파일
version: '2'
networks:
test:
services:
zookeeper:
image: wurstmeister/zookeeper:3.4.6
@urstory
urstory / JpaQueryDslPredicateRepository
Last active April 7, 2018 16:52
spring boot 2.0 & querydsl 4.1.4
package examples.repository;
import com.querydsl.core.types.OrderSpecifier;
import com.querydsl.core.types.Predicate;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
import org.springframework.data.repository.NoRepositoryBean;
import java.io.Serializable;
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<context:annotation-config></context:annotation-config>
<!--
Player player = new Player();
function asynccall(jobFunction, successFunction, errorFunction, completeFunction){
setTimeout(function() {
try {
jobFunction();
} catch (err) {
errorFunction();
}
successFunction();
completeFunction();
@urstory
urstory / deletelinenumber.html
Created January 19, 2016 07:23
소스코드의 라인넘버를 삭제하기
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>linenumber</title>
<script src="https://code.jquery.com/jquery-1.11.3.js"></script>
<script>
$(function(){
$("#changeBtn").click(function() {
var source = $("#source").val();
{
"seq1" : { "name" :"kim", "price": "5000" },
"seq2" : { "name" :"lee", "price": "3000" },
"seq3" : { "name" :"kang", "price": "9000" }
}
간단하게 웹서버 실행 후, 브라우저로 결과를 확인하기.
nodejs.org 에서 node를 설치 (서치 방법은 그냥 다음다음다음다음....)
c:/myproject 폴더 생성
해당 폴더에 본인이 만든html, css 올림
c:/myprojects 폴더 안에 server.js 파일을 생성
server.js 시작 --------------------------------------
var connect = require('connect');
var serveStatic = require('serve-static');
connect().use(serveStatic(__dirname)).listen(5000);
server.js 끝 ------------------------------------------
A를 상속받는 B
function A{
this.a = function(){}
}
function B{
this.base = A;
this.base(length, length);
}
<!DOCTYPE html>
<html>
<head>
<script>
// https://gist.github.com/urstory
// Stack : FILO
function Stack(){
this.data = [];
this.push = function(d){
<!DOCTYPE html>
<html>
<head>
<script>
function Queue(){
this.data = [];
this.add = function(d){
this.data.push(d);
};