2.1 原厂固件中,直接web页面升级 2.2 已刷openwrt的话,telent/ssh登录,下载bin文件到/tmp,运行'sysupgrade -i /tmp/openwrt-ar71xx-ubnt-rspro-squashfs-sysupgrade.bin'
This file contains 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
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
// Remove the very first line to use class outside of codeigniter | |
/* | |
* Gravatar library for use with codeigniter <V2EX driven> | |
* | |
* @author 0x142857 <0x142857@gmail.com> | |
* @link http://0x142857.com | |
* @package Codeigniter | |
* @subpackage Gravatar | |
* |
This file contains 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
# install tinc | |
apt-get update && echo "===> update deps" && | |
apt-get install -y make libssl-dev zlib1g-dev liblzo2-dev libreadline-dev libncurses5-dev && echo "===> got deps" && | |
curl http://www.tinc-vpn.org/packages/tinc-1.1pre11.tar.gz | tar xzvf - && echo "===> got tinc src" && | |
cd tinc-1.1pre11 && | |
./configure && echo "===> configured tinc" && | |
make && | |
make install && echo "===> installed tinc" && | |
tinc --version # tinc version 1.1pre11 (built Nov 12 2015 16:25:28, protocol 17.4) |
This file contains 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
data:text/html, | |
<style type="text/css"> | |
#e { | |
position:absolute; | |
top:0; | |
right:0; | |
bottom:0; | |
left:0; | |
font-size:16px; | |
} |
A more customizable alternative to Vultr's backup feature using Vultr API v1. Tested on Ubuntu 16.04. Run this php script on a Vultr instance to create a snapshot of itself and rotate out the oldest snapshot(s). Use the $backup_tag
field to uniquely id a set of snapshots.
- Set
$api_key
to your Vultr API key. - Set
$num_of_backups
to specify how many snapshots to keep. - Set
chmod +x vultr-snapshot.php
. - Add
vultr-snapshot.php
to your cron tab. - Epic winning at life.
This file contains 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
import duo_client | |
import ldap | |
auth_api = duo_client.Auth( | |
ikey='<ikey>', | |
skey='<skey>', | |
host='<host>', | |
) | |
LDAP_SERVER = 'ldap://10.1.0.143' |
This file contains 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 bash | |
source ~/.zshrc | |
PROFILE_NAME=DEFAULT | |
BACKUP_NAME=[your_manual_backup_name] | |
TMP_BACKUP_NAME=$(date +%Y-%m-%d_%H-%M-%S) | |
echo "Running at ${TMP_BACKUP_NAME}." | |
echo "Getting previous backup..." |
This file contains 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/bash -x | |
# Generally based on ideas found at: | |
# http://www.garth.org/archives/2011,08,27,169,fix-time-machine-sparsebundle-nas-based-backup-errors.html | |
# | |
# Reduced the ideas there down to their essentials. | |
# 1. Unlock the image. | |
# 2. Reset the saved failure in the backup metadata. | |
# 3. Verify/fix the filesystem. |
This file contains 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 | |
# | |
# Generate a list of dnsmasq rules with ipset for gfwlist | |
# | |
# Copyright (C) 2014 http://www.shuyz.com | |
# Ref https://code.google.com/p/autoproxy-gfwlist/wiki/Rules | |
import urllib2 | |
import re |
OlderNewer