国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.
After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft
| ############################################## | |
| # Sample client-side OpenVPN 2.0 config file # | |
| # for connecting to multi-client server. # | |
| # # | |
| # This configuration can be used by multiple # | |
| # clients, however each client should have # | |
| # its own cert and key files. # | |
| # # | |
| # On Windows, you might want to rename this # | |
| # file so it has a .ovpn extension # |
| #!/bin/bash | |
| # | |
| # Credits to fuckbecauseican5 from https://www.reddit.com/r/hackintosh/comments/4s561a/macos_sierra_16a238m_install_success_and_guide/ | |
| # Adapted to work with the official image available into Mac App Store | |
| # | |
| # Enjoy! | |
| hdiutil attach /Applications/Install\ macOS\ Sierra.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app | |
| hdiutil create -o /tmp/Sierra.cdr -size 7316m -layout SPUD -fs HFS+J | |
| hdiutil attach /tmp/Sierra.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build |
在 Xcode 里下载文件真的是一种折磨, 特别是每次 Xcode 大版本更新都会遇到新的下载内容. 经过一翻周折, 本人找到一个方法可以轻松快速便捷地下载和安装对应的 Simulator 和 Doc 文件
| #!/usr/bin/env python | |
| from Foundation import NSData, NSPropertyListSerialization | |
| import fnmatch | |
| import sys | |
| from zipfile import ZipFile | |
| # TODO: Add error checking. | |
| def parse_plist(info_plist_string): |
| #!/usr/bin/env ruby | |
| # | |
| # This code snippet shows how to enable SSL in Sinatra+Thin. | |
| # | |
| require 'sinatra' | |
| require 'thin' | |
| class MyThinBackend < ::Thin::Backends::TcpServer | |
| def initialize(host, port, options) |
| @implementation UIImage (scale) | |
| /** | |
| * Scales an image to fit within a bounds with a size governed by | |
| * the passed size. Also keeps the aspect ratio. | |
| * | |
| * Switch MIN to MAX for aspect fill instead of fit. | |
| * | |
| * @param newSize the size of the bounds the image must fit within. | |
| * @return a new scaled image. |