Skip to content

Instantly share code, notes, and snippets.

View limjinsun's full-sized avatar
✍️
Writing Code

Jin Lim limjinsun

✍️
Writing Code
  • Flender
  • Dublin
View GitHub Profile
@limjinsun
limjinsun / SplitText3.min.js
Created October 21, 2024 21:59 — forked from nicubarbaros/SplitText3.min.js
SplitText from GSAP - not commercial use
/* eslint-disable */
!(function(D, u) {
"object" == typeof exports && "undefined" != typeof module
? u(exports)
: "function" == typeof define && define.amd
? define(["exports"], u)
: u(((D = D || self).window = D.window || {}));
})(this, function(e) {
"use strict";
var v = "";
@limjinsun
limjinsun / Mac OS - How to set "jemalloc" for Rails.md
Last active October 5, 2022 14:40
Mac OS how to set "jemalloc" for ruby.
brew install jemalloc
❯ find /usr -iname "*jemalloc*"

find: /usr/sbin/authserver: Permission denied
@limjinsun
limjinsun / _form.html.erb
Created November 21, 2019 19:18
루비온레일즈 폼오토제너레이션 액티브레코드와 연동
<%= form_with(model: school, local: true) do |form| %>
<% if school.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(school.errors.count, "error") %> prohibited this school from being saved:</h2>
<ul>
<% school.errors.full_messages.each do |message| %>
<li><%= message %></li>
<% end %>
@limjinsun
limjinsun / limjinsun.postach.io
Created September 6, 2019 21:21
Collection of memos - limjinsun.postach.io
limjinsun.postach.io
limjinsun.postach.io
limjinsun.postach.io
@font-face {
font-family: 'Kakao';
font-style: normal;
font-weight: 400;
src: local('Kakao Regular'), local('KakaoOTF Regular'),
url('https://cdn.jsdelivr.net/gh/kakao/kakao.github.io/assets/fonts/KakaoOTF-bRg.eot') format('eot'),
url('https://cdn.jsdelivr.net/gh/kakao/kakao.github.io/assets/fonts/KakaoOTF-bRg.woff2') format('woff2'),
url('https://cdn.jsdelivr.net/gh/kakao/kakao.github.io/assets/fonts/KakaoOTF-bRg.woff') format('woff'),
url('https://cdn.jsdelivr.net/gh/kakao/kakao.github.io/assets/fonts/KakaoOTF-bRg.otf') format('opentype');
}

스프링 부트앱을 war파일로 톰캣에 배포할때 코드샘플

@SpringBootApplication
public class SpringBootWarDeploymentApplication  extends SpringBootServletInitializer {
	
	@Override
 protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {

자바 스프링 jar파일 디플로이할때 셋업 샘플

/etc/systemd/system/luasjar.service root@vps584959:/etc/systemd/system# cat luasjar.service

[Unit]
Description=Spring Boot HelloWorld
After=syslog.target
After=network.target[Service]

하이버네트 many to many 릴레이션 셋업

Many to Many 릴레이션 셋업은 필수적으로 중간의 조인테이블이 필요하다.

SET foreign_key_checks=0;

CREATE TABLE `course_student` (
  `course_id` int(11) NOT NULL,

하이버네트에서 원투매니 릴레이션 세팅법

DROP SCHEMA IF EXISTS `hb-03-one-to-many`;

CREATE SCHEMA `hb-03-one-to-many`;

use `hb-03-one-to-many`;