This file contains hidden or 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
#!/bin/sh | |
echo '"country","city","latitude","longitude","ISP","organization","IP"' | |
sudo iptables-save | grep sshguard | grep -oE '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | xargs -I{} curl -s http://ip-api.com/json/{} | jq -r '[.country, .city, .lat, .lon, .isp, .org, .query] | @csv' |
This file contains hidden or 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> | |
<head> | |
<title>API Example</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
var accessToken = "<your agent's client access token>"; | |
var baseUrl = "https://api.api.ai/v1/"; |
This file contains hidden or 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
; Algorithm described in http://zhuanlan.zhihu.com/iobject/20370983 | |
; Be warned: it's in Chinese too ;) | |
(def digits-name (zipmap "0123456789" "零一二三四五六七八九")) | |
(def tens-name (zipmap [1 2 3] [\十 \百 \千])) | |
(defn digit-pos-to-name [pos] | |
(cond (= pos 0) nil | |
(= 0 (rem pos 8)) \亿 | |
(= 0 (rem pos 4)) \万 | |
:else (tens-name (rem pos 4)))) |
This file contains hidden or 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 python | |
# -*- coding: utf-8 -*- | |
# DNSPod dynamic DNS bridge for OpenWRT DDNS service | |
# This script creates a simple HTTP server and updates your DNSPod DDNS record | |
# on any HTTP GET request received. This allows you to create a customized DDNS | |
# service for DNSPod with OpenWRT's standard DDNS support. | |
# Copyright 2015-2016 rlei @ GitHub | |
# |
This file contains hidden or 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
top -l 1 -stats mem,command | grep Chrome | cut -d' ' -f1 | awk '/K/ { gsub(/K.*$/,""); sum+=$1} /M/ { gsub(/M.*$/,""); sum+=$1*1024} END {printf "%.2fM\n", sum/1024} ' |
This file contains hidden or 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
#!/bin/sh | |
#high chance need have a change ... | |
if [ ! $# -eq 2 ]; then | |
echo "usage: $0 UBOOTFILE MD5" | |
exit | |
fi | |
UBOOT_NAME=$1 | |
MD5SUM_SHOULD_BE=$2 |
This file contains hidden or 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
diff --git a/build/module.mk b/build/module.mk | |
index b69019c..4ed8e3e 100644 | |
--- a/build/module.mk | |
+++ b/build/module.mk | |
@@ -25,10 +25,10 @@ luasource: | |
cp -pR htdocs/* dist$(HTDOCS) 2>/dev/null || true | |
for i in $$(find dist -name .svn -o -name .gitignore); do rm -rf $$i || true; done | |
ifneq ($(PO),) | |
- mkdir -p dist$(LUCI_I18NDIR) | |
- for file in $(PO); do \ |
This file contains hidden or 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
diff --git a/target/linux/ar71xx/generic/profiles/tp-link.mk b/target/linux/ar71xx/generic/profiles/tp-link.mk | |
index d6516fe..c892022 100644 | |
--- a/target/linux/ar71xx/generic/profiles/tp-link.mk | |
+++ b/target/linux/ar71xx/generic/profiles/tp-link.mk | |
@@ -129,6 +129,18 @@ endef | |
$(eval $(call Profile,TLWR720)) | |
+define Profile/TLFCALL | |
+ NAME:=TP-LINK TL-FCALL |
This file contains hidden or 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
diff --git a/target/linux/ar71xx/files/drivers/mtd/tplinkpart.c b/target/linux/ar71xx/files/drivers/mtd/tplinkpart.c | |
index ab952b6..effcac7 100644 | |
--- a/target/linux/ar71xx/files/drivers/mtd/tplinkpart.c | |
+++ b/target/linux/ar71xx/files/drivers/mtd/tplinkpart.c | |
@@ -149,7 +149,6 @@ static int tplink_parse_partitions(struct mtd_info *master, | |
parts[0].name = "u-boot"; | |
parts[0].offset = 0; | |
parts[0].size = offset; | |
- parts[0].mask_flags = MTD_WRITEABLE; | |