Skip to content

Instantly share code, notes, and snippets.

@love5757
love5757 / DNS Prefetch domains
Created November 16, 2023 10:12 — forked from lukecav/DNS Prefetch domains
WP Rocket - Advanced Options Prefetch DNS requests examples
//maps.googleapis.com
//maps.gstatic.com
//fonts.googleapis.com
//fonts.gstatic.com
//ajax.googleapis.com
//apis.google.com
//google-analytics.com
//www.google-analytics.com
//ssl.google-analytics.com
//youtube.com
@love5757
love5757 / API.md
Created November 11, 2020 11:39 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@love5757
love5757 / vim-heroku.sh
Created May 21, 2020 08:01 — forked from dvdbng/vim-heroku.sh
Run vim in heroku updated 2017
mkdir ~/vim
cd ~/vim
# Staically linked vim version compiled from https://github.com/ericpruitt/static-vim
# Compiled on Jul 20 2017
curl 'https://s3.amazonaws.com/bengoa/vim-static.tar.gz' | tar -xz
export VIMRUNTIME="$HOME/vim/runtime"
export PATH="$HOME/vim:$PATH"
cd -
@love5757
love5757 / Function.Array-Group-By.php
Created August 17, 2018 02:40 — forked from mcaskill/Function.Array-Group-By.php
PHP : Groups an array by a given key
<?php
if (!function_exists('array_group_by')) {
/**
* Groups an array by a given key.
*
* Groups an array into arrays by a given key, or set of keys, shared between all array members.
*
* Based on {@author Jake Zatecky}'s {@link https://github.com/jakezatecky/array_group_by array_group_by()} function.
* This variant allows $key to be closures.
@love5757
love5757 / system-operations.sh
Created September 5, 2017 05:56
시스템 정보 슬랙으로 받기
#!/bin/bash
df -h | sed -e '1s/^/```/' -e '$a```' | bash slack_message.sh -h https://hooks.slack.com/services/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 -c system-operations -u sysopsusr -i comet -C 1974D2 -p enable -T "$(hostname) system disk space usage"
@love5757
love5757 / comento.sh
Created September 5, 2017 05:55
코멘토 답변 상태 확인 후 알람
#! /bin/bash
response=`curl "https://comento.kr/assets/lib/reqlist" -H "origin: https://comento.kr" -H "accept-encoding: gzip, flate, br" -H "x-requested-with: XMLHttpRequest" -H "accept-language: ko-KR,ko;q=0.8,en-US;q=0.6,en;q=0.4" -H "user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36" -H "content-type: application/x-www-form-urlencoded; charset=UTF-8" -H "accept: */*" -H "referer: https://comento.kr/mentoring/mentor/" -H "authority: comento.kr" -H "cookie: PHPSESSID=kc8f8gb27akgs88mhpglrf3631; couser=30991; _ga=GA1.2.2096714784.1504497212; _gid=GA1.2.1555065651.1504497212" --data "sort_flag=2" --compressed | grep mentoring-log-box`
echo $response
if [ -n "$response" ]; then
./slack_message.sh -h https://hooks.slack.com/services/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 -c comento -u comento -i terminal -m "@love5757 https://comento.kr/mentoring/mentor/"
{"version":1,"resource":"file:///Volumes/philip/developers/jychoi03_workspace/cafe24wms-erp/middlework/model/Install/Server/modelInstallServerInfo.php","entries":[{"id":"0BIr.php","source":"Undo Accept Diff","timestamp":1733898218000}]}
@love5757
love5757 / Redis-Server-Config
Created May 30, 2017 10:19
Redis Server Config Scrap
대상 파일: https://raw.github.com/antirez/redis/2.4.15/redis.conf
요약
기본설정
daemonize (daemon으로 실행 여부 설정)
pidfile (daemon 실행시 pid가 저장될 파일 경로)
port (접근을 허용할 port 설정)
bind (요청을 대기할 interface[랜카드] 설정)
unixsocket, unixsocketperm (요청을 대기할 unix 소켓 설정)