To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
- Homebrew
- Mountain Lion -> High Sierra
To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
| import argparse | |
| import logging | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument('--verbose', '-v', action='count', default=1) | |
| args = parser.parse_args() | |
| args.verbose = 40 - (10 * args.verbose) if args.verbose > 0 else 0 | |
| logging.basicConfig(level=args.verbose, format='%(asctime)s %(levelname)s: %(message)s', |
| #!/usr/bin/env python | |
| # Reflects the requests from HTTP methods GET, POST, PUT, and DELETE | |
| # Written by Nathan Hamiel (2010) | |
| from http.server import HTTPServer, BaseHTTPRequestHandler | |
| from optparse import OptionParser | |
| class RequestHandler(BaseHTTPRequestHandler): | |
| def do_GET(self): |
| # If you use bash, this technique isn't really zsh specific. Adapt as needed. | |
| source ~/keychain-environment-variables.sh | |
| # AWS configuration example, after doing: | |
| # $ set-keychain-environment-variable AWS_ACCESS_KEY_ID | |
| # provide: "AKIAYOURACCESSKEY" | |
| # $ set-keychain-environment-variable AWS_SECRET_ACCESS_KEY | |
| # provide: "j1/yoursupersecret/password" | |
| export AWS_ACCESS_KEY_ID=$(keychain-environment-variable AWS_ACCESS_KEY_ID); | |
| export AWS_SECRET_ACCESS_KEY=$(keychain-environment-variable AWS_SECRET_ACCESS_KEY); |
| #!/bin/bash | |
| # This script allows you to chroot ("work on") | |
| # the raspbian sd card as if it's the raspberry pi | |
| # on your Ubuntu desktop/laptop | |
| # just much faster and more convenient | |
| # credits: https://gist.github.com/jkullick/9b02c2061fbdf4a6c4e8a78f1312a689 | |
| # make sure you have issued |
| // imgLib -> Image package from https://pub.dartlang.org/packages/image | |
| import 'package:image/image.dart' as imglib; | |
| import 'package:camera/camera.dart'; | |
| Future<List<int>> convertImagetoPng(CameraImage image) async { | |
| try { | |
| imglib.Image img; | |
| if (image.format.group == ImageFormatGroup.yuv420) { | |
| img = _convertYUV420(image); | |
| } else if (image.format.group == ImageFormatGroup.bgra8888) { |
| area_data = { | |
| '臺北市': [ | |
| '中正區', '大同區', '中山區', '萬華區', '信義區', '松山區', '大安區', '南港區', '北投區', '內湖區', '士林區', '文山區' | |
| ], | |
| '新北市': [ | |
| '板橋區', '新莊區', '泰山區', '林口區', '淡水區', '金山區', '八里區', '萬里區', '石門區', '三芝區', '瑞芳區', '汐止區', '平溪區', '貢寮區', '雙溪區', '深坑區', '石碇區', '新店區', '坪林區', '烏來區', '中和區', '永和區', '土城區', '三峽區', '樹林區', '鶯歌區', '三重區', '蘆洲區', '五股區' | |
| ], | |
| '基隆市': [ | |
| '仁愛區', '中正區', '信義區', '中山區', '安樂區', '暖暖區', '七堵區' | |
| ], |
| # EdgeOS v1.9 Hinet Config Script | |
| # by Superbil (https://github.com/superbil) | |
| # Last updated: Sep 25, 2018 | |
| # Based on settings & scripts by Jenkins, Atlantisman, TK, and CompTech | |
| # RUN THIS SCRIPT AS ROOT ON YOUR EDGEROUTER | |
| # Script runs best if you copy and paste in sections | |
| #______________________Basic Firewall Setup_______________________________ | |
| configure |
| var thePixelBuffer : CVPixelBuffer? | |
| let testImage : UIImage = UIImage.init(named: "twdEnds.png")! | |
| self.thePixelBuffer = self.pixelBufferFromImage(image: testImage) | |
| func pixelBufferFromImage(image: UIImage) -> CVPixelBuffer { | |