Skip to content

Instantly share code, notes, and snippets.

@pokev25
pokev25 / install-tmux.sh
Last active February 8, 2024 07:22 — forked from rothgar/install-tmux
Install tmux 2.8 on centos 7
# Install tmux 2.8 on Centos
# install deps
yum install gcc kernel-devel make ncurses-devel
# cd src
cd /usr/local/src
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -LO https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz
@pokev25
pokev25 / Microsoft.PowerShell_profile.ps1
Last active July 3, 2020 01:37
PowerShell docker-compose alias from oh-my-zsh
# docker-compose Set-Alias
function DockerComposeUp {
docker-compose up $args
}
function DockeComposeBuild {
docker-compose build
}
function DockeComposeExec {
docker-compose exec $args
}
@pokev25
pokev25 / Settings.json
Last active June 11, 2020 05:13
Windows Terminal Settings
// This file was initially generated by Windows Terminal 1.0.1401.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@pokev25
pokev25 / RedisUserSessionRegistry.java
Created October 19, 2016 04:29
spring-websocket-in-a-tomcat-cluster
import java.util.Set;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.BoundHashOperations;
import org.springframework.data.redis.core.BoundSetOperations;
import org.springframework.data.redis.core.RedisOperations;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.serializer.StringRedisSerializer;
import org.springframework.messaging.simp.user.UserSessionRegistry;
@pokev25
pokev25 / shellcommand.sh
Created December 21, 2016 04:51 — forked from jeff1326/shellcommand.sh
script to parse PHP short open tags and convert ones to normal
find project/dir/ -type f -iname "*.php" -exec php -d short_open_tag=On the_script.php {} \;
@pokev25
pokev25 / OffAladinFile.py
Last active June 7, 2019 06:52
텔레그램 봇으로 알라딘 중고매장 검색 결과 전달 받기
# -*- coding: utf-8 -*-
import sys
import re
import mechanize
import urllib2
import cookielib
from bs4 import BeautifulSoup
import telepot
@pokev25
pokev25 / varnish.tokyo.vcl
Created February 23, 2018 00:49 — forked from kimlindholm/varnish.tokyo.vcl
Varnish configuration example
# VCL configuration file for Varnish
# Define which IP addresses or hosts have access to files that are
# blocked from the public internet
acl internal {
"localhost";
}
# Define origin servers
backend web { .host = "1.2.3.4"; .port = "80"; }
@pokev25
pokev25 / key1.conf
Last active May 2, 2017 11:23
logstash 설정
input {
redis {
host => "192.168.0.20"
data_type => "list"
key => "key1"
codec => "json"
db => 3
type => "key1"
}
}
@pokev25
pokev25 / rolling_resatrt.sh
Created March 29, 2017 01:00
elasticearch rolling restart
#!/bin/bash
#
# perform a rolling restart of all data/master nodes in a stable cluster
#
# args: [elasticsearch-host:port]
#
set -e
@pokev25
pokev25 / goaccess conf
Last active March 21, 2017 00:37
goaccess 1.2
cd /usr/local/etc
vim goaccess.conf
uncomment
# Apache/NGINX's log formats below.
#
time-format %H:%M:%S
# Apache/NGINX's log formats below.