Skip to content

Instantly share code, notes, and snippets.

@Suzhou65
Suzhou65 / Raspbian_apcupsd_installation.md
Last active July 31, 2024 04:38
Raspberry Pi Setup APCUPSD

Raspberry Setup APC UPS

What is this?
Raspberry Pi OS (Raspbian) install apcupsd Installation guide

What is apcupsd?
apcupsd is a open source UPS mangement and controlling software, it allows the computer to interact with APC UPSes.

Install apcupsd

First, install apcupsd utility, and the dynamic web page monitor.

@Suzhou65
Suzhou65 / wakeonlan_status.php
Last active February 9, 2021 18:00
Port Forwarding Status Monitor, PHP based webpage
<html>
<head>
<!-- META -->
<meta http-equiv="Cache-Control" content="No-Cache"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Style -->
<style>
html{font-size:100%; font-family:sans-serif; color:#666666;}
body{margin-top:10%;}
@Suzhou65
Suzhou65 / inc_pixmicat.tpl
Last active September 10, 2020 07:04
inc_pixmicat.orig
<!--&THEMENAME-->futaba Theme<!--/&THEMENAME-->
<!--&THEMEVER-->v20140603<!--/&THEMEVER-->
<!--&THEMEAUTHOR-->Pixmicat! Development Team<!--/&THEMEAUTHOR-->
<!--&HEADER--><!DOCTYPE html>
<html lang="zh-TW">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scalable=yes" />
<title>{$TITLE}</title>
<link rel="stylesheet" type="text/css" href="mainstyle.css" />
@Suzhou65
Suzhou65 / mainstyle.css
Last active September 10, 2020 07:04
mainstyle.orig
@media all{ /* 通用設定 */
html { background: #FFE; color: #800000; } /* 基本網頁背景樣式 */
a:link { color: #00E; } /* 正常連結樣式 */
a:hover { color: #D00; } /* hover時連結樣式 */
a:visited { color: #00E; } /* 已拜訪連結樣式 */
a.qlink { text-decoration: none; } /* 引用用連結樣式 */
small { font-size: 0.8em; } /* 小字樣式(eg.[以預覽圖顯示]) */
hr { clear: left; } /* 分隔線樣式 */
img { border: 0; } /* 圖片顯示樣式 */
@Suzhou65
Suzhou65 / rwd.css
Created September 10, 2020 06:59
device screen width
@media only screen and (min-width:728px){
#NA{max-width:728px;margin:0px auto;}
#MA{display:none}
}
@media only screen and (max-width:720px){
#NA{display:none}
#MA{max-width:320px;margin:0px auto;}
}
@Suzhou65
Suzhou65 / inc_pixmicat.tpl
Created September 10, 2020 07:06
inc_pixmicat.modify
<!--&THEMENAME-->Pixmicat_Responsive<!--/&THEMENAME--><!--&THEMEVER-->1500917<!--/&THEMEVER--><!--&THEMEAUTHOR-->Suzhou65<!--/&THEMEAUTHOR-->
<!--&HEADER--><!DOCTYPE html>
<html lang="zh-TW"><head>
<meta charset="utf-8">
<meta name="robots" content="index, follow"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scalable=yes"/>
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32"/>
<title>{$TITLE}</title>
<script type="text/javascript" async src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<style type="text/css">
@Suzhou65
Suzhou65 / mainstyle.css
Created September 10, 2020 07:06
mainstyle.modify
/*這是提供給並提供給不想修改 inc_pixmicat.tpl 檔案的用戶進行替換升級的 mainstyle.css 檔案*/
/*基本上所有框架定義都是原來 Pixmicat 預設的,僅有新增廣告欄位的 #AD 與提供討論串清單的 #topiclist 而已*/
/*當裝置橫向解析度大於 720px,保持正常版型*/
@media all{
html{background:#FFFFEF;color:#750000;font-family:sans-serif;font-size:100%;
background-image:url(http://helheim.info/bgi/BG00.png);
background-repeat:no-repeat;background-position:bottom right;background-attachment:fixed;}
/*基本網頁背景樣式,預設字體大小16px,背景圖案右下固定不重複,行動模式背景圖案不顯示*/
a{color:#05668D;text-decoration:none;font-family:sans-serif;} /*超連結樣式*/
small{font-size:0.8rem;} /*小字樣式*/
@Suzhou65
Suzhou65 / VULTR-Setup1.md
Last active September 14, 2020 11:51
Ubuntu 14.04 install fail2ban

Install fail2ban

sudo apt-get update
sudo apt-get install fail2ban -y

Backup fail2ban configuration

sudo service fail2ban stop
@Suzhou65
Suzhou65 / VULTR-Setup2.md
Created September 14, 2020 07:19
Ubuntu 14.04 install PPTP VPN service

Install PPTP

sudo apt-get install pptpd -y

Backup PPTP configuration

sudo cp  /etc/pptpd.conf  /etc/pptpd.local
@Suzhou65
Suzhou65 / VULTR-Setup3.md
Created September 14, 2020 08:26
Ubuntu 14.04 install PPTP VPN configuration

Network configuration

sudo cd /etc/
sudo vim sysctl.conf

Editing Network configuration

sudo cd /etc
sudo vim pptpd.conf