Skip to content

Instantly share code, notes, and snippets.

View benzBrake's full-sized avatar
🏪
忙着赚钱

Ryan Lieu benzBrake

🏪
忙着赚钱
View GitHub Profile
@benzBrake
benzBrake / Pirple Out Mod
Last active August 29, 2015 14:17
This style turns your Facebook purple with pink hearts in the background.
/*
* Purple Out Mod
* Mod From https://userstyles.org/styles/58935/purpled-out-facebook-purple-pink-theme
*/
body {
background-color:#FFFFFF !important;
background-image:url('http://i.imgur.com/0YCYo.gif') !important;
background-repeat:repeat !important;
background-attachment:fixed !important;
background-position:center !important;
@benzBrake
benzBrake / Outlook.com style for QQMail
Last active August 29, 2015 14:17
Windows 8 / Outlook.com style for QQMail
@-moz-document url-prefix("http://mail.qq.com/cgi-bin/frame_html"), url-prefix("https://mail.qq.com/cgi-bin/frame_html") {
/* Frame */
input, select, textarea, button {
font-size: 100%;
font-family: "Microsoft Yahei UI","Microsoft Yahei",Verdana,Simsun,"Segoe UI","Segoe UI Web Regular","Segoe UI Symbol","Helvetica Neue","BBAlpha Sans","S60 Sans",Arial,sans-serif;
}
.getuserdata * {
color: #fff !important;
}
@benzBrake
benzBrake / apns-conf.xml
Last active December 12, 2017 11:08 — forked from imnuts/apns-conf.xml
A listing of APNs to be used as the apns-conf.xml file in Android. Hoping to make as complete and accurate of a list as possible.
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2006, Google Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
@-moz-document domain("github.com") {
a[href$=".sh"]::before {
content:url("moz-icon://.sh?size=16");
}
a[href$=".js"]::before {
content:url("moz-icon://.js?size=16");
}
}
@benzBrake
benzBrake / Baidu Light
Last active June 12, 2016 14:00 — forked from funsunz/no_ad_baidu.css
百度轻样式
body {
overflow-x: hidden;
min-width: 600px;
background-color: #F7F7F7
}
#container {
width: 100%
}
#content_right {
display: none
@benzBrake
benzBrake / ipip.sh
Created November 23, 2016 06:37
Get IP Location (Data Source: IPIP)
#/bin/sh
ip=$1
echo ${ip}|grep "^[0-9]\{1,3\}\.\([0-9]\{1,3\}\.\)\{2\}[0-9]\{1,3\}$" > /dev/null;
if [ $? -eq 0 ]
then
result=`curl "http://ip.huomao.com/ip?ip=${ip}" 2>/dev/null`
result=${result:1:(-1)}
country=`echo ${result} | awk -F, '{ print $1}' | awk -F: '{ print $2}'`
province=`echo ${result} | awk -F, '{ print $2}' | awk -F: '{ print $2}'`
city=`echo ${result} | awk -F, '{ print $3}' | awk -F: '{ print $2}'`
@benzBrake
benzBrake / Linux Check Shell
Created November 26, 2016 12:43
linux_check.sh
#/bin/bash
linux_check() {
if $(grep -qi "CentOS" /etc/issue) || $(grep -q "CentOS" /etc/*-release); then
OS="CentOS"
elif $(grep -qi "Ubuntu" /etc/issue) || $(grep -q "Ubuntu" /etc/*-release); then
OS="Ubuntu"
elif $(grep -qi "Debian" /etc/issue) || $(grep -q "Debian" /etc/*-release); then
OS="Debian"
else
cat >&2 <<-'EOF'
@benzBrake
benzBrake / list_ssh_ports.sh
Created December 2, 2016 02:16
List SSH Ports
#/bin/bash
SSH_PORTS=`cat /etc/ssh/sshd_config | grep 'Port ' | grep -v '#'`
FIRST_PORT=`echo ${TEST} | head -n 1`
if [ -n ${FIRST_PORT} ];then
echo ${SSH_PORTS}
else
echo 22
fi
@benzBrake
benzBrake / a_record_monitor.sh
Last active September 24, 2018 12:37
[DNS]A record monitor, notice you when dns record changed.
#!/bin/bash
# settings start
email="root@localhost"
pin="*/1 * * * *"
# settings end
cron=$1
test -z "$cron" && exit 1
if [ "$cron" != "cron" ]; then
if [ ! -d /etc/arecord_moniter ]; then
CURDIR=$(cd $(dirname ${BASH_SOURCE[0]}); pwd )
@benzBrake
benzBrake / functions.php
Last active November 26, 2020 15:10
like single for typecho | Typecho 免插件文章点赞
<?php
function likeSingle($cid) {
$db = likeSingleDb();
if ($db == null) Typecho_Response::throwJson(array('status'=>-1,'msg'=>'数据库有误!'));
$prefix = $db->getPrefix();
if(!cid) Typecho_Response::throwJson(array('status'=>0,'msg'=>'请选择喜欢的文章!'));
$likes = Typecho_Cookie::get('likes');
if(empty($likes)){
$likes = array();
} else {