This file contains 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
apt-transport-https ca-certificates gnupg curl nano | |
vim-nox exuberant-ctags | |
net-tools fail2ban | |
aptitude | |
# Ubuntu Pro | |
sudo pro attach TOKEN |
This file contains 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
Feb 4 17:50:51 Zero-Lab-Router-F062F20-C WAN Connection: Fail to connect with some issues. | |
Feb 4 17:51:01 Zero-Lab-Router-F062F20-C WAN Connection: WAN was restored. | |
Feb 4 17:51:27 Zero-Lab-Router-F062F20-C WAN Connection: Fail to connect with some issues. | |
Feb 4 17:51:27 Zero-Lab-Router-F062F20-C WAN Connection: WAN was restored. | |
Feb 4 17:52:13 Zero-Lab-Router-F062F20-C WAN Connection: Fail to connect with some issues. | |
Feb 4 17:52:30 Zero-Lab-Router-F062F20-C WAN Connection: WAN was restored. | |
Feb 4 17:53:50 Zero-Lab-Router-F062F20-C WAN Connection: Fail to connect with some issues. | |
Feb 4 17:53:51 Zero-Lab-Router-F062F20-C WAN Connection: WAN was restored. | |
Feb 4 17:54:55 Zero-Lab-Router-F062F20-C WAN Connection: Fail to connect with some issues. | |
Feb 4 17:54:55 Zero-Lab-Router-F062F20-C WAN Connection: WAN was restored. |
This file contains 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
<html> | |
<body> | |
<ul id="target"> | |
<li>1111</li> | |
<li>2222</li> | |
<li>3333</li> | |
<li>4444</li> | |
<li>5555</li> | |
</ul> | |
This file contains 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
- name: phpfpm | |
image: php:8.1-alpine | |
imagePullPolicy: IfNotPresent | |
ports: | |
- containerPort: 9000 | |
lifecycle: | |
postStart: | |
exec: | |
command: | |
- "/bin/sh" |
This file contains 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 | |
# Usage: | |
# dl.sh "https://www.youtube.com/watch?v=ec-IgIkEkmA" | |
# | |
# 限制檔案名稱長度,主要是為了避開 FAT、NTFS 的限制 | |
/path/to/yt-dlp/yt-dlp.sh \ | |
-o '%(title).150s-%(id)s.%(ext)s' \ | |
-f "bestvideo[height<=1080][ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" \ |
This file contains 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
<?php | |
error_reporting(E_ALL); | |
echo "connection to whois.twnic.net.tw\n"; | |
$address = gethostbyname('whois.iana.org.'); | |
$fp = @fsockopen($address, 43, $errno, $errstr, 5) or die("Socket Error " . $errno . " - " . $errstr); | |
stream_set_blocking($fp, true); |
This file contains 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
{ | |
"require": { | |
"openai-php/client": "^0.5.2", | |
"symfony/http-client": "^6.2", | |
"nyholm/psr7": "^1.8", | |
"guzzlehttp/guzzle": "^7.7" | |
}, | |
"config": { | |
"allow-plugins": { | |
"php-http/discovery": true |
This file contains 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
// ==UserScript== | |
// @name Redirect Mobile Mediawiki to Desktop URL | |
// @namespace http://blog.zeroplex.tw/ | |
// @version 0.1 | |
// @description If Mediawiki opened in mobile page, redirect it to general page | |
// @author zeroplex | |
// @match https://*.m.wikipedia.org/* | |
// @grant none | |
// ==/UserScript== |
This file contains 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 | |
# usage: | |
# linodecreate NUM | |
# | |
# NUM is the number of node you want to create | |
genpassword() { | |
PASS=$( tr -dc A-Za-z0-9 </dev/urandom | head -c 5 | tr '[:upper:]' '[:lower:]' ) | |
echo -n "prefix-$PASS" |
This file contains 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
<?php | |
use Illuminate\Testing\TestResponse; | |
use Symfony\Component\HttpFoundation\Request as SymfonyRequest; | |
trait ApiTokenRequestTrait | |
{ | |
public function call($method, $uri, $parameters = [], $cookies = [], $files = [], $server = [], $content = null, $headers = []) | |
{ | |
$symfonyRequest = SymfonyRequest::create( |
NewerOlder