Skip to content

Instantly share code, notes, and snippets.

@joeteerawit
joeteerawit / settings.xml
Created December 2, 2019 08:46
sample maven settings for connect to nexus
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>nexus</id>
<username>admin</username>
<password>admin</password>
</server>
</servers>
@joeteerawit
joeteerawit / alert_rules.yaml
Last active November 13, 2019 15:03
Example config monitoring server with Prometheus stack
groups:
- name: ycap
rules:
- alert: service_up
expr: up == 1
labels:
app: ycap
severity: normal
correlate: service_up,service_down
@joeteerawit
joeteerawit / project-ideas01.md
Created September 13, 2019 05:21 — forked from MWins/project-ideas01.md
Back end Projects - list

Project Ideas

Ok. I'm going to list off some ideas for projects. You will have to determine if any particular idea is good enough to include in a portfolio. These aren't creative ideas. They likely already exist. Some are way too advanced while others are simplistic.

I will recommend to post any project you make to github and make a github project page for it. Explain in as much detail as possible how you made it, how it can be improved etc. Document it.

If you pick an advanced idea, setup a development roadmap and follow it. This will show some project management skills.

Another piece of advice for those who are design challenged. Use different front end frameworks and use different themes for those frameworks to provide appealing designs without looking like yet another bootstrap site.

@joeteerawit
joeteerawit / Dockerfile
Last active April 2, 2020 16:32
utorrent web servier base image
FROM ubuntu:18.04
ADD http://download-hr.utorrent.com/track/beta/endpoint/utserver/os/linux-x64-debian-7-0 utserver.tar.gz
RUN apt-get update && \
apt-get install -y \
libssl1.0.0 \
libssl-dev && \
tar -xzf utserver.tar.gz && \
mv utorrent-server-alpha-v3_3 utorrent && \
@joeteerawit
joeteerawit / tmux-cheatsheet.markdown
Created March 29, 2019 07:23 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@joeteerawit
joeteerawit / nginx-tuning.md
Created March 25, 2019 07:44 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

| Number | Description | Ref |
| :----: | ---------------------------------------------------------------------------- | :---: |
| 0 | ไม่มีสิทธิ์ | --- |
| 1 | สิทธิ์การรัน(Execute) ไฟล์ | --x |
| 2 | สิทธิ์การเขียนไฟล์ | -w- |
| 3 | สิทธิ์การรัน(Execute) และเขียนไฟล์ : 1 (execute) + 2 (write) = 3 | -wx |
| 4 | สิทธิ์การอ่านไฟล์ | r-- |
| 5 | สิทธิ์การอ่านและรัน(Execute) ไฟล์ : 4 (read) + 1 (execute) = 5 | r-x |
| 6 | สิทธิ์การอ่านและเขียนไฟล์ : 4 (read) + 2 (write) = 6 | rw- |
| 7 | สิทธิ์การอ่าน เขียน และรัน(Execute) ไฟล์ : 4 (read) + 2 (write) + 1 (execute) = 7 | rwx |
| No | operator | Description |
| :---: | :------: | -------------------------------------- |
| 1 | + | เพ่ิมสิทธิ์ให้กับ file หรือ directory. |
| 2 | - | ลบสิทธิ์ให้กับ file หรือ directory. |
| 3 | = | set สิทธิ์ให้กับ file หรือ directory. |