Skip to content

Instantly share code, notes, and snippets.

View lesstif's full-sized avatar

KwangSeob Jeong lesstif

View GitHub Profile
@lesstif
lesstif / RedisRankingTest.php
Created December 13, 2019 02:17
Laravel PHPRedis example for ordered set ranking
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Tests\TestCase;
class RedisRankingTest extends TestCase
{
@lesstif
lesstif / jsonpath_test2.json
Last active December 11, 2019 00:58
sample json data for jsonpath study
[
{
"firstName": "John",
"lastName": "doe",
"age": 26,
"address": {
"streetAddress": "naist street",
"city": "Nara",
"postalCode": "630-0192"
},
@lesstif
lesstif / jsonpath_test1.json
Last active December 11, 2019 00:48
example json data for jsonpath study
{
"string": "foo",
"number": 5,
"array": [
1,
2,
3
],
"object": {
"property": "value",
@lesstif
lesstif / nginx-next-cloud.conf
Last active December 6, 2019 08:30
nginx virtual host configuration for next cloud server
## see https://docs.nextcloud.com/server/16/admin_manual/installation/nginx.html
upstream php-handler {
server 127.0.0.1:9000;
#server unix:/var/run/php/php7.2-fpm.sock;
}
server {
listen 80;
listen [::]:80;
@lesstif
lesstif / nginx-next-cloud.conf
Created December 6, 2019 08:27
nginx virtual host configuration for next cloud server
## see https://docs.nextcloud.com/server/16/admin_manual/installation/nginx.html
upstream php-handler {
server 127.0.0.1:9000;
#server unix:/var/run/php/php7.2-fpm.sock;
}
server {
listen 80;
listen [::]:80;
@lesstif
lesstif / merge_ssl_cacert_for_nginx.sh
Last active October 23, 2019 03:06
nginx 를 위해 CA, Root CA 인증서를 SSL 인증서와 병합
#!/bin/bash
if [ "$#" -lt 1 ]; then
echo "$# is Illegal number of parameters."
echo "Usage: $0 host_ssl_cert_path"
echo "Example: $0 /etc/pki/tls/certs/snake-oil.crt";
exit 1
fi
TARGET=$1
@lesstif
lesstif / nginx-vhost-example.conf
Created October 11, 2019 11:21
nginx virtual host setup example
server {
listen 80;
server_name example.com;
charset utf-8;
rewrite_log on;
access_log /var/log/nginx/jira-lesstif.com.access.log main;
error_log /var/log/nginx/jira-lesstif.com.error.log notice;
client_max_body_size 10M;
location / {
proxy_pass http://127.0.0.1:9080;
@lesstif
lesstif / nginx.conf
Created October 11, 2019 11:19
default nginx config
# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
user nginx;
worker_processes 4;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
@lesstif
lesstif / nginx.conf
Created October 11, 2019 11:19
default nginx config
# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
user nginx;
worker_processes 4;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
@lesstif
lesstif / profiles.json
Created October 6, 2019 08:47
Windows Terminal Profiles.json
{
"globals" :
{
"alwaysShowTabs" : true,
"defaultProfile" : "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"initialCols" : 120,
"initialRows" : 30,
"keybindings" :
[
{