Skip to content

Instantly share code, notes, and snippets.

View wwng2333's full-sized avatar

Crazy wwng2333

View GitHub Profile
@wwng2333
wwng2333 / client.php
Last active August 18, 2021 11:58
PHP Prober Client
<?php
error_reporting(0);
function curl($url) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_TIMEOUT, 2);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$r = curl_exec($ch);
$curl_errno = curl_errno($ch);
curl_close($ch);
@wwng2333
wwng2333 / sensors.php
Last active January 5, 2017 13:06
获取CPU温度
<?php
$cmd = 'sensors';
exec($cmd,$result);
$arr = array();
for($i=0;$i<count($result);$i++) {
$linenow = $result[$i];
while(strstr($linenow,' ')) {
$linenow = str_replace(' ','',$linenow); //去空格
}
if(strstr($linenow,'Core')) {
#include "STC8.h"
#include "intrins.h"
sbit PWRSW1 = P5^4;
sbit PWRSW2 = P3^3;
sbit PWRDET = P5^5;
sbit PWRBTN = P3^2;
void Delay100ms() //@11.0592MHz
{
mkdir overlay
cd overlay
mkdir -p etc/ssh etc/network etc/runlevels/{default,boot,sysinit,shutdown} root/.ssh etc/lbu
cp -a /etc/{passwd,group,shadow,gshadow,hostname,resolv.conf,network/interfaces,ssh} etc/
cp /etc/network/interfaces etc/network
cp -a /root/.ssh/authorized_keys root/.ssh
echo "/root/.ssh" > etc/lbu/include
sed -i -e '/^root:/s:/bin/bash:/bin/ash:' etc/passwd
@wwng2333
wwng2333 / IICMasterRecv.ino
Last active July 22, 2023 11:06
IIC搜索
#include <Wire.h>
#define PY32 0xA0
void setup() {
// put your setup code here, to run once:
Serial.begin(76880);
Wire.begin(12, 13);
}
void loop() {
@wwng2333
wwng2333 / adh2dnsmasq.go
Last active October 10, 2023 11:23
adh2xxx 将Adguardhome的dhcp ip转换为dnsmasq、padavan static ip格式
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"time"
)
@wwng2333
wwng2333 / CheckPing0.sh
Created October 13, 2023 11:10
Check and auto-restart ping0
#!/bin/sh
if ! /opt/etc/init.d/S99ping0 check > /dev/null
then
/opt/etc/init.d/S99ping0 start
fi
@wwng2333
wwng2333 / client.sh
Created December 11, 2023 00:34
neko-status
wget https://github.com/nkeonkeo/nekonekostatus/releases/download/v0.1/neko-status -O /usr/bin/neko-status
mkdir /etc/neko-status/
chmod +x /usr/bin/neko-status
echo "key: 12f6d3cb-02af-4ef6-bba4-d3f17d392f5f
port: 9999
debug: false" > /etc/neko-status/config.yaml
#alpine
echo '#!/sbin/openrc-run
payload:
# EPIC
- DOMAIN,cdn1-epicgames-1251447533.file.myqcloud.com,
- DOMAIN,cdn2-unrealengine-1251447533.file.myqcloud.com,
- DOMAIN,media-epicgames-1251447533.file.myqcloud.com,
- DOMAIN,static-assets-prod-ue-1251447533.file.myqcloud.com,
- DOMAIN,epicgames-download1-1251447533.file.myqcloud.com,
- DOMAIN-SUFFIX,epicgames.dev,
- DOMAIN-SUFFIX,epicgames.com,
- DOMAIN-SUFFIX,unrealengine.com,