新款的树莓派3B功能之丰富,性能之强悍,让我垂涎。考虑到家里的网件 WNDR3700v2 也服役四年有余了。还是败了一个树莓派3B回来打造成新的路由。
WARNING
本文所有指令均仅供参考,切勿无脑复制粘贴!
〇 安装系统
# coding: UTF-8 | |
import socket | |
import struct | |
def aton(addr): | |
return struct.unpack('!l', socket.inet_aton(addr)) | |
def ntoa(addr): | |
return socket.inet_ntoa(struct.pack('!l', addr)) |
#!/bin/sh | |
# certs.sh | |
# use this for Yocto/Edison: | |
LIB=lib | |
# use this for WRLinux/Gateway | |
# LIB=lib64 | |
if [ -f /usr/$LIB/jvm/java-8-openjdk/jre/lib/security/cacerts ]; then | |
mv /usr/$LIB/jvm/java-8-openjdk/jre/lib/security/cacerts \ |
var fs = require('fs'); | |
var INTERVAL = 1000; | |
var cycle_stop = false; | |
var daemon = false; | |
var timer; | |
process.argv.forEach(function (arg) { | |
if (arg === '-d') daemon = true; |
<?php | |
// ... | |
protected function getMockedPDO() | |
{ | |
$query = $this->getMock('\PDOStatement'); | |
$query->method('execute')->willReturn(true); | |
$db = $this->getMockBuilder('\PDO') | |
->disableOriginalConstructor() |
$.fn.select2.amd.define('select2/data/extended-ajax',['./ajax','../utils','jquery'], function(AjaxAdapter, Utils, $){ | |
function ExtendedAjaxAdapter ($element,options) { | |
//we need explicitly process minimumInputLength value | |
//to decide should we use AjaxAdapter or return defaultResults, | |
//so it is impossible to use MinimumLength decorator here | |
this.minimumInputLength = options.get('minimumInputLength'); | |
this.defaultResults = options.get('defaultResults'); | |
ExtendedAjaxAdapter.__super__.constructor.call(this,$element,options); |
(function($){ | |
$(function(){ | |
$.ajax({ | |
contentType: 'application/text; charset=utf-8', | |
crossBrowser: true, | |
type: 'GET', | |
url: '/cdn-cgi/trace', | |
}).done(function(d){ | |
var data = d.replace(/[\r\n]+/g, '","').replace(/\=+/g, '":"'); | |
data = '{"' + data.slice(0, data.lastIndexOf('","')) + '"}'; |
新款的树莓派3B功能之丰富,性能之强悍,让我垂涎。考虑到家里的网件 WNDR3700v2 也服役四年有余了。还是败了一个树莓派3B回来打造成新的路由。
WARNING
本文所有指令均仅供参考,切勿无脑复制粘贴!
〇 安装系统
Based on https://busylog.net/telnet-imap-commands-note/
Dockerfile
that is based on your production image and
simply install xdebug
into it. Exemple:FROM php:5
RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
<?php | |
function combos($data, &$all = array(), $group = array(), $val = null, $i = 0) { | |
if (isset($val)) { | |
array_push($group, $val); | |
} | |
if ($i >= count($data)) { | |
array_push($all, $group); | |
} else { | |
foreach ($data[$i] as $v) { |