相信很多人和我一样,拿到小米路由玩了几天,感觉官方的步伐不够快不够激进。既然如此,何不自己动手丰衣足食呢?
首先你得知道Linux的一些基本理论,比如什么是bash啊,cd、ls这些命令怎么用等等。
其次你还得知道一些编程相关的东西,因为文章专注于Node.js的编译,所以Node.js和C++的一些基本知识是要有的。
| #!/bin/bash | |
| set -o errexit | |
| clear | |
| # Set versions. Check http://openresty.org for latest version and bundled version of nginx. | |
| OPENRESTY_VERSION=1.9.3.1 | |
| NGINX_VERSION=1.9.3 | |
| OPENSSL_VERSION=1.0.2d | |
| # Install some pre-requisites |
| set the currentSource to (do shell script "/Users/askedrelic/bin/SwitchAudioSource -c") | |
| if currentSource is equal to "Built-in Output" then | |
| do shell script "/Users/askedrelic/bin/SwitchAudioSource -s \"Built-in Line Output\"" | |
| else | |
| do shell script "/Users/askedrelic/bin/SwitchAudioSource -s \"Built-in Output\"" | |
| end if |
| #!/bin/sh | |
| if [ "$#" -eq 1 ]; then stdinmsg=$(cat); fi | |
| exec <"$0" || exit; read v; read v; read v; exec /usr/bin/osascript - "$@" "$stdinmsg"; exit | |
| -- another way of waiting until an app is running | |
| on waitUntilRunning(appname, delaytime) | |
| repeat until my appIsRunning(appname) | |
| tell application "Messages" to close window 1 | |
| delay delaytime | |
| end repeat |
| <!DOCTYPE html> | |
| <meta charset=utf-8> | |
| <meta name=viewport content="width=device-width, initial-scale=1, maximum-scale=1"> | |
| <meta name=apple-mobile-web-app-capable content=yes> | |
| <meta name=apple-mobile-web-app-status-bar-style content=black> | |
| <title>Test fullscreen</title> | |
| <style> | |
| html, body { | |
| margin: 0; | |
| padding: 0; |
| #!/bin/bash | |
| # Source this file in your .bash_profile e.g.: | |
| # | |
| # source ~/gitcheckouts/vpn_heplers/.vpn_helpers.sh | |
| # | |
| # Note: This script works best with NOPASSWD: ALL configured in your sudoers file: | |
| # /etc/sudoers: | |
| # %admin ALL=(ALL) NOPASSWD: ALL | |
| # |
| server { | |
| listen 80 default_server; | |
| listen [::]:80 ipv6only=on default_server; | |
| server_name splunk.net blog.splunk.net www.splunk.net .taddevries.com; | |
| access_log /var/log/nginx/blog.access_log main; | |
| error_log /var/log/nginx/blog.error_log info; | |
| return 301 https://blog.splunk.net; | |
| } | |
| server { |
| #!/bin/bash | |
| # https://gist.github.com/949831 | |
| # http://blog.carbonfive.com/2011/05/04/automated-ad-hoc-builds-using-xcode-4/ | |
| # command line OTA distribution references and examples | |
| # http://nachbaur.com/blog/how-to-automate-your-iphone-app-builds-with-hudson | |
| # http://nachbaur.com/blog/building-ios-apps-for-over-the-air-adhoc-distribution | |
| # http://blog.octo.com/en/automating-over-the-air-deployment-for-iphone/ | |
| # http://www.neat.io/posts/2010/10/27/automated-ota-ios-app-distribution.html |