Skip to content

Instantly share code, notes, and snippets.

@yourchanges
yourchanges / sysctl.conf.md
Created September 27, 2023 06:20 — forked from jfeilbach/sysctl.conf.md
10/40 Gb NIC Linux Kernel Performance Tuning for samba file server

TCP tuning

The most important TCP tuning areas since kernel 4.9 are:

  • packet pacing
  • dynamic TSO sizing
  • TCP small queues
  • BBR TCP congestion algorithm

Definitions

  • Gb = gigabit
@yourchanges
yourchanges / HighTrafficServerSettings.md
Created September 27, 2023 06:19 — forked from fschiettecatte/HighTrafficServerSettings.md
High Traffic Server Settings on RHEL / AlmaLinux / Rocky / EuroLinux / CentOS 8

High Traffic Server Settings on RHEL / AlmaLinux / Rocky / EuroLinux / CentOS 8

I recently did some work to optimize the network configuration of an AlmaLinux 8 based web server that receives a lot of traffic.

Of course these settings also apply to RHEL / Rocky / EuroLinux / CentOS 8 (hereafter referred to as Linux 8.) I think these should also work on RHEL / AlmaLinux / Rocky / EuroLinux 9 as well but I have not yet tested them.

There is a lot of information on the web for this and it distills down to a minimum recommended configuration, and a recommended configuration.

The minimum recommended configuration should be sufficient for servers with less than 10Gb, and the recommended configuration should be sufficient for servers with 10Gb or more.

@yourchanges
yourchanges / ffmpeg.md
Created April 26, 2018 09:43 — forked from v5tech/ffmpeg.md
ffmpeg视频合并、格式转换、截图

使用ffmpeg合并MP4文件

ffmpeg -i "Apache Sqoop Tutorial Part 1.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
ffmpeg -i "Apache Sqoop Tutorial Part 2.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts
ffmpeg -i "Apache Sqoop Tutorial Part 3.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate3.ts
ffmpeg -i "Apache Sqoop Tutorial Part 4.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate4.ts
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts|intermediate3.ts|intermediate4.ts" -c copy -bsf:a aac_adtstoasc "Apache Sqoop Tutorial.mp4"
We can't make this file beautiful and searchable because it's too large.
pattern,cnt
^,1657
-$,376
--,355
root.*/file.*\n,348
(?m)^hello world,338
\s+,296
\s*,278
^[a-z],275
[cg]pu,245
@yourchanges
yourchanges / gist:e4fe68ba6286cd6eaee1
Last active August 29, 2015 14:25 — forked from huowa222/gist:9640856
recommendation opensource list
原文地址:http://in.sdo.com/?p=1707
收集和整理了目前互联网上能找到的开源推荐系统,并附上了个人的一些简单点评(未必全面准确),这个列表是目前为止比较全面的了,希望对大家了解掌握推荐系统有帮助(文/陈运文)
SVDFeature
由上海交大的同学开发,采用C++语言,代码质量很高。去年我们参加KDD竞赛时用过,很好很方便,而且出自咱们国人之手,所以置顶推荐!
项目地址:
http://svdfeature.apexlab.org/wiki/Main_Page
SVDFeature包含一个很灵活的Matrix Factorization推荐框架,能方便的实现SVD、SVD++等方法, 是单模型推荐算法中精度最高的一种。SVDFeature代码精炼,可以用相对较少的内存实现较大规模的单机版矩阵分解运算。
另外含有Logistic regression的model,可以很方便的用来进行ensemble运算
package main
import (
"bufio"
"encoding/csv"
"encoding/json"
"fmt"
"io"
"os"
"path/filepath"
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static

替换上你的Email,密码,域名ID,记录ID等参数,就可以运行了。 会在后台一直运行,每隔30秒检查一遍IP,如果修改了就更新IP。

获得domain_id可以用curl curl -k https://dnsapi.cn/Domain.List -d "login_email=xxx&login_password=xxx"

获得record_id类似 curl -k https://dnsapi.cn/Record.List -d "login_email=xxx&login_password=xxx&domain_id=xxx"

package main
import (
"github.com/AllenDang/w32"
"io"
"os"
"unsafe"
"errors"
"fmt"
"syscall"