####【Round 1】
叶神月:你南书记市长一锅端
典故1:原南京市委书记杨卫泽双规(政治)
典故2:原南京市长季建业被双规(政治)
var result = ~ function(str) { | |
// Define a DSL | |
var r = function(target, replace) { | |
str = str.replace(new RegExp(target, 'gi'), replace || target); | |
}; | |
// Use the DSL | |
r('JavaScript'); | |
r('gogle', 'Google'); |
#include <windows.h> | |
#include <string> | |
using namespace std::string_literals; | |
constexpr size_t buffer_size = 64*1024; | |
static char buffer[buffer_size]; | |
static DWORD PrintString(HANDLE h_stdout, std::wstring const& string) { | |
DWORD count; |
# /bin/bash | |
#Usage: $ ./cs_xproj_validate.sh path/to/xcode/project/file/theproject.xcodeproj | |
#More info: http://stackoverflow.com/q/13962341/89035 | |
PROJECT_FILE="$1/project.pbxproj" | |
PREVIOUS_LINE=-1 | |
for LINE in `cat "$PROJECT_FILE" | grep -n CODE_SIGN_IDENTITY | grep -o -E '^([0-9]*)'` |
<?xml version="1.0" encoding="utf-8"?> | |
<!-- UEFI & GPT, 64GB C drive, 160GB D drive, Administrator enabled with empty password --> | |
<unattend xmlns="urn:schemas-microsoft-com:unattend"> | |
<servicing></servicing> | |
<settings pass="windowsPE"> | |
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<DiskConfiguration> | |
<WillShowUI>OnError</WillShowUI> | |
<Disk wcm:action="add"> | |
<CreatePartitions> |
新老用户都可能遇到陷阱。下面我们列出频繁出现的问题,以及如何解决。 在 Freenode IRC #nginx 频道,我们经常看到这些问题。
[TOC]
最常见的是有人试图从其他指南拷贝配置片段。并非所有的指南是错误的,但绝大部分是有问题的。
'use strict'; | |
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var del = require('del'); | |
var uglify = require('gulp-uglify'); | |
var gulpif = require('gulp-if'); | |
var exec = require('child_process').exec; | |
var notify = require('gulp-notify'); |
Copyright 2020 Aubrey Taylor | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTH |
Lately I've been using Mikrotik routers because they're cheap, powerful, and fast. Most of them have either a USB or MicroSD slot, so you can add enough space to store network boot images right on the router.
I got most of the tips needed from these two articles, and combined them into this step by step guide:
This was a huge hassle to figure out, so I wrote up a little guide in hopes that others would find it helpful:
macOS's domain name resolver will only return IPv6 addresses (from AAAA records) when it thinks that you have a valid routable IPv6 address. For physical interfaces like Ethernet or Wi-Fi it's enough to set or be assigned an IPv6 address, but for tunnels (such as those using utun
interfaces) there are some extra annoying steps that need to be taken to convince the system that yes, you indeed have an IPv6 address, and yes, you'd like to get IPv6 addresses back for DNS lookups.
I use wg-quick
to establish a WireGuard tunnel between my laptop and a Linode virtual server. WireGuard uses a utun
user-space tunnel device to make the connection. Here's how that device gets configured: