This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Please fill you real email | |
docker run --rm -it \ | |
-v "./token/cloudflare.ini:/workdir/token/cloudflare.ini" \ | |
-v "/etc/letsencrypt:/etc/letsencrypt" \ | |
-v "/var/lib/letsencrypt:/var/lib/letsencrypt" \ | |
certbot/dns-cloudflare \ | |
--server https://acme-v02.api.letsencrypt.org/directory \ | |
--dns-cloudflare \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# put it in: /etc/systemd/user/ | |
# and reload units(run as user self): systemctl --user daemon-reload | |
# use for: https://github.com/MrGlockenspiel/activate-linux | |
# | |
# that reminds me of this: https://github.com/USSURATONCACHI/activate-linux-toggle | |
# well, I don't like that "toggle", you can use `systemctl --user <operation> <unit-name>` to control any user unit. | |
[Unit] | |
Description=The "Activate Windows" watermark ported to Linux | |
After=graphical-session.target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/chrony.conf | |
# cloudflare time server with NTS | |
server time.cloudflare.com iburst nts | |
driftfile /var/lib/chrony/drift | |
rtcfile /var/lib/chrony/rtc | |
# storage UTC time to RTC | |
rtconutc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Thanks for: | |
; https://p403n1x87.github.io/getting-started-with-x86-64-assembly-on-linux.html | |
global _start | |
SYS_WRITE equ 1 | |
SYS_EXIT equ 60 | |
STDOUT equ 1 | |
SECTION .data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
useTabs: false | |
tabWidth: 2 | |
trailingComma: all | |
printWidth: 120 | |
singleQuote: true | |
semi: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is free and unencumbered software released into the public domain. | |
/* | |
Search "needle" in "haystack", limited to the first "len" chars of haystack | |
*/ | |
char *strnstr(char haystack[const restrict static 1], char needle[const restrict static 1], int len) | |
{ | |
if (len <= 0) | |
return NULL; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <error.h> | |
#include <stdbool.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <netinet/in.h> | |
#include <sys/socket.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/zzzgydi/clash-verge/issues/182 | |
# as root | |
setcap cap_net_bind_service,cap_net_admin=+ep /usr/bin/clash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduino.h> | |
void setup() | |
{ | |
// put your setup code here, to run once: | |
pinMode(LED_BUILTIN, OUTPUT); | |
} | |
void loop() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
BasedOnStyle: Microsoft | |
IndentWidth: 4 | |
UseTab: Never | |
LineEnding: DeriveLF | |
MaxEmptyLinesToKeep: 1 | |
BreakBeforeBraces: Linux | |
AllowShortBlocksOnASingleLine: Never | |
AllowShortIfStatementsOnASingleLine: Never | |
IndentCaseLabels: false |
NewerOlder