Skip to content

Instantly share code, notes, and snippets.

View corerman's full-sized avatar
🚩

corerman

🚩
View GitHub Profile
@corerman
corerman / typecho.conf
Created May 18, 2018 03:25
nginx_typecho.conf
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
@corerman
corerman / Bubble_Sort.sh
Created May 17, 2018 07:31
算法: Bubble_Sort.sh 冒泡排序
#include <stdio.h>
int main(){
int numlist[100],len=0,num=0;
while(scanf("%d",&num)!=EOF){
numlist[len]=num;
len++;
}
int tempnum=0;
@corerman
corerman / Manjaro 安装 LNMP环境.md
Last active May 16, 2018 09:20
Manjaro 安装 LNMP环境

1. 编译Nginx

1.1 创建用户 及 用户组
    sudo groupadd -r www
    sudo useradd -s /sbin/nologin -g www -r www
    
1.2 下载Nginx源码包 并 解压
    wget http://nginx.org/download/nginx-1.14.0.tar.gz
@corerman
corerman / Manjaro_init.sh
Last active December 23, 2020 00:57
Manjaro 安装后的操作
0. 安装
# 启动时选择第二项boot(non-free),Manjaro自带的驱动精灵会帮你安装好所需驱动,笔记本双显卡则会帮你安装bumblebee
driver boot(non-free)
如果是WIndows+Manjaro双系统安装,
步骤可以参考:https://my.oschina.net/langxSpirit/blog/1633384
@corerman
corerman / dell_install_Manjaro.sh
Created May 15, 2018 05:21
dell_install_Manjaro Dell电脑安装manjaro操作系统
# 1. First of all of course get Manjaro:
https://manjaro.org/get-manjaro/
# I recommend using Etcher to copy the image to your USB:
https://etcher.io/
# 2. Before installing make sure:
# - Secure boot is disabled in BIOS
# - Your SSD, HDD or NVME drive is set to AHCI instead of RAID
# - Fastboot should be on Auto or minimal, but this shouldn't matter to much
@corerman
corerman / Manjaro_install_MariaDB.sh
Created May 14, 2018 09:41
Manjaro install MariaDB
pacman -S mariadb
mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql //注意这个datadir,很重要,按照默认操作
systemctl enable mysqld
systemctl start mysqld
mysql_secure_installation
@corerman
corerman / manjaro_archlinux_startup.sh
Created May 14, 2018 08:14
manjaro_archlinux_startup
archlinux/manjaro 开机自启动[linux]
在/usr/lib/systemd/system/中加入frp.service文件
[Unit]
Description=AutoExec
[Service]
ExecStart=/root/frp.sh
[Install]
WantedBy=multi-user.target
@corerman
corerman / git_speed_up.conf
Created May 5, 2018 07:55
提高git拉取速度
git config --global http.postBuffer 524288000
这是个很有效的配置,修改后速度有质的提升
chmod +x /etc/rc.local
add command before "exit 0"
@corerman
corerman / crontab_startup.sh
Created April 23, 2018 10:01
crontab 开机启动
A user can edit its cron table with crontab -e.
An example which will run /path/to/script.sh at startup:
@reboot /path/to/script.sh
If you need to run it as root, don't use @reboot sudo /path/to/script.sh;
use sudo crontab -eu root to edit root's crontab.