Skip to content

Instantly share code, notes, and snippets.

View tehillim's full-sized avatar
💭
I may be slow to respond.

Jewon Bong tehillim

💭
I may be slow to respond.
View GitHub Profile
// 이것만 기억하자
// @State
// $
@State private var name = ""
$name
//
// ContentView.swift
// StateBindingExample
//
// Created by Jèwon Bong on 2020/07/01.
// Copyright © 2020 Appetizer. All rights reserved.
//
import SwiftUI
@tehillim
tehillim / onAppear.swift
Created June 18, 2020 03:26
SwiftUI에서 view 가 시작될때 함수 호출하는 방법
Text(String(post.content?.rendered ?? "Loading.."))
.padding(.all)
.multilineTextAlignment(.leading)
.onAppear(){
print("appeared")
}
@tehillim
tehillim / HTMLView.swift
Created June 17, 2020 06:20
SwiftUI 에서 HTML을 보여주는 view를 간략히 만들어 보았습니다.
//
// HTMLView.swift
//
// Created by Jèwon Bong on 2020/06/17.
// Copyright © 2020 Appetizer. All rights reserved.
//
import SwiftUI
import WebKit
@tehillim
tehillim / wordpress excerpt customizing.php
Created September 19, 2018 01:18
wordpress trim youtube embed code 워드프레스에서 임베드된 유튜브 링크 없애고, excerpt 크기 조절하기.
<?php
echo wp_trim_words( preg_replace('/^https?:\/\/(?:www\.)?youtu\.be\/*[a-zA-Z0-9_-]*/','',get_the_content()), 20 );
?>
@tehillim
tehillim / owldotshowing.html
Last active May 17, 2017 01:58
코드가 매우 심플하고, 모바일 소개 페이지로 쓰기에 괜찮은 jquery 라이브러리로 owl carousel이 있는데, 처음 owl carousel 을 사용하다보면, 하단에 dots 가 나오지 않는 경우가 있다. 그건 버그가 아니라, 설명서docs에 제대로 명기를 하지 않았기 때문인데.. 설명서 업데이트 되길~ jquery 버전 문제나 option 문제가 아니라, theme에 대한 문제이다.. dots 는 기본값이 true이다. 해결 방법은 간단하다. owl.theme.default.min.css 를 index에 포함시킴 class에 owl-theme을 포함시킴 That’s it. http://webstory.pos…
:
<link rel="stylesheet" href="owl/assets/owl.theme.default.min.css">
:
<div class="owl-carousel owl-theme">
<div>content1</div>
<div>content2</div>
<div>content3</div>
@tehillim
tehillim / webkitappearance.css
Created August 25, 2016 03:41
인풋박스나 버튼에서 웹킷 기본 속성을 제거한후, 원하는 스타일을 입혀보세요. 훨씬 시간이 단축됩니다.
.something {
-webkit-appearance: none;
}
@tehillim
tehillim / removerightnow.php
Last active August 3, 2016 16:50
워드프레스 대쉬보드(알림판)에서 사이트 현황판 없애는 방법
function remove_dashboard_widgets() {
remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' ); // Right Now
}
add_action('wp_dashboard_setup', 'remove_dashboard_widgets');
@tehillim
tehillim / ionic-android-back.js
Created February 3, 2016 15:48
아이오닉 안드로이드 Back버튼 앱 종료 확인 다이얼로그 띄우기
.run(function($ionicPlatform, $ionicPopup) {
$ionicPlatform.registerBackButtonAction(function(event) {
if (true) {
$ionicPopup.confirm({
title: '종료확인',
template: '앱을 종료할까요?'
}).then(function(res) {
if (res) {
ionic.Platform.exitApp();
@tehillim
tehillim / vertical-middle.html
Created July 30, 2015 06:03
초간단 세로 정렬, css 상하 중간에 글씨 맞추기, 어렵게 생각하지 말고, table속성을 이용해보자.
<div class="arr"><div class="v">a</div></div>
<div class="arr"><div class="v">b</div></div>
<div class="arr"><div class="v">c</div></div>
<style>
div {
background: gray;
height: 200px;
width: 200px;
}