Skip to content

Instantly share code, notes, and snippets.

View nickfox-taterli's full-sized avatar
😰
想哭

Tater Li nickfox-taterli

😰
想哭
View GitHub Profile
@nickfox-taterli
nickfox-taterli / upgrade_raspbian_to_buster.sh
Last active August 11, 2020 21:57
Upgrade Raspbian To Buster
sudo sync
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y dist-upgrade
sudo sed -i 's/jessie/buster/g' /etc/apt/sources.list
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y dist-upgrade
sudo sync
#sudo reboot
@nickfox-taterli
nickfox-taterli / esp32_gpio_test.c
Created October 25, 2017 03:22
ESP32 Module GPIO Test
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/gpio.h"
uint8_t test_io[] = {0, 2, 4, 5, 9, 12, 14, 17, 19, 22, 25, 27, 33};
void app_main()
@nickfox-taterli
nickfox-taterli / Ip4_frag_tmp.c
Created February 20, 2018 04:23
Ip4_frag_tmp.c
#include "lwip/opt.h"
#if LWIP_IPV4
#include "lwip/ip4_frag.h"
#include "lwip/def.h"
#include "lwip/inet_chksum.h"
#include "lwip/netif.h"
#include "lwip/stats.h"
#include "lwip/icmp.h"
@nickfox-taterli
nickfox-taterli / autodeny.sh
Created March 10, 2018 08:59
auto ip deny script
#!/bin/bash
#检测时间
SLEEP_TIME=10
#禁用阈值
NO_OF_CONNECTIONS=50
#禁用时长
BAN_PERIOD=300
#白名单
IGNORE_IP_LIST=/root/autodeny/allow_ip.txt

GCC compiler optimization for ARM-based systems

2017-03-03 fm4dd

The gcc compiler can optimize code by taking advantage of CPU specific features. Especially for ARM CPU's, this can have impact on application performance. ARM CPU's, even under the same architecture, could be implemented with different versions of floating point units (FPU). Utilizing full FPU potential improves performance of heavier operating systems such as full Linux distributions.

-mcpu, -march: Defining the CPU type and architecture

These flags can both be used to set the CPU type. Setting one or the other is sufficient.

@nickfox-taterli
nickfox-taterli / small_wp.sh
Last active April 3, 2021 10:34
Gullo.me 128MB VPS WordPress Install Script
apt-get update
systemctl disable getty@tty1.service
systemctl disable getty@tty2.service
apt-get -y remove --purge rsyslog
apt-get -y install ca-certificates dash inetutils-syslogd
rm -f /bin/sh
ln -s dash /bin/sh
#chsh -s /bin/dash
invoke-rc.d inetutils-syslogd stop
for file in /var/log/*.log /var/log/mail.* /var/log/debug /var/log/syslog
@nickfox-taterli
nickfox-taterli / udpflood.c
Created June 21, 2018 14:46
UDP 攻击实用程序
/*
* udpflood.c
* 一个简单的UDP Flood攻击程序,用起来比任何软件都简单,更高效,会吃光所有CPU和网络性能.
*
* BUFLEN 定义网络MTU,越接近当前网络最大MTU性能最高.
* CTHREAD 定义线程数,数量越多,越能利用带宽,服务器负载越高.
*
* 编译:gcc udpflood.c -lpthread -o udpflood
* 使用:./udpflood -t 103.116.47.27 -p 29900 -g 5 (-t 指定目标 -p 指定端口 -g 指定发送流量GB)
* NMAP扫描实用工具:nmap -p 29900 --open -sU 10.0.1.1
@nickfox-taterli
nickfox-taterli / udp2raw_kcptun_ss_for_debian9.sh
Created June 24, 2018 10:42
Debian 9 SS 一键配置脚本,使用了KCPTUN加速,支持各种OpenVZ.
#!/bin/bash
PASSWORD=123
# 客户端配置参考(前两个可以路由运行,但是最后一个最好不要,路由性能有限,会让你觉得网络卡炸的.)
#
# udp2raw -c -r35.231.111.220:40002 -l0.0.0.0:40003 -kxxx --raw-mode faketcp -a --cipher-mode none --auth-mode simple
# kcp-client -l :9527 -r 10.0.0.1:40003 -key "xxx" -crypt none -mode fast3
# SS 客户端 => 混淆:aes-256-gcm,IP:127.0.0.1:9527,密码:刚才设置的密码.
@nickfox-taterli
nickfox-taterli / cloud-config.yml
Created July 1, 2018 06:27
Core OS Linode 参考配置包
#cloud-config
# 修改主机名称
hostname: coreos-01
# 将主机名称在/etc/hosts里解析为127.0.0.1
manage_etc_hosts: localhost
# 此处的ssh_authorized_keys只对core用户生效
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAIAQC/4ta5TeTOwx/67x50bwKnZnXe96/6WlconkfDtjugFCNvWt83IqDF3FZ2yO5Dyl2Xz80pUH0iusOc+x3t755KrQAhDTUqX/Np0z5TIYijd5N++GQIzvF0DBYAnmfG+UzaayPg+d4xkqC38YCdoKLe1FCMaV0+v5ehgx2CJ+VtCJJvMHY2Eu//oI9WL5rDo1yGwuCCjztKFtgSerLmgRD1aeL/nCZooIkFnAgO5pTvuwfQECvN2ECyMwvPk9onzbOn4vQ4yic3I79Ae0UkPoq29hZPIgvjigXhE1/hwKUqI/eiFC5aiqwaaFbr8BNvioO6Pxss7Ltm7rnHwg167wVPxEVI/PIkHMFSzCKr0hAg4V3hsAlqOlJcvXEtY2PzePiOut34pdsGSBqipxeuc6hTbkSruYb75aHioDzMLpU6sw6ePijz0WPEq2rkj1+/RyTkBuRV/VqlA9sArWpv93HKf6szGtkbiOqXCxzia+EXYaWXLH/fOO30vElC4nPvZIhCzKB+KMpya/zLr4EeUOoq1woIj+WNv+TUdN0iWMDbWx2Vs5U+bp8JDOa9iPCceTDMVFnO+69bl7yw7lygm9QhfIGo0Yb0+Ce3TJ3ZuclaZwOjfPBjcCVFpfFnT8KdHJjN87hBE9w9vwI/Nn1Kso/pzJm+Dg1RJGmtRsuWD816RJzCkf2FSsiBi8/q6jnF8GwAULqMThv5Bhbat2yMb0lXKwjYQIHZnnSlpYqbitifdh9AAJTASKkPTtrZ2YAAWi+ArgEeWQi7aQpU+vRbXng0OjLBdDZYjP2kSxv8UgFtqoRHq4bX4lxa
@nickfox-taterli
nickfox-taterli / make-rir-delegated-latest.py
Created July 2, 2018 08:55 — forked from holly/make-rir-delegated-latest.py
make afrinic/apnic/arin/ripe/lacnic delegated-latest ipv4 and ipv6 list script
#!/usr/bin/env python
# vim:fileencoding=utf-8
""" [NAME] script or package easy description
[DESCRIPTION] script or package description
"""
from datetime import datetime
from argparse import ArgumentParser
import pprint