Skip to content

Instantly share code, notes, and snippets.

View bi-kim's full-sized avatar
๐Ÿ”ฅ
Do the right thing

Bi Kim bi-kim

๐Ÿ”ฅ
Do the right thing
View GitHub Profile
@bi-kim
bi-kim / autoplay.js
Created May 8, 2021 07:13
viemo auto play script
$(function () {
var iframe = document.querySelector('#hero-movie');
var player = new Vimeo.Player(iframe, {muted: true});
player.ready().then(function () {
player.play();
player.setVolume(0.5);
});
});
@bi-kim
bi-kim / basic.html
Last active May 8, 2021 07:12
Vimeo embed player
<html>
<head>
<title>{page_title}</title>
</head>
<body>
<iframe id="hero-movie" src="https://player.vimeo.com/video/{video_id}" width="{video_width}" height="{video_height}" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<script src="https://player.vimeo.com/api/player.js"></script>
<script>
@bi-kim
bi-kim / plugin.php
Created May 5, 2021 12:51
SparkPayment ์ „์ฒด์ฝ”๋“œ
<?php
namespace Sparkweb\XePlugin\SparkPayment;
use Route;
use XeRegister;
use Xpressengine\Plugin\AbstractPlugin;
class Plugin extends AbstractPlugin
{
/**
@bi-kim
bi-kim / plugin.php
Created May 5, 2021 12:49
boot ์ฝ”๋“œ
public function boot()
{
// implement code
$this->route();
$this->setSettingsMenu();
}
@bi-kim
bi-kim / plugin.php
Created May 5, 2021 12:48
ํ™”๋ฉด์— ๋ฉ”๋‰ด ๋…ธ์ถœ
private function setSettingsMenu()
{
$menus = [
'spark_business.config' => [
'title' => '์˜จ๋ผ์ธ ๊ฒฐ์ œ',
'display' => true,
'description' => '',
'ordering' => 6000
],
];
@bi-kim
bi-kim / plugin.php
Created May 5, 2021 12:43
plugin.php route method
private function route()
{
Route::group([
'namespace' => 'Sparkweb\XePlugin\SparkPayment',
], function () {
require __DIR__ . '/routes.php';
});
}
@bi-kim
bi-kim / create_plugin.sh
Created May 5, 2021 12:32
XE3 ํ”Œ๋Ÿฌ๊ทธ์ธ ์ƒ์„ฑ artisan
php artisan make:plugin spark_payment sparkweb
@bi-kim
bi-kim / spreadOperator.js
Created January 20, 2019 04:27
spreadOperator.js
let apeach = {
heart: 'pink',
bodyColor: 'White',
borderColor: 'Black'
}
({heart, ...color}) = apeach;
//heart: "pink"
//color: {bodyColor: "White", borderColor: "Black"}
@bi-kim
bi-kim / swap.js
Created January 19, 2019 15:05
swap.js
var a = 1;
var b = 3;
[a, b] = [b, a];
console.log(a); // 3
console.log(b); // 1
@bi-kim
bi-kim / apeach.js
Last active January 19, 2019 15:09
apeach
let apeach = {
heart: 'pink',
bodyColor: 'White',
borderColor: 'Black'
}
// apeach ์˜ค๋ธŒ์ ํŠธ์˜ ์†์„ฑ์„ ์ถ”์ถœํ•˜์—ฌ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
function getApeachHeart({heart}) {
return heart;
}