Skip to content

Instantly share code, notes, and snippets.

@Delta-in-hub
Delta-in-hub / block_ip_list.service
Last active October 20, 2024 11:14
fetch and add blocked ip list to iptables
# /etc/systemd/system/block_ip_list.service
[Unit]
Description=Block IP List Script
[Service]
Type=simple
ExecStart=/bin/bash /etc/block_ip_list.sh
User=root
Group=root
@Delta-in-hub
Delta-in-hub / public-dns.txt
Last active July 1, 2024 08:55
smartdns & adguard home
# alidns
tls://dns.alidns.com
https://dns.alidns.com/dns-query
https://223.6.6.6/dns-query
https://223.5.5.5/dns-query
# dnspod
tls://dns.pub
tls://1.12.12.12
tls://120.53.53.53
https://doh.pub/dns-query
@Delta-in-hub
Delta-in-hub / marp.code-snippets
Created December 2, 2022 16:34
marp.code-snippets
{
"end-page-of-slide": {
"prefix": "end",
"body": [
"<!-- _backgroundColor: black -->",
"<!-- _color: white -->",
"<!-- _paginate: false -->",
"",
"<div align=\"center\" style=\"font-size: 100px\">",
"END",
@Delta-in-hub
Delta-in-hub / slidev.code-snippets
Created December 1, 2022 15:03
slidev.code-snippets
{
"Image-with-css": {
"prefix": "img",
"body": [
"<img src=\"${1}\" style=\"padding: 1% 1% 1% 1%; width: 100%; \" align=\"\" />"
],
"description": "Image-with-css(t r b l)"
},
"Img-Center": {
"prefix": "img-center",
@Delta-in-hub
Delta-in-hub / Template.md
Last active February 16, 2024 13:59
Obsidian-Zotero-Integration Template

{{title}}

[!info] Bibliography {{bibliography|replace("\n"," ")}}

Information

Key Value
Date {% if date %} {{date
Author {{authors}}{{directors}}
#!/bin/sh
smartdns_Bin="/etc/storage/smartdns-mipsel"
smartdns_Conf="/etc/storage/smartdns_m.conf"
smartdns_port="6053"
smartdns_Bin_Name="smartdns-mipsel"
# iptables -t nat -L
# netstat -tulpn | grep LISTEN
@Delta-in-hub
Delta-in-hub / ucp.cc
Last active April 18, 2022 11:10
ucp
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <errno.h>
#include <stdbool.h>
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
#include <stdint.h>
@Delta-in-hub
Delta-in-hub / alloc.cc
Last active April 5, 2022 06:25
alloc.cc
// #define NDEBUG
#include <bits/stdc++.h>
#define DEBUGPRINTF
#undef DEBUGPRINTF
using namespace std;
int cpuid = 0;
mutex _map_mutex;
#include <ciso646>
#include <string>
#include <string_view>
#include <iostream>
constexpr auto MAX_CMD_LINE = 1024;
#ifdef _WIN32
#include <windows.h>
#include <bits/stdc++.h>
using namespace std;
const unsigned char imageGvalues[] = {10, 9, 12, 40,
50, 35, 15, 12,
8, 10, 9, 15,
11, 130, 160, 240};
string toBits(unsigned char b)