Skip to content

Instantly share code, notes, and snippets.

@skygunner
skygunner / cls_template.php
Last active September 16, 2015 05:57 — forked from wudi/cls_template.php
ECshop preg_replace /e 修饰符修复(本文件可直接替换2.7.3)
<?php
/**
* ECSHOP 模版类
* ============================================================================
* * 版权所有 2005-2012 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
@skygunner
skygunner / README.md
Created April 6, 2016 00:34 — forked from e7d/README.md
[Debian] Build a Squid transparent proxy from source code
@skygunner
skygunner / build_nginx.sh
Created July 5, 2016 19:13 — forked from Belphemur/build_nginx.sh
Compiling Nginx with LibreSSL (and http2)
#!/usr/bin/env bash
# names of latest versions of each package
export NGINX_VERSION=1.11.1
export VERSION_PCRE=pcre-8.38
export VERSION_LIBRESSL=libressl-2.4.1
export VERSION_NGINX=nginx-$NGINX_VERSION
#export NPS_VERSION=1.9.32.10
#export VERSION_PAGESPEED=v${NPS_VERSION}-beta
@skygunner
skygunner / remote-image-cache.php
Created July 5, 2016 21:43 — forked from ScottPhillips/remote-image-cache.php
Cache remote image using PHP
<?php
function cache_image($image_url){
//replace with your cache directory
$image_path = 'path/to/cache/dir/';
//get the name of the file
$exploded_image_url = explode("/",$image_url);
$image_filename = end($exploded_image_url);
$exploded_image_filename = explode(".",$image_filename);
$extension = end($exploded_image_filename);
//make sure its an image
@skygunner
skygunner / windows.conf
Last active July 11, 2016 13:53 — forked from anonymous/windows.conf
windows 10 doesn't have network status/properties after upgrade from 7/8 (has WIFI and showing AP, but can't connet ), no WIFI, no network, no internet
My thinkpad has this problem. So
Step 1:
check if wlan auto config service is running and set to auto;
Step 2:
delete all vpn client software
delete all vpn adapter and its drivers
reboot
Step 3:
Don't perform the 30/30/30 reset! If the "mtd-erase -d nvram" command doesn't work try "nvram erase."
@skygunner
skygunner / NW762
Created September 4, 2016 06:16
Netcore NW762
BCM5358U@533 16M 64M
@skygunner
skygunner / gist:a1a3dcae9cd28d784660239b7b2038bf
Created September 6, 2016 13:13
back up the bootloader of the TP LINK WR1043ND V2
root@DD-WRT:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00020000 00010000 "RedBoot"
mtd1: 007c0000 00010000 "linux"
mtd2: 00670000 00010000 "rootfs"
mtd3: 00060000 00010000 "ddwrt"
mtd4: 00010000 00010000 "nvram"
mtd5: 00010000 00010000 "board_config"
mtd6: 00800000 00010000 "fullflash"
mtd7: 00020000 00010000 "fullboot"
@skygunner
skygunner / router-benchmark-rank-list
Last active September 6, 2016 14:50
The Router Benchmark Rank List Gist Page
2 x Broadcom BCMD144 chip rev 1 - Linksys E900 --------> DD-WRT v24-sp2 (04/01/13) mega
5 x Broadcom BCM4716 chip rev 1 - Linksys E4200 -------> DD-WRT v24-sp2 (06/07/14) kingkong
1 x Broadcom BCM5300 chip rev 1 - Asus RT-AC66U -------> DD-WRT v24-sp2 (04/01/13) giga
7 x Broadcom BCM5300 chip rev 1 - Asus RT-AC66U -------> DD-WRT v3.0-r30471 giga (08/24/16)
1 x Marvel Armada 370/XP - LinkSys WRT1900AC ----------> DD-WRT v3.0-r30471 std (08/24/16)
1 x ARMv7 Processor rev 0 (v7l) - Asus RT-AC68U -------> DD-WRT v3.0-r30471 std (08/24/16)
1 x ARMv7 Processor rev 0 (v7l) - Linksys EA6900 ------> DD-WRT v3.0-r30465M kongac (08/23/16)
1 x ARM Cortex-A9 Processor - Net Gear R7000 ----------> DD-WRT v3.0-r30465M kongac (08/23/16)
1 x Broadcom BCM4709A0 chip - Asus RT-AC3200 ----------> Merlin 380.61
http://www.speedtest.net/result/4834183066.png
#! /bin/bash
#
# Usage: lstemp [ -w or -W]
# -w / -W: Wake up a sleeping drive to take it's temperature
#
adastat () { echo -n `camcontrol cmd $1 -a "E5 00 00 00 00 00 00 00 00 00 00 00" -r - | awk '{print $10 " " ; }'` " " ; }
echo
echo System Temperatures - `date`
cat /etc/version.freenas
uptime | awk '{ print "\nSystem Load:",$(NF-2),$(NF-1),$(NF),"\n" }'