Skip to content

Instantly share code, notes, and snippets.

View Unayung's full-sized avatar
🎉

Chen Chia Yang Unayung

🎉
View GitHub Profile
@Unayung
Unayung / webpack.md
Last active September 17, 2020 14:51
webpack

How to using jQuery plugins in Rails 6 with webpacker

for example we want using slick-carousel in our application.

  1. yarn add jquery slick-carousel expose-loader
  2. add following lines in app/javascript/packs/application.js
require('slick-carousel')
require('slick-carousel/slick/slick.css')
@Unayung
Unayung / review_1211.md
Last active December 11, 2020 03:33
Sprint Review 1211

Sprint Review

review DoD review shippable items

Sprint Retrospective

review processes good and bad what can be changed

@Unayung
Unayung / rand_histories.rb
Last active February 17, 2021 08:24
rand histories
def rand_source
a = ['line', 'fb', 'ettoday', 'nonews', 'cti', 'momo', '7-11']
a[rand(7)]
end
def rand_campaign
a = ['0923-加入會員', nil, '年中大促', '週年慶九折', '1111', '1212', '跳樓大拍賣']
a[rand(7)]
end
@Unayung
Unayung / quick reply.rb
Last active January 26, 2021 04:12
快速回覆 related
一則 broadcast 最多一則文字一則圖片一組快回
一項 task 最多一則文字一則圖片一組快回
快速回覆 items 最多都是 13 個
文字部份 800 中文字 ( 1600 characters )
{
"type": "text",
"text": "Select your favorite food category or send me your location!",
"quickReply": {
@Unayung
Unayung / example01.html
Created April 4, 2025 11:41
中午吃什麼
<!DOCTYPE html>
<html>
<head>
<title>中午吃什麼</title>
<style>
body { text-align: center; font-family: Arial, sans-serif; }
button { padding: 10px 20px; font-size: 16px; }
#lunch { margin-top: 20px; font-size: 18px; }
</style>
</head>
@Unayung
Unayung / example02.html
Created April 4, 2025 12:50
中午吃什麼v2
<!DOCTYPE html>
<html>
<head>
<title>中午吃什麼</title>
<style>
body {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
@Unayung
Unayung / gemini-code-review.sh
Created July 23, 2025 05:58
gemini-code-review.sh
#!/bin/bash
# Gemini Code Review Hook for Claude Code
# This script calls Gemini CLI to review code changes made by Claude Code
# Read JSON input from Claude Code
json_input=$(cat)
# Extract tool information
tool_name=$(echo "$json_input" | jq -r '.tool_name // empty')
@Unayung
Unayung / settings.json
Created July 23, 2025 06:00
settings.json
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|MultiEdit|Write",
"hooks": [
{
"type": "command",
"command": "./scripts/gemini-code-review.sh"
}
#!/usr/bin/env sh
#
# for this to work you must configure sudo such that
# it will be able to run the command without password
#
# see this wiki page for information:
# - https://github.com/koekeishiya/yabai/wiki/Installing-yabai-(latest-release)#configure-scripting-addition
#
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
# Moving windows
ctrl + alt + shift - h : yabai -m window --warp west
ctrl + alt + shift - j : yabai -m window --warp south
ctrl + alt + shift - k : yabai -m window --warp north
ctrl + alt + shift - l : yabai -m window --warp east
#cmd + ctrl + alt + shift - up : yabai -m window --focus north
#cmd + ctrl + alt + shift - down : yabai -m window --focus south
#cmd + ctrl + alt + shift - left : yabai -m window --focus west