Skip to content

Instantly share code, notes, and snippets.

@Barneybook
Barneybook / Telegram_it_group_list.md
Last active March 30, 2024 09:36
Telegram 資訊相關 群組清單
@Barneybook
Barneybook / bot.php
Created June 5, 2012 04:40
bot php file
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, "haplay.no-ip.org/haplay/");
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_USERAGENT, "Google Bot");
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$output = curl_exec($ch);
curl_close($ch);
echo $output;
@Barneybook
Barneybook / config.php
Last active April 2, 2023 06:07
Codeigniter base_url setting
<?php
// false
$root = ($_SERVER['SERVER_PORT'] == 443 ? 'https' : 'http');
// false
$root = "http".((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "s" : "");
// false
$root = (empty($_SERVER['HTTPS']) OR strtolower($_SERVER['HTTPS']) === 'off') ? 'http' : 'https';
=======================================================
Odoo.sh: Uploading database to the Upgrade platform
Transfer started at 13-Mar 08:22 UTC
progress: 7% 13-Mar 08:22 UTC
progress: 26% 13-Mar 08:22 UTC
progress: 57% 13-Mar 08:22 UTC
progress: 88% 13-Mar 08:22 UTC
progress: 100% 13-Mar 08:22 UTC
The following log is the output of the upgrade process
按右鍵沒反應
滑鼠鎖右鍵語法(1)↓
<body oncontextmenu="window.event.returnValue=false">
按右鍵反白文字沒反應
滑鼠鎖右鍵語法(2)↓
@Barneybook
Barneybook / .htaccess
Last active May 7, 2020 09:32
IP 35.53.125.135 to abc.com (IP 跳轉 domain) Redirect IP address to Domain name Apache
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^35\.53\.125\.135$
RewriteRule ^(.*)$ http://abc.com/$1 [L,R=301]
</IfModule>
請將下列語法 "取代" <body>
<body ONDRAGSTART="window.event.returnValue=false" onSelectStart="event.returnValue=false" ONCONTEXTMENU="window.event.returnValue=false" >
=================================
鎖滑鼠右鍵及防highlight
<body onselectstart="return false;" ondragstart="return false;" oncontextmenu="return false;">
======================
@Barneybook
Barneybook / 刪除並修復隨身碟捷徑病毒v3.3.bat
Created May 13, 2019 06:45
刪除並修復隨身碟捷徑病毒v3.3.bat
@echo off
echo =========捷徑病毒修復程式說明=========
echo;
echo 編輯者:Lun 2017.12.06 版本:v3.3
echo;
echo 適用狀況:所有檔案皆變為捷徑檔、隨身碟點開變為捷徑。
echo;
echo 修復程式僅會刪除病毒檔案,其餘非病毒相關檔案並不影響。
echo;
echo 程式請以→右鍵→"系統管理員身分執行"