Skip to content

Instantly share code, notes, and snippets.

@wangkai2014
wangkai2014 / ubuntu-16-increase-maximum-file-open-limit-ulimit-n.md
Created April 16, 2021 23:04 — forked from ntamvl/ubuntu-16-increase-maximum-file-open-limit-ulimit-n.md
Ubuntu 16 – how to increase maximum file open limit ( ulimit -n )

Ubuntu 16 – how to increase maximum file open limit ( ulimit -n )

If you are setting up nginx,chances are you will discover your worker_connections is at some low number, such as 1024. You can’t increase this number unless you increase kernel limit as well. First of all run cat /proc/sys/fs/file-max to discover your maximum limit.

abc@ubuntu:~$ cat /proc/sys/fs/file-max
1048576
abc@ubuntu:~$ ulimit -n
1024
#!/bin/bash
############################################################
# core functions
############################################################
function check_install {
if [ -z "`which "$1" 2>/dev/null`" ]
then
executable=$1
wget xxxx/scrt-7.3.3-779.ubuntu13-64.x86_64.deb
sudo dpkg -i scrt-7.3.3-779.ubuntu13-64.x86_64.deb
wget http://download.boll.me/securecrt_linux_crack.pl
sudo perl securecrt_linux_crack.pl /usr/bin/SecureCRT
License:
Name: xiaobo_l
Company: www.boll.me
Serial Number: 03-57-081557
@wangkai2014
wangkai2014 / Service KMS
Created December 27, 2019 07:43 — forked from judero01col/Service KMS
Volume License Activation Key Service - KMS
## Find Available Target Editions
DISM.exe /Online /Get-TargetEditions
## Convert Server Standard 2019 Evaluation to Server Standard 2019
DISM /online /Set-Edition:ServerStandard /ProductKey:N69G4-B89J2-4G8F4-WWYCC-J464C /AcceptEula
## How To Activate
slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
slmgr /skms [server]:[port]
slmgr /ato
@wangkai2014
wangkai2014 / arch-firstboot.md
Created March 11, 2019 13:42 — forked from kevinwright/arch-firstboot.md
Arch first-boot configuration. Setup the first user, sudo, vm tools, and enough of a dev env to support AUR+yaourt

OpenSSH daemon

pacman -S openssh
systemctl start sshd
systemctl enable sshd.socket

Sudoers

@wangkai2014
wangkai2014 / media-query.css
Created February 25, 2019 03:58 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@wangkai2014
wangkai2014 / ffmpeg.md
Created February 13, 2019 07:11 — 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"
@wangkai2014
wangkai2014 / aria2c.py
Created July 27, 2018 12:43 — forked from lpimem/aria2c.py
Aria2 Python Client
import json
import requests
class Aria2c:
'''
Example :
client = Aria2c('localhost', '6800')
# print server version
@wangkai2014
wangkai2014 / pd2htmlEX.Ubuntu16.sh
Created July 24, 2018 05:39 — forked from agyemanjp/pd2htmlEX.Ubuntu16.sh
pdf2htmlEX install shell script for Ubuntu 16.04, using latest sources
#!/bin/bash
# pdf2htmlEX install shell script for Ubuntu 16.04, using latest sources
# Created by James A. Prempeh ( github.com/prmph )
HOME_PATH=$(cd ~/ && pwd)
LINUX_ARCH="$(lscpu | grep 'Architecture' | awk -F\: '{ print $2 }' | tr -d ' ')"
POPPLER_SOURCE="https://poppler.freedesktop.org/poppler-0.43.0.tar.xz"
FONTFORGE_SOURCE="https://github.com/fontforge/fontforge.git"
PDF2HTMLEX_SOURCE="https://github.com/coolwanglu/pdf2htmlEX.git"
@wangkai2014
wangkai2014 / preview.php
Created July 18, 2018 15:01
[PHP] Create Short Preview from Video
//
// requirements
// FFMPEG https://www.ffmpeg.org/download.html
// https://github.com/PHP-FFMpeg/PHP-FFMpeg
//
<?php
namespace App\Jobs;