diff --git a/404.html b/404.html new file mode 100644 index 0000000..0021524 --- /dev/null +++ b/404.html @@ -0,0 +1,3 @@ + + I like Mac +
Page not found :(
\ No newline at end of file diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..830defd --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +ilikemac.com \ No newline at end of file diff --git a/about/index.html b/about/index.html new file mode 100644 index 0000000..dbf39f6 --- /dev/null +++ b/about/index.html @@ -0,0 +1,4 @@ + + About + +

做了这个网站,目的是为了帮助更多人了解和使用苹果电脑。

欢迎留言以及提问,也许你的疑问就会成为我的下一篇文章。

\ No newline at end of file diff --git a/elasticlunr.min.js b/elasticlunr.min.js new file mode 100644 index 0000000..79dad65 --- /dev/null +++ b/elasticlunr.min.js @@ -0,0 +1,10 @@ +/** + * elasticlunr - http://weixsong.github.io + * Lightweight full-text search engine in Javascript for browser search and offline search. - 0.9.6 + * + * Copyright (C) 2017 Oliver Nightingale + * Copyright (C) 2017 Wei Song + * MIT Licensed + * @license + */ +!function(){function e(e){if(null===e||"object"!=typeof e)return e;var t=e.constructor();for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var t=function(e){var n=new t.Index;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),e&&e.call(n,n),n};t.version="0.9.5",lunr=t,t.utils={},t.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),t.utils.toString=function(e){return void 0===e||null===e?"":e.toString()},t.EventEmitter=function(){this.events={}},t.EventEmitter.prototype.addListener=function(){var e=Array.prototype.slice.call(arguments),t=e.pop(),n=e;if("function"!=typeof t)throw new TypeError("last argument must be a function");n.forEach(function(e){this.hasHandler(e)||(this.events[e]=[]),this.events[e].push(t)},this)},t.EventEmitter.prototype.removeListener=function(e,t){if(this.hasHandler(e)){var n=this.events[e].indexOf(t);-1!==n&&(this.events[e].splice(n,1),0==this.events[e].length&&delete this.events[e])}},t.EventEmitter.prototype.emit=function(e){if(this.hasHandler(e)){var t=Array.prototype.slice.call(arguments,1);this.events[e].forEach(function(e){e.apply(void 0,t)},this)}},t.EventEmitter.prototype.hasHandler=function(e){return e in this.events},t.tokenizer=function(e){if(!arguments.length||null===e||void 0===e)return[];if(Array.isArray(e)){var n=e.filter(function(e){return null===e||void 0===e?!1:!0});n=n.map(function(e){return t.utils.toString(e).toLowerCase()});var i=[];return n.forEach(function(e){var n=e.split(t.tokenizer.seperator);i=i.concat(n)},this),i}return e.toString().trim().toLowerCase().split(t.tokenizer.seperator)},t.tokenizer.defaultSeperator=/[\s\-]+/,t.tokenizer.seperator=t.tokenizer.defaultSeperator,t.tokenizer.setSeperator=function(e){null!==e&&void 0!==e&&"object"==typeof e&&(t.tokenizer.seperator=e)},t.tokenizer.resetSeperator=function(){t.tokenizer.seperator=t.tokenizer.defaultSeperator},t.tokenizer.getSeperator=function(){return t.tokenizer.seperator},t.Pipeline=function(){this._queue=[]},t.Pipeline.registeredFunctions={},t.Pipeline.registerFunction=function(e,n){n in t.Pipeline.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[n]=e},t.Pipeline.getRegisteredFunction=function(e){return e in t.Pipeline.registeredFunctions!=!0?null:t.Pipeline.registeredFunctions[e]},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(e){var i=t.Pipeline.getRegisteredFunction(e);if(!i)throw new Error("Cannot load un-registered function: "+e);n.add(i)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){t.Pipeline.warnIfFunctionNotRegistered(e),this._queue.push(e)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._queue.indexOf(e);if(-1===i)throw new Error("Cannot find existingFn");this._queue.splice(i+1,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._queue.indexOf(e);if(-1===i)throw new Error("Cannot find existingFn");this._queue.splice(i,0,n)},t.Pipeline.prototype.remove=function(e){var t=this._queue.indexOf(e);-1!==t&&this._queue.splice(t,1)},t.Pipeline.prototype.run=function(e){for(var t=[],n=e.length,i=this._queue.length,o=0;n>o;o++){for(var r=e[o],s=0;i>s&&(r=this._queue[s](r,o,e),void 0!==r&&null!==r);s++);void 0!==r&&null!==r&&t.push(r)}return t},t.Pipeline.prototype.reset=function(){this._queue=[]},t.Pipeline.prototype.get=function(){return this._queue},t.Pipeline.prototype.toJSON=function(){return this._queue.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Index=function(){this._fields=[],this._ref="id",this.pipeline=new t.Pipeline,this.documentStore=new t.DocumentStore,this.index={},this.eventEmitter=new t.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},t.Index.prototype.on=function(){var e=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,e)},t.Index.prototype.off=function(e,t){return this.eventEmitter.removeListener(e,t)},t.Index.load=function(e){e.version!==t.version&&t.utils.warn("version mismatch: current "+t.version+" importing "+e.version);var n=new this;n._fields=e.fields,n._ref=e.ref,n.documentStore=t.DocumentStore.load(e.documentStore),n.pipeline=t.Pipeline.load(e.pipeline),n.index={};for(var i in e.index)n.index[i]=t.InvertedIndex.load(e.index[i]);return n},t.Index.prototype.addField=function(e){return this._fields.push(e),this.index[e]=new t.InvertedIndex,this},t.Index.prototype.setRef=function(e){return this._ref=e,this},t.Index.prototype.saveDocument=function(e){return this.documentStore=new t.DocumentStore(e),this},t.Index.prototype.addDoc=function(e,n){if(e){var n=void 0===n?!0:n,i=e[this._ref];this.documentStore.addDoc(i,e),this._fields.forEach(function(n){var o=this.pipeline.run(t.tokenizer(e[n]));this.documentStore.addFieldLength(i,n,o.length);var r={};o.forEach(function(e){e in r?r[e]+=1:r[e]=1},this);for(var s in r){var u=r[s];u=Math.sqrt(u),this.index[n].addToken(s,{ref:i,tf:u})}},this),n&&this.eventEmitter.emit("add",e,this)}},t.Index.prototype.removeDocByRef=function(e){if(e&&this.documentStore.isDocStored()!==!1&&this.documentStore.hasDoc(e)){var t=this.documentStore.getDoc(e);this.removeDoc(t,!1)}},t.Index.prototype.removeDoc=function(e,n){if(e){var n=void 0===n?!0:n,i=e[this._ref];this.documentStore.hasDoc(i)&&(this.documentStore.removeDoc(i),this._fields.forEach(function(n){var o=this.pipeline.run(t.tokenizer(e[n]));o.forEach(function(e){this.index[n].removeToken(e,i)},this)},this),n&&this.eventEmitter.emit("remove",e,this))}},t.Index.prototype.updateDoc=function(e,t){var t=void 0===t?!0:t;this.removeDocByRef(e[this._ref],!1),this.addDoc(e,!1),t&&this.eventEmitter.emit("update",e,this)},t.Index.prototype.idf=function(e,t){var n="@"+t+"/"+e;if(Object.prototype.hasOwnProperty.call(this._idfCache,n))return this._idfCache[n];var i=this.index[t].getDocFreq(e),o=1+Math.log(this.documentStore.length/(i+1));return this._idfCache[n]=o,o},t.Index.prototype.getFields=function(){return this._fields.slice()},t.Index.prototype.search=function(e,n){if(!e)return[];e="string"==typeof e?{any:e}:JSON.parse(JSON.stringify(e));var i=null;null!=n&&(i=JSON.stringify(n));for(var o=new t.Configuration(i,this.getFields()).get(),r={},s=Object.keys(e),u=0;u0&&t.push(e);for(var i in n)"docs"!==i&&"df"!==i&&this.expandToken(e+i,t,n[i]);return t},t.InvertedIndex.prototype.toJSON=function(){return{root:this.root}},t.Configuration=function(e,n){var e=e||"";if(void 0==n||null==n)throw new Error("fields should not be null");this.config={};var i;try{i=JSON.parse(e),this.buildUserConfig(i,n)}catch(o){t.utils.warn("user configuration parse failed, will use default configuration"),this.buildDefaultConfig(n)}},t.Configuration.prototype.buildDefaultConfig=function(e){this.reset(),e.forEach(function(e){this.config[e]={boost:1,bool:"OR",expand:!1}},this)},t.Configuration.prototype.buildUserConfig=function(e,n){var i="OR",o=!1;if(this.reset(),"bool"in e&&(i=e.bool||i),"expand"in e&&(o=e.expand||o),"fields"in e)for(var r in e.fields)if(n.indexOf(r)>-1){var s=e.fields[r],u=o;void 0!=s.expand&&(u=s.expand),this.config[r]={boost:s.boost||0===s.boost?s.boost:1,bool:s.bool||i,expand:u}}else t.utils.warn("field name in user configuration not found in index instance fields");else this.addAllFields2UserConfig(i,o,n)},t.Configuration.prototype.addAllFields2UserConfig=function(e,t,n){n.forEach(function(n){this.config[n]={boost:1,bool:e,expand:t}},this)},t.Configuration.prototype.get=function(){return this.config},t.Configuration.prototype.reset=function(){this.config={}},lunr.SortedSet=function(){this.length=0,this.elements=[]},lunr.SortedSet.load=function(e){var t=new this;return t.elements=e,t.length=e.length,t},lunr.SortedSet.prototype.add=function(){var e,t;for(e=0;e1;){if(r===e)return o;e>r&&(t=o),r>e&&(n=o),i=n-t,o=t+Math.floor(i/2),r=this.elements[o]}return r===e?o:-1},lunr.SortedSet.prototype.locationFor=function(e){for(var t=0,n=this.elements.length,i=n-t,o=t+Math.floor(i/2),r=this.elements[o];i>1;)e>r&&(t=o),r>e&&(n=o),i=n-t,o=t+Math.floor(i/2),r=this.elements[o];return r>e?o:e>r?o+1:void 0},lunr.SortedSet.prototype.intersect=function(e){for(var t=new lunr.SortedSet,n=0,i=0,o=this.length,r=e.length,s=this.elements,u=e.elements;;){if(n>o-1||i>r-1)break;s[n]!==u[i]?s[n]u[i]&&i++:(t.add(s[n]),n++,i++)}return t},lunr.SortedSet.prototype.clone=function(){var e=new lunr.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},lunr.SortedSet.prototype.union=function(e){var t,n,i;this.length>=e.length?(t=this,n=e):(t=e,n=this),i=t.clone();for(var o=0,r=n.toArray();o \ No newline at end of file diff --git a/feather/sun.svg b/feather/sun.svg new file mode 100644 index 0000000..7f51b94 --- /dev/null +++ b/feather/sun.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/fonts.css b/fonts.css new file mode 100644 index 0000000..7172ab4 --- /dev/null +++ b/fonts.css @@ -0,0 +1 @@ +@font-face{font-family:"Jetbrains Mono";font-style:normal;font-weight:400;src:url("fonts/JetbrainsMono/JetBrainsMono-Regular.ttf"),local("ttf");font-display:swap}@font-face{font-family:"Jetbrains Mono";font-style:normal;font-weight:700;src:url("fonts/JetbrainsMono/JetBrainsMono-Bold.ttf"),local("ttf");font-display:swap}@font-face{font-family:"Space Grotesk";font-style:normal;font-weight:400;src:url("fonts/SpaceGrotesk/SpaceGrotesk-Regular.ttf"),local("ttf");font-display:swap}@font-face{font-family:"Space Grotesk";font-style:normal;font-weight:700;src:url("fonts/SpaceGrotesk/SpaceGrotesk-Bold.ttf"),local("ttf");font-display:swap} \ No newline at end of file diff --git a/fonts/.gitkeep b/fonts/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/fonts/JetbrainsMono/JetBrainsMono-Bold.ttf b/fonts/JetbrainsMono/JetBrainsMono-Bold.ttf new file mode 100644 index 0000000..710c34b Binary files /dev/null and b/fonts/JetbrainsMono/JetBrainsMono-Bold.ttf differ diff --git a/fonts/JetbrainsMono/JetBrainsMono-BoldItalic.ttf b/fonts/JetbrainsMono/JetBrainsMono-BoldItalic.ttf new file mode 100644 index 0000000..fdff00f Binary files /dev/null and b/fonts/JetbrainsMono/JetBrainsMono-BoldItalic.ttf differ diff --git a/fonts/JetbrainsMono/JetBrainsMono-ExtraBold.ttf b/fonts/JetbrainsMono/JetBrainsMono-ExtraBold.ttf new file mode 100644 index 0000000..eb94300 Binary files /dev/null and b/fonts/JetbrainsMono/JetBrainsMono-ExtraBold.ttf differ diff --git a/fonts/JetbrainsMono/JetBrainsMono-ExtraBoldItalic.ttf b/fonts/JetbrainsMono/JetBrainsMono-ExtraBoldItalic.ttf new file mode 100644 index 0000000..b70b4e7 Binary files /dev/null and b/fonts/JetbrainsMono/JetBrainsMono-ExtraBoldItalic.ttf differ diff --git a/fonts/JetbrainsMono/JetBrainsMono-ExtraLight.ttf b/fonts/JetbrainsMono/JetBrainsMono-ExtraLight.ttf new file mode 100644 index 0000000..74efced Binary files /dev/null and b/fonts/JetbrainsMono/JetBrainsMono-ExtraLight.ttf differ diff --git a/fonts/JetbrainsMono/JetBrainsMono-ExtraLightItalic.ttf b/fonts/JetbrainsMono/JetBrainsMono-ExtraLightItalic.ttf new file mode 100644 index 0000000..1a9d2d3 Binary files /dev/null and b/fonts/JetbrainsMono/JetBrainsMono-ExtraLightItalic.ttf differ diff --git a/fonts/JetbrainsMono/JetBrainsMono-Italic.ttf b/fonts/JetbrainsMono/JetBrainsMono-Italic.ttf new file mode 100644 index 0000000..ffd5d77 Binary files /dev/null and b/fonts/JetbrainsMono/JetBrainsMono-Italic.ttf differ diff --git a/fonts/JetbrainsMono/JetBrainsMono-Light.ttf b/fonts/JetbrainsMono/JetBrainsMono-Light.ttf new file mode 100644 index 0000000..c0682f9 Binary files /dev/null and b/fonts/JetbrainsMono/JetBrainsMono-Light.ttf differ diff --git a/fonts/JetbrainsMono/JetBrainsMono-LightItalic.ttf b/fonts/JetbrainsMono/JetBrainsMono-LightItalic.ttf new file mode 100644 index 0000000..f20bac9 Binary files /dev/null and b/fonts/JetbrainsMono/JetBrainsMono-LightItalic.ttf differ diff --git a/fonts/JetbrainsMono/JetBrainsMono-Medium.ttf b/fonts/JetbrainsMono/JetBrainsMono-Medium.ttf new file mode 100644 index 0000000..17ff945 Binary files /dev/null and b/fonts/JetbrainsMono/JetBrainsMono-Medium.ttf differ diff --git a/fonts/JetbrainsMono/JetBrainsMono-MediumItalic.ttf b/fonts/JetbrainsMono/JetBrainsMono-MediumItalic.ttf new file mode 100644 index 0000000..9b699bb Binary files /dev/null and b/fonts/JetbrainsMono/JetBrainsMono-MediumItalic.ttf differ diff --git a/fonts/JetbrainsMono/JetBrainsMono-Regular.ttf b/fonts/JetbrainsMono/JetBrainsMono-Regular.ttf new file mode 100644 index 0000000..9a5202e Binary files /dev/null and b/fonts/JetbrainsMono/JetBrainsMono-Regular.ttf differ diff --git a/fonts/JetbrainsMono/JetBrainsMono-SemiBold.ttf b/fonts/JetbrainsMono/JetBrainsMono-SemiBold.ttf new file mode 100644 index 0000000..84b7795 Binary files /dev/null and b/fonts/JetbrainsMono/JetBrainsMono-SemiBold.ttf differ diff --git a/fonts/JetbrainsMono/JetBrainsMono-SemiBoldItalic.ttf b/fonts/JetbrainsMono/JetBrainsMono-SemiBoldItalic.ttf new file mode 100644 index 0000000..ffa1f39 Binary files /dev/null and b/fonts/JetbrainsMono/JetBrainsMono-SemiBoldItalic.ttf differ diff --git a/fonts/JetbrainsMono/JetBrainsMono-Thin.ttf b/fonts/JetbrainsMono/JetBrainsMono-Thin.ttf new file mode 100644 index 0000000..1317bfe Binary files /dev/null and b/fonts/JetbrainsMono/JetBrainsMono-Thin.ttf differ diff --git a/fonts/JetbrainsMono/JetBrainsMono-ThinItalic.ttf b/fonts/JetbrainsMono/JetBrainsMono-ThinItalic.ttf new file mode 100644 index 0000000..bc72439 Binary files /dev/null and b/fonts/JetbrainsMono/JetBrainsMono-ThinItalic.ttf differ diff --git a/fonts/SpaceGrotesk/SpaceGrotesk-Bold.ttf b/fonts/SpaceGrotesk/SpaceGrotesk-Bold.ttf new file mode 100644 index 0000000..869a60f Binary files /dev/null and b/fonts/SpaceGrotesk/SpaceGrotesk-Bold.ttf differ diff --git a/fonts/SpaceGrotesk/SpaceGrotesk-Light.ttf b/fonts/SpaceGrotesk/SpaceGrotesk-Light.ttf new file mode 100644 index 0000000..76a195f Binary files /dev/null and b/fonts/SpaceGrotesk/SpaceGrotesk-Light.ttf differ diff --git a/fonts/SpaceGrotesk/SpaceGrotesk-Medium.ttf b/fonts/SpaceGrotesk/SpaceGrotesk-Medium.ttf new file mode 100644 index 0000000..667905f Binary files /dev/null and b/fonts/SpaceGrotesk/SpaceGrotesk-Medium.ttf differ diff --git a/fonts/SpaceGrotesk/SpaceGrotesk-Regular.ttf b/fonts/SpaceGrotesk/SpaceGrotesk-Regular.ttf new file mode 100644 index 0000000..792fe1b Binary files /dev/null and b/fonts/SpaceGrotesk/SpaceGrotesk-Regular.ttf differ diff --git a/fonts/SpaceGrotesk/SpaceGrotesk-SemiBold.ttf b/fonts/SpaceGrotesk/SpaceGrotesk-SemiBold.ttf new file mode 100644 index 0000000..0219302 Binary files /dev/null and b/fonts/SpaceGrotesk/SpaceGrotesk-SemiBold.ttf differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..57fbb6c --- /dev/null +++ b/index.html @@ -0,0 +1,3 @@ + + I like Mac + \ No newline at end of file diff --git a/js/count.js b/js/count.js new file mode 100644 index 0000000..7c504bc --- /dev/null +++ b/js/count.js @@ -0,0 +1,270 @@ +// GoatCounter: https://www.goatcounter.com +// This file (and *only* this file) is released under the ISC license: +// https://opensource.org/licenses/ISC +;(function() { + 'use strict'; + + if (window.goatcounter && window.goatcounter.vars) // Compatibility with very old version; do not use. + window.goatcounter = window.goatcounter.vars + else + window.goatcounter = window.goatcounter || {} + + // Load settings from data-goatcounter-settings. + var s = document.querySelector('script[data-goatcounter]') + if (s && s.dataset.goatcounterSettings) { + try { var set = JSON.parse(s.dataset.goatcounterSettings) } + catch (err) { console.error('invalid JSON in data-goatcounter-settings: ' + err) } + for (var k in set) + if (['no_onload', 'no_events', 'allow_local', 'allow_frame', 'path', 'title', 'referrer', 'event'].indexOf(k) > -1) + window.goatcounter[k] = set[k] + } + + var enc = encodeURIComponent + + // Get all data we're going to send off to the counter endpoint. + var get_data = function(vars) { + var data = { + p: (vars.path === undefined ? goatcounter.path : vars.path), + r: (vars.referrer === undefined ? goatcounter.referrer : vars.referrer), + t: (vars.title === undefined ? goatcounter.title : vars.title), + e: !!(vars.event || goatcounter.event), + s: [window.screen.width, window.screen.height, (window.devicePixelRatio || 1)], + b: is_bot(), + q: location.search, + } + + var rcb, pcb, tcb // Save callbacks to apply later. + if (typeof(data.r) === 'function') rcb = data.r + if (typeof(data.t) === 'function') tcb = data.t + if (typeof(data.p) === 'function') pcb = data.p + + if (is_empty(data.r)) data.r = document.referrer + if (is_empty(data.t)) data.t = document.title + if (is_empty(data.p)) data.p = get_path() + + if (rcb) data.r = rcb(data.r) + if (tcb) data.t = tcb(data.t) + if (pcb) data.p = pcb(data.p) + return data + } + + // Check if a value is "empty" for the purpose of get_data(). + var is_empty = function(v) { return v === null || v === undefined || typeof(v) === 'function' } + + // See if this looks like a bot; there is some additional filtering on the + // backend, but these properties can't be fetched from there. + var is_bot = function() { + // Headless browsers are probably a bot. + var w = window, d = document + if (w.callPhantom || w._phantom || w.phantom) + return 150 + if (w.__nightmare) + return 151 + if (d.__selenium_unwrapped || d.__webdriver_evaluate || d.__driver_evaluate) + return 152 + if (navigator.webdriver) + return 153 + return 0 + } + + // Object to urlencoded string, starting with a ?. + var urlencode = function(obj) { + var p = [] + for (var k in obj) + if (obj[k] !== '' && obj[k] !== null && obj[k] !== undefined && obj[k] !== false) + p.push(enc(k) + '=' + enc(obj[k])) + return '?' + p.join('&') + } + + // Show a warning in the console. + var warn = function(msg) { + if (console && 'warn' in console) + console.warn('goatcounter: ' + msg) + } + + // Get the endpoint to send requests to. + var get_endpoint = function() { + var s = document.querySelector('script[data-goatcounter]') + if (s && s.dataset.goatcounter) + return s.dataset.goatcounter + return (goatcounter.endpoint || window.counter) // counter is for compat; don't use. + } + + // Get current path. + var get_path = function() { + var loc = location, + c = document.querySelector('link[rel="canonical"][href]') + if (c) { // May be relative or point to different domain. + var a = document.createElement('a') + a.href = c.href + if (a.hostname.replace(/^www\./, '') === location.hostname.replace(/^www\./, '')) + loc = a + } + return (loc.pathname + loc.search) || '/' + } + + // Run function after DOM is loaded. + var on_load = function(f) { + if (document.body === null) + document.addEventListener('DOMContentLoaded', function() { f() }, false) + else + f() + } + + // Filter some requests that we (probably) don't want to count. + goatcounter.filter = function() { + if ('visibilityState' in document && document.visibilityState === 'prerender') + return 'visibilityState' + if (!goatcounter.allow_frame && location !== parent.location) + return 'frame' + if (!goatcounter.allow_local && location.hostname.match(/(localhost$|^127\.|^10\.|^172\.(1[6-9]|2[0-9]|3[0-1])\.|^192\.168\.|^0\.0\.0\.0$)/)) + return 'localhost' + if (!goatcounter.allow_local && location.protocol === 'file:') + return 'localfile' + if (localStorage && localStorage.getItem('skipgc') === 't') + return 'disabled with #toggle-goatcounter' + return false + } + + // Get URL to send to GoatCounter. + window.goatcounter.url = function(vars) { + var data = get_data(vars || {}) + if (data.p === null) // null from user callback. + return + data.rnd = Math.random().toString(36).substr(2, 5) // Browsers don't always listen to Cache-Control. + + var endpoint = get_endpoint() + if (!endpoint) + return warn('no endpoint found') + + return endpoint + urlencode(data) + } + + // Count a hit. + window.goatcounter.count = function(vars) { + var f = goatcounter.filter() + if (f) + return warn('not counting because of: ' + f) + + var url = goatcounter.url(vars) + if (!url) + return warn('not counting because path callback returned null') + + var img = document.createElement('img') + img.src = url + img.style.position = 'absolute' // Affect layout less. + img.style.bottom = '0px' + img.style.width = '1px' + img.style.height = '1px' + img.loading = 'eager' + img.setAttribute('alt', '') + img.setAttribute('aria-hidden', 'true') + + var rm = function() { if (img && img.parentNode) img.parentNode.removeChild(img) } + img.addEventListener('load', rm, false) + document.body.appendChild(img) + } + + // Get a query parameter. + window.goatcounter.get_query = function(name) { + var s = location.search.substr(1).split('&') + for (var i = 0; i < s.length; i++) + if (s[i].toLowerCase().indexOf(name.toLowerCase() + '=') === 0) + return s[i].substr(name.length + 1) + } + + // Track click events. + window.goatcounter.bind_events = function() { + if (!document.querySelectorAll) // Just in case someone uses an ancient browser. + return + + var send = function(elem) { + return function() { + goatcounter.count({ + event: true, + path: (elem.dataset.goatcounterClick || elem.name || elem.id || ''), + title: (elem.dataset.goatcounterTitle || elem.title || (elem.innerHTML || '').substr(0, 200) || ''), + referrer: (elem.dataset.goatcounterReferrer || elem.dataset.goatcounterReferral || ''), + }) + } + } + + Array.prototype.slice.call(document.querySelectorAll("*[data-goatcounter-click]")).forEach(function(elem) { + if (elem.dataset.goatcounterBound) + return + var f = send(elem) + elem.addEventListener('click', f, false) + elem.addEventListener('auxclick', f, false) // Middle click. + elem.dataset.goatcounterBound = 'true' + }) + } + + // Add a "visitor counter" frame or image. + window.goatcounter.visit_count = function(opt) { + on_load(function() { + opt = opt || {} + opt.type = opt.type || 'html' + opt.append = opt.append || 'body' + opt.path = opt.path || get_path() + opt.attr = opt.attr || {width: '200', height: (opt.no_branding ? '60' : '80')} + + opt.attr['src'] = get_endpoint() + 'er/' + enc(opt.path) + '.' + enc(opt.type) + '?' + if (opt.no_branding) opt.attr['src'] += '&no_branding=1' + if (opt.style) opt.attr['src'] += '&style=' + enc(opt.style) + if (opt.start) opt.attr['src'] += '&start=' + enc(opt.start) + if (opt.end) opt.attr['src'] += '&end=' + enc(opt.end) + + var tag = {png: 'img', svg: 'img', html: 'iframe'}[opt.type] + if (!tag) + return warn('visit_count: unknown type: ' + opt.type) + + if (opt.type === 'html') { + opt.attr['frameborder'] = '0' + opt.attr['scrolling'] = 'no' + } + + var d = document.createElement(tag) + for (var k in opt.attr) + d.setAttribute(k, opt.attr[k]) + + var p = document.querySelector(opt.append) + if (!p) + return warn('visit_count: append not found: ' + opt.append) + p.appendChild(d) + }) + } + + // Make it easy to skip your own views. + if (location.hash === '#toggle-goatcounter') { + if (localStorage.getItem('skipgc') === 't') { + localStorage.removeItem('skipgc', 't') + alert('GoatCounter tracking is now ENABLED in this browser.') + } + else { + localStorage.setItem('skipgc', 't') + alert('GoatCounter tracking is now DISABLED in this browser until ' + location + ' is loaded again.') + } + } + + if (!goatcounter.no_onload) + on_load(function() { + // 1. Page is visible, count request. + // 2. Page is not yet visible; wait until it switches to 'visible' and count. + // See #487 + if (!('visibilityState' in document) || document.visibilityState === 'visible') + goatcounter.count() + else { + var f = function(e) { + if (document.visibilityState !== 'visible') + return + document.removeEventListener('visibilitychange', f) + goatcounter.count() + } + document.addEventListener('visibilitychange', f) + } + + if (!goatcounter.no_events) + goatcounter.bind_events() + }) +})(); + diff --git a/js/imamu.js b/js/imamu.js new file mode 100644 index 0000000..c317f48 --- /dev/null +++ b/js/imamu.js @@ -0,0 +1 @@ +!function(){"use strict";!function(t){var e=t.screen,n=e.width,r=e.height,a=t.navigator.language,i=t.location,o=t.localStorage,u=t.document,c=t.history,f=i.hostname,s=i.pathname,l=i.search,d=u.currentScript;if(d){var m="data-",h=d.getAttribute.bind(d),v=h(m+"website-id"),p=h(m+"host-url"),g="false"!==h(m+"auto-track"),y=h(m+"do-not-track"),b=h(m+"domains")||"",S=b.split(",").map((function(t){return t.trim()})),k=(p?p.replace(/\/$/,""):d.src.split("/").slice(0,-1).join("/"))+"/api/send",w=n+"x"+r,N=/data-umami-event-([\w-_]+)/,T=m+"umami-event",j=300,A=function(t,e,n){var r=t[e];return function(){for(var e=[],a=arguments.length;a--;)e[a]=arguments[a];return n.apply(null,e),r.apply(t,e)}},x=function(){return{website:v,hostname:f,screen:w,language:a,title:M,url:I,referrer:J}},E=function(){return o&&o.getItem("umami.disabled")||y&&function(){var e=t.doNotTrack,n=t.navigator,r=t.external,a="msTrackingProtectionEnabled",i=e||n.doNotTrack||n.msDoNotTrack||r&&a in r&&r[a]();return"1"==i||"yes"===i}()||b&&!S.includes(f)},O=function(t,e,n){n&&(J=I,(I=function(t){try{return new URL(t).pathname}catch(e){return t}}(n.toString()))!==J&&setTimeout(D,j))},L=function(t,e){if(void 0===e&&(e="event"),!E()){var n={"Content-Type":"application/json"};return void 0!==K&&(n["x-umami-cache"]=K),fetch(k,{method:"POST",body:JSON.stringify({type:e,payload:t}),headers:n}).then((function(t){return t.text()})).then((function(t){return K=t})).catch((function(){}))}},D=function(t,e){return L("string"==typeof t?Object.assign({},x(),{name:t,data:"object"==typeof e?e:void 0}):"object"==typeof t?t:"function"==typeof t?t(x()):x())};t.umami||(t.umami={track:D,identify:function(t){return L(Object.assign({},x(),{data:t}),"identify")}});var K,P,_,q,C,I=""+s+l,J=u.referrer,M=u.title;if(g&&!E()){c.pushState=A(c,"pushState",O),c.replaceState=A(c,"replaceState",O),C=function(t){var e=t.getAttribute.bind(t),n=e(T);if(n){var r={};return t.getAttributeNames().forEach((function(t){var n=t.match(N);n&&(r[n[1]]=e(t))})),D(n,r)}return Promise.resolve()},u.addEventListener("click",(function(t){var e=t.target,n="A"===e.tagName?e:function(t,e){for(var n=t,r=0;r title"))&&_.observe(q,{subtree:!0,characterData:!0,childList:!0});var R=function(){"complete"!==u.readyState||P||(D(),P=!0)};u.addEventListener("readystatechange",R,!0),R()}}}(window)}(); \ No newline at end of file diff --git a/js/main.js b/js/main.js new file mode 100644 index 0000000..e69de29 diff --git a/js/themetoggle.js b/js/themetoggle.js new file mode 100644 index 0000000..27353c4 --- /dev/null +++ b/js/themetoggle.js @@ -0,0 +1,43 @@ +function setTheme(mode) { + localStorage.setItem("theme-storage", mode); + let htmlElement = document.querySelector("html"); + + if (mode === "dark") { + document.getElementById("darkModeStyle").disabled = false; + htmlElement.classList.remove("light") + htmlElement.classList.add("dark") + + document.getElementById("sun-icon").style.display = "inline-block"; + document.getElementById("moon-icon").style.display = "none"; + } else if (mode === "light") { + document.getElementById("darkModeStyle").disabled = true; + htmlElement.classList.remove("dark") + htmlElement.classList.add("light") + + document.getElementById("sun-icon").style.display = "none"; + document.getElementById("moon-icon").style.display = "inline-block"; + } +} + +function toggleTheme() { + if (localStorage.getItem("theme-storage") === "light") { + setTheme("dark"); + } else if (localStorage.getItem("theme-storage") === "dark") { + setTheme("light"); + } +} + +function getSavedTheme() { + let currentTheme = localStorage.getItem("theme-storage"); + if(!currentTheme) { + if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) { + currentTheme = "dark"; + } else { + currentTheme = "light"; + } + } + + return currentTheme; +} + +setTheme(getSavedTheme()); \ No newline at end of file diff --git a/main.css b/main.css new file mode 100644 index 0000000..281317a --- /dev/null +++ b/main.css @@ -0,0 +1 @@ +.cards{display:grid;grid-template-rows:auto;gap:24px;padding:12px 0}@media all and (min-width: 640px){.cards{grid-template-columns:repeat(auto-fill, minmax(400px, 1fr))}}@media all and (max-width: 640px){.cards{grid-template-columns:repeat(auto-fill, 1fr)}}.card{min-height:100px;background:var(--bg-2);border:2px solid var(--border-color);border-radius:10px;overflow:hidden}.card-info{padding:0 24px 24px 24px}.card-title{margin-top:.7em}.card-image{border:unset;width:100%}.card-image-placeholder{height:12px;width:100%}.card-description{margin-top:.5em;overflow:hidden}@media all and (max-width: 720px){.cards{gap:18px}}code{background-color:var(--bg-1);padding:.1em .2em;border-radius:5px;border:1px solid var(--border-color)}pre{border-radius:5px;border:1px solid var(--border-color);line-height:1.4;overflow-x:auto;padding:1em}pre code{background-color:rgba(0,0,0,0);color:inherit;font-size:100%;padding:0;border:0}pre{font-family:var(--code-font);position:relative;-webkit-overflow-scrolling:touch}pre code[class*=language-]{-webkit-overflow-scrolling:touch}pre code[class*=language-]::before{background:#000;border-radius:0 0 .25rem .25rem;color:#fff;font-size:12px;letter-spacing:.025rem;padding:.1rem .5rem;position:absolute;right:.1rem;margin-top:.1rem;text-align:right;text-transform:uppercase;top:0}pre code[class=language-javaScript]::before,pre code[class=language-js]::before{content:"js";background:#f7df1e;color:#000}pre code[class*=language-yml]::before,pre code[class*=language-yaml]::before{content:"yaml";background:#f71e6a;color:#fff}pre code[class*=language-shell]::before,pre code[class*=language-bash]::before,pre code[class*=language-sh]::before{content:"shell";background:green;color:#fff}pre code[class*=language-json]::before{content:"json";background:#1e90ff;color:#000}pre code[class*=language-python]::before,pre code[class*=language-py]::before{content:"py";background:blue;color:#ff0}pre code[class*=language-css]::before{content:"css";background:cyan;color:#000}pre code[class*=language-go]::before{content:"Go";background:cyan;color:#4169e1}pre code[class*=language-md]::before,pre code[class*=language-md]::before{content:"Markdown";background:#4169e1;color:#f5f5f5}pre code[class*=language-rust]::before,pre code[class*=language-rs]::before{content:"rust";background:#fff8f6;color:#ff4647}.page-header{font-size:2.5em;line-height:100%;font-family:var(--header-font);margin:4rem 0px 1rem 0px}.centered-header{font-family:var(--header-font);position:absolute;top:40%;left:50%;transform:translate(-50%, -50%);text-align:center;font-size:4em}header{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;padding:1em 0}header .main{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:12px;font-size:1.5rem;margin-bottom:10px}.socials{flex-grow:0;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;align-items:flex-end;gap:6px}.social{border-bottom:unset;background-image:unset;padding:2px}.social>img{border:unset;width:24px;height:24px}.meta{color:#999;letter-spacing:-.5px}#dark-mode-toggle>img{display:none;width:15px;height:15px;border:unset}h1,h2,h3,h4,h5,h6{font-size:1.2rem;margin-top:2em}h1::before{color:var(--primary-color);content:"# "}h2::before{color:var(--primary-color);content:"## "}h3::before{color:var(--primary-color);content:"### "}h4::before{color:var(--primary-color);content:"#### "}h5::before{color:var(--primary-color);content:"##### "}h6::before{color:var(--primary-color);content:"###### "}img{border:3px solid #ececec;max-width:100%}figure{box-sizing:border-box;display:inline-block;margin:0;max-width:100%}figure img{max-height:500px}@media screen and (min-width: 600px){figure{padding:0 40px}}figure h4{font-size:1rem;margin:0;margin-bottom:1em}figure h4::before{content:"↳ "}svg{max-height:15px}.primary-color{color:var(--primary-color)}.draft-label{color:var(--hover-color);text-decoration:none;padding:2px 4px;border-radius:4px;margin-left:6px;background-color:var(--primary-color)}::-moz-selection{background:var(--primary-color);color:var(--hover-color);text-shadow:none}::selection{background:var(--primary-color);color:var(--hover-color)}p{line-height:1.5}hr{border:0;border-top:3px solid var(--border-color);margin:1em 0}blockquote{border-left:3px solid var(--border-color);color:#737373;margin:0;padding-left:1em}a{border-bottom:3px solid var(--primary-color);color:inherit;text-decoration:none;position:relative;z-index:1}a:hover{background-color:var(--primary-color);color:var(--hover-color)}time{color:grey}.list>ul{margin:0;padding:1rem 0 0 0}.list-item{margin-bottom:30px}@media all and (max-width: 640px){.post-header{display:grid;grid-template-rows:auto 1fr}.post-header h1{margin-top:0}.post-header h1 a{border-bottom:none}}@media all and (min-width: 640px){.post-header{display:grid;gap:1rem;grid-row-gap:1.5rem;grid-template-columns:auto 1fr}.post-header h1{margin:0;font-size:130%}.post-header h1 a{border-bottom:none}}#dark-mode-toggle{border-bottom:none}#dark-mode-toggle:hover{background-color:rgba(0,0,0,0)}table{border-spacing:0;border-collapse:collapse}table th{padding:6px 13px;border:1px solid #dfe2e5;font-size:large}table td{padding:6px 13px;border:1px solid #dfe2e5}.tags li::before{content:"🏷 "}.tags a{border-bottom:3px solid var(--primary-color)}.tags a:hover{color:var(--hover_color);background-color:var(--primary-color)}:root{--border-color: var(--bg-1);--text-font: "Jetbrains Mono";--header-font: "Space Grotesk", "Helvetica", sans-serif;--code-font: "Jetbrains Mono"}html{background-color:var(--bg-0);color:var(--text-0);font-family:var(--text-font);line-height:1.6em}.content{max-width:1000px;margin:0 auto;padding:0 24px;word-wrap:break-word}@media all and (min-width: 640px){html{font-size:16.5px}}@media all and (min-width: 720px){html{font-size:17px}}@media all and (min-width: 960px){html{font-size:18px}} \ No newline at end of file diff --git a/posts/disable-special-characters/index.html b/posts/disable-special-characters/index.html new file mode 100644 index 0000000..f023b10 --- /dev/null +++ b/posts/disable-special-characters/index.html @@ -0,0 +1,4 @@ + + 禁用自动弹出特殊字符 + +
Posted on

Table of Contents

背景

在MacOS中,默认只要按住了Option,再按其他字母按键就会自动弹出一个特殊字符。这对我们大多数时候没多大用,反而会影响一些快捷键的使用体验。下面就来讲,如何禁用这一功能。

步骤

主要分为两步,一是禁用英文输入法下的特殊字符,二是禁用中文输入法下的特殊字符。

英文输入法

打开系统设置,进入键盘,编辑输入法。去掉自带的ABC英文输入法,在添加输入法中找到Unicode Hex Input,并添加。

中文输入法

这里主要讲搜狗拼音输入法的禁用方法,打开偏好设置,选择按键->键盘布局,找到并修改为Unicode十六进制输入。

总结

通过切换键盘布局,我们就可以不让特殊字符在使用快捷键的时候自动弹出了。

\ No newline at end of file diff --git a/posts/fix-damaged-app/index.html b/posts/fix-damaged-app/index.html new file mode 100644 index 0000000..8089da2 --- /dev/null +++ b/posts/fix-damaged-app/index.html @@ -0,0 +1,6 @@ + + 修复损坏的应用 + +
Posted on

Table of Contents

背景

MacOS会对应用进行认证检查,如果有问题的应用,默认是打不开的,如下图。

怎么办?我们给他放行就是。

步骤

主要分为两步,一是禁用GateKeeper,二是修复应用权限。

禁用GateKeeper

sudo spctl --master-disable
+

修复应用权限

把如下PicGo.app换成你的应用名称。

xattr -cr /Applications/PicGo.app
+

总结

通过修复应用权限,我们就可以正确打开应用了。

\ No newline at end of file diff --git a/posts/index.html b/posts/index.html new file mode 100644 index 0000000..5627ac1 --- /dev/null +++ b/posts/index.html @@ -0,0 +1,4 @@ + + I like Mac + + \ No newline at end of file diff --git a/posts/make-macbook-external-display-working/index.html b/posts/make-macbook-external-display-working/index.html new file mode 100644 index 0000000..37cad08 --- /dev/null +++ b/posts/make-macbook-external-display-working/index.html @@ -0,0 +1,4 @@ + + MacBook Air的显示器之谜 + +
Posted on

今天遇到了一个让人困惑的情况:我的MacBook Air突然不能继续为外接显示器供图了,但内置屏幕还在工作。这种情况之前也发生过,有时候能外接显示,有时候就完全不行,偏偏期间我根本没有改动过任何设置。

我开始觉得莫名其妙,甚至有点恼火。作为一个经常需要外接显示器工作的人,这种随机发生的问题真的很影响效率。我翻看了系统设置,检查了显示器连接,一切看起来都很正常,但就是不工作。

正当我心如死灰,准备重启电脑时,我随手插上了电源充电线。然后神奇的事情发生了 —— 外接显示器突然就能用了!这个意外发现让我很是惊喜,同时也引发了我的好奇心。

后来经过查询,我发现这其实是MacBook的一个电源管理特性。在使用电池供电时,系统会采取更积极的节能策略。特别是当电池电量较低或系统负载较高时,macOS可能会选择关闭某些功能来节省电力,包括降低对外接显示器的支持。

而一旦接入电源,由于不再需要考虑电池续航问题,系统就会切换到更高性能的工作模式,这时就能够同时支持内置显示屏和外接显示器的工作了。

这个设计其实挺有意思的,它体现了苹果在便携性和性能之间做出的平衡。虽然有时候可能会带来一些困扰,但确实是为了延长电池使用时间的考虑。

如果你也遇到类似情况,有几个建议:

  1. 使用外接显示器时,尽量接入电源
  2. 在电池供电时,可以在系统偏好设置中调整能源设置,选择更偏向性能的模式
  3. 注意观察电池电量,在电量较低时及时充电

另外,如果遇到显示问题,还可以尝试重置SMC(系统管理控制器)。方法很简单:

  1. 关机
  2. 按住Control + Option + Shift 10秒
  3. 继续按住这些键的同时,再按住电源键10秒
  4. 松开所有按键
  5. 按电源键启动电脑

希望这个发现能帮助到同样遇到这个问题的Mac用户。有时候看似是故障的现象,背后可能有它的设计考虑,了解这些可以帮助我们更好地使用设备。

\ No newline at end of file diff --git a/posts/open-3rd-party-app/index.html b/posts/open-3rd-party-app/index.html new file mode 100644 index 0000000..c973e38 --- /dev/null +++ b/posts/open-3rd-party-app/index.html @@ -0,0 +1,4 @@ + + 打开第三方下载的应用 + +
Posted on

Table of Contents

背景

在MacOS中,默认只允许用户打开从App Store下载的,或其他可信发行者提供的应用。

但是在实际使用中,我们常常会遇到一些第三方来源的软件,那要如何打开他们呢?

步骤

主要分为三步,一是确认系统设置,二是允许打开,三是打开使用。

确认系统设置

打开系统设置,进入安全,确认勾选的是“App Store和认证的发行者”。

允许打开

定位到目标文件夹,双击我们要打开的文件。这时候会弹出一个安全警告,点击取消。

在这一步操作之后,再次进入系统设置,进入安全,点击“仍然打开”。

打开使用

再次回到目标应用,双击打开。这次弹出的是不一样的安全警告,我们选择打开,即可使用。

\ No newline at end of file diff --git a/posts/page/1/index.html b/posts/page/1/index.html new file mode 100644 index 0000000..962ee03 --- /dev/null +++ b/posts/page/1/index.html @@ -0,0 +1 @@ +Redirect

Click here to be redirected. \ No newline at end of file diff --git a/posts/play-3d-video/index.html b/posts/play-3d-video/index.html new file mode 100644 index 0000000..a2b3a82 --- /dev/null +++ b/posts/play-3d-video/index.html @@ -0,0 +1,9 @@ + + 在 Mac 上用 ffplay 播放 3D 视频 + +

Posted on

前段时间我入手了一副支持 3D 视频观看的智能眼镜。它支持 SBS(左右分屏)格式的视频播放,但市面上的 3D 视频资源大多是 HSBS(半宽左右分屏)格式。我原本用 Bino 这款老牌 3D 播放器,但它是为 Intel 芯片开发的,在我的 M1 Mac 上经常出现卡顿。

后来发现 ffplay(ffmpeg 项目的一部分)完全能满足需求。它原生支持 Apple Silicon,播放性能很好,而且操作也很简单。

安装很直接。首先需要安装 Homebrew,如果还没装过的话去 brew.sh 按提示安装就好。然后一行命令就能装好 ffmpeg:

brew install ffmpeg
+

播放 3D 视频也很简单,比如要把 HSBS 格式的视频转成 SBS 格式播放:

ffplay -i video.mp4 -vf "scale=2*iw:ih"
+

如果觉得每次输入命令麻烦,可以在 fish shell 配置文件(~/.config/fish/config.fish)里加一个函数:

function play3d
+    ffplay -i $argv -vf "scale=2*iw:ih"
+end
+

这样以后直接用 play3d video.mp4 就可以了。

ffplay 的一些常用快捷键:

  • w:显示/隐藏进度条
  • 空格:暂停/继续
  • 左右方向键:快退/快进 10 秒
  • 上下方向键:快退/快进 1 分钟
  • q 或 ESC:退出

特别好用的是,如果视频里有内嵌字幕,ffplay 会自动显示,而且会在左右两边都显示,完全不用额外设置。

相比其他一些 3D 播放器,ffplay 虽然界面简单了些,但该有的功能都有,而且性能很好,用起来很顺手。对于想在 Mac 上看 3D 视频的朋友来说,这是个不错的选择。

\ No newline at end of file diff --git a/posts/remove-abc-input/index.html b/posts/remove-abc-input/index.html new file mode 100644 index 0000000..b7026ae --- /dev/null +++ b/posts/remove-abc-input/index.html @@ -0,0 +1,5 @@ + + 移除默认输入法 + +
Posted on

Table of Contents

背景

在MacOS中,会有一个输入法默认无法删除,例如ABC,这里删除按钮是灰色的。

要删除这个默认输入法,就需要编辑二进制的Plist文件,可以在这里下载免费的Plist Editor软件。

步骤

主要分为两步,一是删除默认输入法,二是重启系统。

删除默认输入法

打开Terminal,输入以下命令,打开文件编辑。

sudo open ~/Library/Preferences/com.apple.HIToolbox.plist -a PlistEdit\ Pro
+

找到AppleEnabledInputSources节点,展开,在子项中找到KeyboardLayout Name值为你要删除的输入法名称的项,例如我这里是ABC,然后点击菜单上的Delete删掉,再按Cmd+S保存即可。

重启系统

重启后,可以看到默认无法删除的ABC输入法已经被我们移出了。

总结

通过编辑系统配置文件,我们就可以移出不让删除的默认输入法了。

\ No newline at end of file diff --git a/posts/sync-between-two-macs/index.html b/posts/sync-between-two-macs/index.html new file mode 100644 index 0000000..d3b09dd --- /dev/null +++ b/posts/sync-between-two-macs/index.html @@ -0,0 +1,4 @@ + + 在两台Mac之间传输文件 + +
Posted on

Table of Contents

背景

以往我们要在两台设备中传输文件,要么用QQ,要么用微信。现在,在Mac中,我们可以使用系统自带的文件传输功能。

步骤

主要分为三步,一是开启文件传输方的文件传输功能,二是接收方连接到对方的文件传输系统,三是复制文件,开始传输。

传输方开启共享

打开系统设置,进入文件共享,打开文件共享,输入系统密码,然后确认开启。

接收方连接上传输方

在传输方刚才开启共享的界面,点击右边小i字母带圆圈的图标,找到机器名称,复制。

在接收方,进入Finder,同时按下Cmd+K的快捷键,粘贴传输方电脑的名称,回车确认

复制文件

输入传输方Mac的账号密码,或者匿名连接成功后,在打开的窗口中,就像在本地电脑之间复制文件夹一样,就可以复制文件了。

总结

通过Mac自带的文件传输功能,可以帮助我们在局域网中,快速地传输数据。

\ No newline at end of file diff --git a/robots.txt b/robots.txt new file mode 100644 index 0000000..9b766d6 --- /dev/null +++ b/robots.txt @@ -0,0 +1,4 @@ +User-agent: * +Disallow: +Allow: / +Sitemap: https://ilikemac.com/sitemap.xml diff --git a/search_index.en.js b/search_index.en.js new file mode 100644 index 0000000..5ef72ea --- /dev/null +++ b/search_index.en.js @@ -0,0 +1 @@ +window.searchIndex = {"fields":["title","body"],"pipeline":["trimmer","stopWordFilter","stemmer"],"ref":"id","version":"0.9.5","index":{"body":{"root":{"docs":{},"df":0,"1":{"docs":{"https://ilikemac.com/posts/play-3d-video/":{"tf":1.0}},"df":1,"0":{"docs":{"https://ilikemac.com/posts/make-macbook-external-display-working/":{"tf":1.4142135623730951},"https://ilikemac.com/posts/play-3d-video/":{"tf":1.0}},"df":2}},"3":{"docs":{},"df":0,"d":{"docs":{"https://ilikemac.com/posts/play-3d-video/":{"tf":2.6457513110645907}},"df":1}},"a":{"docs":{},"df":0,"b":{"docs":{},"df":0,"c":{"docs":{"https://ilikemac.com/posts/remove-abc-input/":{"tf":1.0}},"df":1,"英":{"docs":{},"df":0,"文":{"docs":{},"df":0,"输":{"docs":{},"df":0,"入":{"docs":{},"df":0,"法":{"docs":{},"df":0,",":{"docs":{},"df":0,"在":{"docs":{},"df":0,"添":{"docs":{},"df":0,"加":{"docs":{},"df":0,"输":{"docs":{},"df":0,"入":{"docs":{},"df":0,"法":{"docs":{},"df":0,"中":{"docs":{},"df":0,"找":{"docs":{},"df":0,"到":{"docs":{},"df":0,"u":{"docs":{},"df":0,"n":{"docs":{},"df":0,"i":{"docs":{},"df":0,"c":{"docs":{},"df":0,"o":{"docs":{},"df":0,"d":{"docs":{"https://ilikemac.com/posts/disable-special-characters/":{"tf":1.0}},"df":1}}}}}}}}}}}}}}}}}}}}}}},"i":{"docs":{},"df":0,"r":{"docs":{"https://ilikemac.com/posts/make-macbook-external-display-working/":{"tf":1.4142135623730951}},"df":1}},"p":{"docs":{},"df":0,"p":{"docs":{"https://ilikemac.com/posts/open-3rd-party-app/":{"tf":1.0}},"df":1,"l":{"docs":{"https://ilikemac.com/posts/play-3d-video/":{"tf":1.0}},"df":1,"e":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{},"df":0,"a":{"docs":{},"df":0,"b":{"docs":{},"df":0,"l":{"docs":{},"df":0,"e":{"docs":{},"df":0,"d":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"p":{"docs":{},"df":0,"u":{"docs":{},"df":0,"t":{"docs":{},"df":0,"s":{"docs":{},"df":0,"o":{"docs":{},"df":0,"u":{"docs":{},"df":0,"r":{"docs":{},"df":0,"c":{"docs":{},"df":0,"e":{"docs":{},"df":0,"s":{"docs":{},"df":0,"节":{"docs":{},"df":0,"点":{"docs":{},"df":0,",":{"docs":{},"df":0,"展":{"docs":{},"df":0,"开":{"docs":{},"df":0,",":{"docs":{},"df":0,"在":{"docs":{},"df":0,"子":{"docs":{},"df":0,"项":{"docs":{},"df":0,"中":{"docs":{},"df":0,"找":{"docs":{},"df":0,"到":{"docs":{},"df":0,"k":{"docs":{},"df":0,"e":{"docs":{},"df":0,"y":{"docs":{},"df":0,"b":{"docs":{},"df":0,"o":{"docs":{},"df":0,"a":{"docs":{},"df":0,"r":{"docs":{},"df":0,"d":{"docs":{},"df":0,"l":{"docs":{},"df":0,"a":{"docs":{},"df":0,"y":{"docs":{},"df":0,"o":{"docs":{},"df":0,"u":{"docs":{},"df":0,"t":{"docs":{"https://ilikemac.com/posts/remove-abc-input/":{"tf":1.0}},"df":1}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"b":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"o":{"docs":{"https://ilikemac.com/posts/play-3d-video/":{"tf":1.0}},"df":1}}},"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"w":{"docs":{},"df":0,".":{"docs":{},"df":0,"s":{"docs":{},"df":0,"h":{"docs":{"https://ilikemac.com/posts/play-3d-video/":{"tf":1.0}},"df":1}}}}}}},"c":{"docs":{},"df":0,"o":{"docs":{},"df":0,"n":{"docs":{},"df":0,"f":{"docs":{},"df":0,"i":{"docs":{},"df":0,"g":{"docs":{},"df":0,"/":{"docs":{},"df":0,"f":{"docs":{},"df":0,"i":{"docs":{},"df":0,"s":{"docs":{},"df":0,"h":{"docs":{},"df":0,"/":{"docs":{},"df":0,"c":{"docs":{},"df":0,"o":{"docs":{},"df":0,"n":{"docs":{},"df":0,"f":{"docs":{},"df":0,"i":{"docs":{},"df":0,"g":{"docs":{},"df":0,".":{"docs":{},"df":0,"f":{"docs":{},"df":0,"i":{"docs":{},"df":0,"s":{"docs":{},"df":0,"h":{"docs":{"https://ilikemac.com/posts/play-3d-video/":{"tf":1.0}},"df":1}}}}}}}}}}}}}}}}}}}},"t":{"docs":{},"df":0,"r":{"docs":{},"df":0,"o":{"docs":{},"df":0,"l":{"docs":{"https://ilikemac.com/posts/make-macbook-external-display-working/":{"tf":1.0}},"df":1}}}}}}},"e":{"docs":{},"df":0,"d":{"docs":{},"df":0,"i":{"docs":{},"df":0,"t":{"docs":{},"df":0,"o":{"docs":{},"df":0,"r":{"docs":{"https://ilikemac.com/posts/remove-abc-input/":{"tf":1.0}},"df":1}}}}},"s":{"docs":{},"df":0,"c":{"docs":{"https://ilikemac.com/posts/play-3d-video/":{"tf":1.0}},"df":1}}},"f":{"docs":{},"df":0,"f":{"docs":{},"df":0,"m":{"docs":{},"df":0,"p":{"docs":{},"df":0,"e":{"docs":{},"df":0,"g":{"docs":{"https://ilikemac.com/posts/play-3d-video/":{"tf":1.0}},"df":1}}}},"p":{"docs":{},"df":0,"l":{"docs":{},"df":0,"a":{"docs":{},"df":0,"y":{"docs":{"https://ilikemac.com/posts/play-3d-video/":{"tf":2.0}},"df":1,"(":{"docs":{},"df":0,"f":{"docs":{},"df":0,"f":{"docs":{},"df":0,"m":{"docs":{},"df":0,"p":{"docs":{},"df":0,"e":{"docs":{},"df":0,"g":{"docs":{"https://ilikemac.com/posts/play-3d-video/":{"tf":1.0}},"df":1}}}}}}}}}}}},"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"d":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,",":{"docs":{},"df":0,"同":{"docs":{},"df":0,"时":{"docs":{},"df":0,"按":{"docs":{},"df":0,"下":{"docs":{},"df":0,"c":{"docs":{},"df":0,"m":{"docs":{},"df":0,"d":{"docs":{},"df":0,"+":{"docs":{},"df":0,"k":{"docs":{"https://ilikemac.com/posts/sync-between-two-macs/":{"tf":1.0}},"df":1}}}}}}}}}}}}}},"s":{"docs":{},"df":0,"h":{"docs":{"https://ilikemac.com/posts/play-3d-video/":{"tf":1.0}},"df":1}}}},"g":{"docs":{},"df":0,"a":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"k":{"docs":{},"df":0,"e":{"docs":{},"df":0,"e":{"docs":{},"df":0,"p":{"docs":{"https://ilikemac.com/posts/fix-damaged-app/":{"tf":1.4142135623730951}},"df":1}}}}}}},"t":{"docs":{},"df":0,";":{"docs":{},"df":0,"键":{"docs":{},"df":0,"盘":{"docs":{},"df":0,"布":{"docs":{},"df":0,"局":{"docs":{},"df":0,",":{"docs":{},"df":0,"找":{"docs":{},"df":0,"到":{"docs":{},"df":0,"并":{"docs":{},"df":0,"修":{"docs":{},"df":0,"改":{"docs":{},"df":0,"为":{"docs":{},"df":0,"u":{"docs":{},"df":0,"n":{"docs":{},"df":0,"i":{"docs":{},"df":0,"c":{"docs":{},"df":0,"o":{"docs":{},"df":0,"d":{"docs":{"https://ilikemac.com/posts/disable-special-characters/":{"tf":1.0}},"df":1}}}}}}}}}}}}}}}}}}}},"h":{"docs":{},"df":0,"e":{"docs":{},"df":0,"x":{"docs":{"https://ilikemac.com/posts/disable-special-characters/":{"tf":1.0}},"df":1}},"o":{"docs":{},"df":0,"m":{"docs":{},"df":0,"e":{"docs":{},"df":0,"b":{"docs":{},"df":0,"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"w":{"docs":{"https://ilikemac.com/posts/play-3d-video/":{"tf":1.0}},"df":1}}}}}}},"s":{"docs":{},"df":0,"b":{"docs":{"https://ilikemac.com/posts/play-3d-video/":{"tf":1.4142135623730951}},"df":1}}},"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"p":{"docs":{},"df":0,"u":{"docs":{},"df":0,"t":{"docs":{"https://ilikemac.com/posts/disable-special-characters/":{"tf":1.0}},"df":1}}},"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"l":{"docs":{"https://ilikemac.com/posts/play-3d-video/":{"tf":1.0}},"df":1}}}}},"m":{"docs":{},"df":0,"1":{"docs":{"https://ilikemac.com/posts/play-3d-video/":{"tf":1.0}},"df":1},"a":{"docs":{},"df":0,"c":{"docs":{"https://ilikemac.com/posts/make-macbook-external-display-working/":{"tf":1.0},"https://ilikemac.com/posts/play-3d-video/":{"tf":1.7320508075688772},"https://ilikemac.com/posts/sync-between-two-macs/":{"tf":1.7320508075688772}},"df":3,"b":{"docs":{},"df":0,"o":{"docs":{},"df":0,"o":{"docs":{},"df":0,"k":{"docs":{"https://ilikemac.com/posts/make-macbook-external-display-working/":{"tf":1.4142135623730951}},"df":1,"的":{"docs":{},"df":0,"一":{"docs":{},"df":0,"个":{"docs":{},"df":0,"电":{"docs":{},"df":0,"源":{"docs":{},"df":0,"管":{"docs":{},"df":0,"理":{"docs":{},"df":0,"特":{"docs":{},"df":0,"性":{"docs":{},"df":0,"。":{"docs":{},"df":0,"在":{"docs":{},"df":0,"使":{"docs":{},"df":0,"用":{"docs":{},"df":0,"电":{"docs":{},"df":0,"池":{"docs":{},"df":0,"供":{"docs":{},"df":0,"电":{"docs":{},"df":0,"时":{"docs":{},"df":0,",":{"docs":{},"df":0,"系":{"docs":{},"df":0,"统":{"docs":{},"df":0,"会":{"docs":{},"df":0,"采":{"docs":{},"df":0,"取":{"docs":{},"df":0,"更":{"docs":{},"df":0,"积":{"docs":{},"df":0,"极":{"docs":{},"df":0,"的":{"docs":{},"df":0,"节":{"docs":{},"df":0,"能":{"docs":{},"df":0,"策":{"docs":{},"df":0,"略":{"docs":{},"df":0,"。":{"docs":{},"df":0,"特":{"docs":{},"df":0,"别":{"docs":{},"df":0,"是":{"docs":{},"df":0,"当":{"docs":{},"df":0,"电":{"docs":{},"df":0,"池":{"docs":{},"df":0,"电":{"docs":{},"df":0,"量":{"docs":{},"df":0,"较":{"docs":{},"df":0,"低":{"docs":{},"df":0,"或":{"docs":{},"df":0,"系":{"docs":{},"df":0,"统":{"docs":{},"df":0,"负":{"docs":{},"df":0,"载":{"docs":{},"df":0,"较":{"docs":{},"df":0,"高":{"docs":{},"df":0,"时":{"docs":{},"df":0,",":{"docs":{},"df":0,"m":{"docs":{},"df":0,"a":{"docs":{},"df":0,"c":{"docs":{},"df":0,"o":{"docs":{"https://ilikemac.com/posts/make-macbook-external-display-working/":{"tf":1.0}},"df":1}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"o":{"docs":{"https://ilikemac.com/posts/fix-damaged-app/":{"tf":1.0}},"df":1,"s":{"docs":{},"df":0,"中":{"docs":{},"df":0,",":{"docs":{},"df":0,"会":{"docs":{},"df":0,"有":{"docs":{},"df":0,"一":{"docs":{},"df":0,"个":{"docs":{},"df":0,"输":{"docs":{},"df":0,"入":{"docs":{},"df":0,"法":{"docs":{},"df":0,"默":{"docs":{},"df":0,"认":{"docs":{},"df":0,"无":{"docs":{},"df":0,"法":{"docs":{},"df":0,"删":{"docs":{},"df":0,"除":{"docs":{},"df":0,",":{"docs":{},"df":0,"例":{"docs":{},"df":0,"如":{"docs":{},"df":0,"a":{"docs":{},"df":0,"b":{"docs":{},"df":0,"c":{"docs":{"https://ilikemac.com/posts/remove-abc-input/":{"tf":1.0}},"df":1}}}}}}}}}}}}}}}}}}},"默":{"docs":{},"df":0,"认":{"docs":{},"df":0,"只":{"docs":{},"df":0,"允":{"docs":{},"df":0,"许":{"docs":{},"df":0,"用":{"docs":{},"df":0,"户":{"docs":{},"df":0,"打":{"docs":{},"df":0,"开":{"docs":{},"df":0,"从":{"docs":{},"df":0,"a":{"docs":{},"df":0,"p":{"docs":{},"df":0,"p":{"docs":{"https://ilikemac.com/posts/open-3rd-party-app/":{"tf":1.0}},"df":1}}}}}}}}}},"要":{"docs":{},"df":0,"按":{"docs":{},"df":0,"住":{"docs":{},"df":0,"了":{"docs":{},"df":0,"o":{"docs":{},"df":0,"p":{"docs":{},"df":0,"t":{"docs":{"https://ilikemac.com/posts/disable-special-characters/":{"tf":1.0}},"df":1}}}}}}}}}}}}}}}}},"n":{"docs":{},"df":0,"a":{"docs":{},"df":0,"m":{"docs":{},"df":0,"e":{"docs":{},"df":0,"值":{"docs":{},"df":0,"为":{"docs":{},"df":0,"你":{"docs":{},"df":0,"要":{"docs":{},"df":0,"删":{"docs":{},"df":0,"除":{"docs":{},"df":0,"的":{"docs":{},"df":0,"输":{"docs":{},"df":0,"入":{"docs":{},"df":0,"法":{"docs":{},"df":0,"名":{"docs":{},"df":0,"称":{"docs":{},"df":0,"的":{"docs":{},"df":0,"项":{"docs":{},"df":0,",":{"docs":{},"df":0,"例":{"docs":{},"df":0,"如":{"docs":{},"df":0,"我":{"docs":{},"df":0,"这":{"docs":{},"df":0,"里":{"docs":{},"df":0,"是":{"docs":{},"df":0,"a":{"docs":{},"df":0,"b":{"docs":{},"df":0,"c":{"docs":{},"df":0,",":{"docs":{},"df":0,"然":{"docs":{},"df":0,"后":{"docs":{},"df":0,"点":{"docs":{},"df":0,"击":{"docs":{},"df":0,"菜":{"docs":{},"df":0,"单":{"docs":{},"df":0,"上":{"docs":{},"df":0,"的":{"docs":{},"df":0,"d":{"docs":{},"df":0,"e":{"docs":{},"df":0,"l":{"docs":{},"df":0,"e":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"删":{"docs":{},"df":0,"掉":{"docs":{},"df":0,",":{"docs":{},"df":0,"再":{"docs":{},"df":0,"按":{"docs":{},"df":0,"c":{"docs":{},"df":0,"m":{"docs":{},"df":0,"d":{"docs":{},"df":0,"+":{"docs":{"https://ilikemac.com/posts/remove-abc-input/":{"tf":1.0}},"df":1}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"o":{"docs":{},"df":0,"p":{"docs":{},"df":0,"t":{"docs":{},"df":0,"i":{"docs":{},"df":0,"o":{"docs":{},"df":0,"n":{"docs":{"https://ilikemac.com/posts/make-macbook-external-display-working/":{"tf":1.0}},"df":1}}}}}},"p":{"docs":{},"df":0,"i":{"docs":{},"df":0,"c":{"docs":{},"df":0,"g":{"docs":{},"df":0,"o":{"docs":{},"df":0,".":{"docs":{},"df":0,"a":{"docs":{},"df":0,"p":{"docs":{},"df":0,"p":{"docs":{"https://ilikemac.com/posts/fix-damaged-app/":{"tf":1.0}},"df":1}}}}}}}},"l":{"docs":{},"df":0,"a":{"docs":{},"df":0,"y":{"docs":{},"df":0,"3":{"docs":{},"df":0,"d":{"docs":{"https://ilikemac.com/posts/play-3d-video/":{"tf":1.0}},"df":1}}}},"i":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{},"df":0,"文":{"docs":{},"df":0,"件":{"docs":{},"df":0,",":{"docs":{},"df":0,"可":{"docs":{},"df":0,"以":{"docs":{},"df":0,"在":{"docs":{},"df":0,"这":{"docs":{},"df":0,"里":{"docs":{},"df":0,"下":{"docs":{},"df":0,"载":{"docs":{},"df":0,"免":{"docs":{},"df":0,"费":{"docs":{},"df":0,"的":{"docs":{},"df":0,"p":{"docs":{},"df":0,"l":{"docs":{},"df":0,"i":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"https://ilikemac.com/posts/remove-abc-input/":{"tf":1.0}},"df":1}}}}}}}}}}}}}}}}}}}}}},"o":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"https://ilikemac.com/posts/":{"tf":1.0}},"df":1}}}},"q":{"docs":{"https://ilikemac.com/posts/play-3d-video/":{"tf":1.0}},"df":1,"q":{"docs":{},"df":0,",":{"docs":{},"df":0,"要":{"docs":{},"df":0,"么":{"docs":{},"df":0,"用":{"docs":{},"df":0,"微":{"docs":{},"df":0,"信":{"docs":{},"df":0,"。":{"docs":{},"df":0,"现":{"docs":{},"df":0,"在":{"docs":{},"df":0,",":{"docs":{},"df":0,"在":{"docs":{},"df":0,"m":{"docs":{},"df":0,"a":{"docs":{},"df":0,"c":{"docs":{"https://ilikemac.com/posts/sync-between-two-macs/":{"tf":1.0}},"df":1}}}}}}}}}}}}}}}},"s":{"docs":{},"df":0,"b":{"docs":{"https://ilikemac.com/posts/play-3d-video/":{"tf":1.4142135623730951}},"df":1},"h":{"docs":{},"df":0,"e":{"docs":{},"df":0,"l":{"docs":{},"df":0,"l":{"docs":{"https://ilikemac.com/posts/play-3d-video/":{"tf":1.0}},"df":1}}},"i":{"docs":{},"df":0,"f":{"docs":{},"df":0,"t":{"docs":{"https://ilikemac.com/posts/make-macbook-external-display-working/":{"tf":1.0}},"df":1}}}},"i":{"docs":{},"df":0,"l":{"docs":{},"df":0,"i":{"docs":{},"df":0,"c":{"docs":{},"df":0,"o":{"docs":{},"df":0,"n":{"docs":{"https://ilikemac.com/posts/play-3d-video/":{"tf":1.0}},"df":1}}}}}},"m":{"docs":{},"df":0,"c":{"docs":{"https://ilikemac.com/posts/make-macbook-external-display-working/":{"tf":1.0}},"df":1}},"t":{"docs":{},"df":0,"o":{"docs":{},"df":0,"r":{"docs":{},"df":0,"e":{"docs":{"https://ilikemac.com/posts/open-3rd-party-app/":{"tf":1.4142135623730951}},"df":1}}}}},"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"m":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{"https://ilikemac.com/posts/remove-abc-input/":{"tf":1.0}},"df":1}}}}}},"v":{"docs":{},"df":0,"i":{"docs":{},"df":0,"d":{"docs":{},"df":0,"e":{"docs":{},"df":0,"o":{"docs":{},"df":0,".":{"docs":{},"df":0,"m":{"docs":{},"df":0,"p":{"docs":{},"df":0,"4":{"docs":{"https://ilikemac.com/posts/play-3d-video/":{"tf":1.0}},"df":1}}}}}}}}},"w":{"docs":{"https://ilikemac.com/posts/play-3d-video/":{"tf":1.0}},"df":1}}},"title":{"root":{"docs":{},"df":0,"3":{"docs":{},"df":0,"d":{"docs":{"https://ilikemac.com/posts/play-3d-video/":{"tf":1.0}},"df":1}},"a":{"docs":{},"df":0,"i":{"docs":{},"df":0,"r":{"docs":{"https://ilikemac.com/posts/make-macbook-external-display-working/":{"tf":1.0}},"df":1}}},"f":{"docs":{},"df":0,"f":{"docs":{},"df":0,"p":{"docs":{},"df":0,"l":{"docs":{},"df":0,"a":{"docs":{},"df":0,"y":{"docs":{"https://ilikemac.com/posts/play-3d-video/":{"tf":1.0}},"df":1}}}}}},"m":{"docs":{},"df":0,"a":{"docs":{},"df":0,"c":{"docs":{"https://ilikemac.com/posts/play-3d-video/":{"tf":1.0},"https://ilikemac.com/posts/sync-between-two-macs/":{"tf":1.0}},"df":2,"b":{"docs":{},"df":0,"o":{"docs":{},"df":0,"o":{"docs":{},"df":0,"k":{"docs":{"https://ilikemac.com/posts/make-macbook-external-display-working/":{"tf":1.0}},"df":1}}}}}}},"p":{"docs":{},"df":0,"o":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"https://ilikemac.com/posts/":{"tf":1.0}},"df":1}}}}}}},"documentStore":{"save":true,"docs":{"https://ilikemac.com/":{"body":"","id":"https://ilikemac.com/","title":""},"https://ilikemac.com/about/":{"body":"做了这个网站,目的是为了帮助更多人了解和使用苹果电脑。\n欢迎留言以及提问,也许你的疑问就会成为我的下一篇文章。\n","id":"https://ilikemac.com/about/","title":"About"},"https://ilikemac.com/posts/":{"body":"","id":"https://ilikemac.com/posts/","title":"Posts"},"https://ilikemac.com/posts/disable-special-characters/":{"body":"背景\n在MacOS中,默认只要按住了Option,再按其他字母按键就会自动弹出一个特殊字符。这对我们大多数时候没多大用,反而会影响一些快捷键的使用体验。下面就来讲,如何禁用这一功能。\n步骤\n主要分为两步,一是禁用英文输入法下的特殊字符,二是禁用中文输入法下的特殊字符。\n英文输入法\n打开系统设置,进入键盘,编辑输入法。去掉自带的ABC英文输入法,在添加输入法中找到Unicode Hex Input,并添加。\n\n中文输入法\n这里主要讲搜狗拼音输入法的禁用方法,打开偏好设置,选择按键->键盘布局,找到并修改为Unicode十六进制输入。\n\n总结\n通过切换键盘布局,我们就可以不让特殊字符在使用快捷键的时候自动弹出了。\n","id":"https://ilikemac.com/posts/disable-special-characters/","title":"禁用自动弹出特殊字符"},"https://ilikemac.com/posts/fix-damaged-app/":{"body":"背景\nMacOS会对应用进行认证检查,如果有问题的应用,默认是打不开的,如下图。\n\n怎么办?我们给他放行就是。\n步骤\n主要分为两步,一是禁用GateKeeper,二是修复应用权限。\n禁用GateKeeper\n\n修复应用权限\n把如下PicGo.app换成你的应用名称。\n\n总结\n通过修复应用权限,我们就可以正确打开应用了。\n","id":"https://ilikemac.com/posts/fix-damaged-app/","title":"修复损坏的应用"},"https://ilikemac.com/posts/make-macbook-external-display-working/":{"body":"今天遇到了一个让人困惑的情况:我的MacBook Air突然不能继续为外接显示器供图了,但内置屏幕还在工作。这种情况之前也发生过,有时候能外接显示,有时候就完全不行,偏偏期间我根本没有改动过任何设置。\n我开始觉得莫名其妙,甚至有点恼火。作为一个经常需要外接显示器工作的人,这种随机发生的问题真的很影响效率。我翻看了系统设置,检查了显示器连接,一切看起来都很正常,但就是不工作。\n正当我心如死灰,准备重启电脑时,我随手插上了电源充电线。然后神奇的事情发生了 —— 外接显示器突然就能用了!这个意外发现让我很是惊喜,同时也引发了我的好奇心。\n后来经过查询,我发现这其实是MacBook的一个电源管理特性。在使用电池供电时,系统会采取更积极的节能策略。特别是当电池电量较低或系统负载较高时,macOS可能会选择关闭某些功能来节省电力,包括降低对外接显示器的支持。\n而一旦接入电源,由于不再需要考虑电池续航问题,系统就会切换到更高性能的工作模式,这时就能够同时支持内置显示屏和外接显示器的工作了。\n这个设计其实挺有意思的,它体现了苹果在便携性和性能之间做出的平衡。虽然有时候可能会带来一些困扰,但确实是为了延长电池使用时间的考虑。\n如果你也遇到类似情况,有几个建议:\n\n使用外接显示器时,尽量接入电源\n在电池供电时,可以在系统偏好设置中调整能源设置,选择更偏向性能的模式\n注意观察电池电量,在电量较低时及时充电\n\n另外,如果遇到显示问题,还可以尝试重置SMC(系统管理控制器)。方法很简单:\n\n关机\n按住Control + Option + Shift 10秒\n继续按住这些键的同时,再按住电源键10秒\n松开所有按键\n按电源键启动电脑\n\n希望这个发现能帮助到同样遇到这个问题的Mac用户。有时候看似是故障的现象,背后可能有它的设计考虑,了解这些可以帮助我们更好地使用设备。\n","id":"https://ilikemac.com/posts/make-macbook-external-display-working/","title":"MacBook Air的显示器之谜"},"https://ilikemac.com/posts/open-3rd-party-app/":{"body":"背景\n在MacOS中,默认只允许用户打开从App Store下载的,或其他可信发行者提供的应用。\n但是在实际使用中,我们常常会遇到一些第三方来源的软件,那要如何打开他们呢?\n步骤\n主要分为三步,一是确认系统设置,二是允许打开,三是打开使用。\n确认系统设置\n打开系统设置,进入安全,确认勾选的是“App Store和认证的发行者”。\n\n允许打开\n定位到目标文件夹,双击我们要打开的文件。这时候会弹出一个安全警告,点击取消。\n\n在这一步操作之后,再次进入系统设置,进入安全,点击“仍然打开”。\n\n打开使用\n再次回到目标应用,双击打开。这次弹出的是不一样的安全警告,我们选择打开,即可使用。\n\n","id":"https://ilikemac.com/posts/open-3rd-party-app/","title":"打开第三方下载的应用"},"https://ilikemac.com/posts/play-3d-video/":{"body":"前段时间我入手了一副支持 3D 视频观看的智能眼镜。它支持 SBS(左右分屏)格式的视频播放,但市面上的 3D 视频资源大多是 HSBS(半宽左右分屏)格式。我原本用 Bino 这款老牌 3D 播放器,但它是为 Intel 芯片开发的,在我的 M1 Mac 上经常出现卡顿。\n后来发现 ffplay(ffmpeg 项目的一部分)完全能满足需求。它原生支持 Apple Silicon,播放性能很好,而且操作也很简单。\n安装很直接。首先需要安装 Homebrew,如果还没装过的话去 brew.sh 按提示安装就好。然后一行命令就能装好 ffmpeg:\n\n播放 3D 视频也很简单,比如要把 HSBS 格式的视频转成 SBS 格式播放:\n\n如果觉得每次输入命令麻烦,可以在 fish shell 配置文件(~/.config/fish/config.fish)里加一个函数:\n\n这样以后直接用 play3d video.mp4 就可以了。\nffplay 的一些常用快捷键:\n\nw:显示/隐藏进度条\n空格:暂停/继续\n左右方向键:快退/快进 10 秒\n上下方向键:快退/快进 1 分钟\nq 或 ESC:退出\n\n特别好用的是,如果视频里有内嵌字幕,ffplay 会自动显示,而且会在左右两边都显示,完全不用额外设置。\n相比其他一些 3D 播放器,ffplay 虽然界面简单了些,但该有的功能都有,而且性能很好,用起来很顺手。对于想在 Mac 上看 3D 视频的朋友来说,这是个不错的选择。\n","id":"https://ilikemac.com/posts/play-3d-video/","title":"在 Mac 上用 ffplay 播放 3D 视频"},"https://ilikemac.com/posts/remove-abc-input/":{"body":"背景\n在MacOS中,会有一个输入法默认无法删除,例如ABC,这里删除按钮是灰色的。\n\n要删除这个默认输入法,就需要编辑二进制的Plist文件,可以在这里下载免费的Plist Editor软件。\n步骤\n主要分为两步,一是删除默认输入法,二是重启系统。\n删除默认输入法\n打开Terminal,输入以下命令,打开文件编辑。\n\n找到AppleEnabledInputSources节点,展开,在子项中找到KeyboardLayout Name值为你要删除的输入法名称的项,例如我这里是ABC,然后点击菜单上的Delete删掉,再按Cmd+S保存即可。\n\n重启系统\n重启后,可以看到默认无法删除的ABC输入法已经被我们移出了。\n\n总结\n通过编辑系统配置文件,我们就可以移出不让删除的默认输入法了。\n","id":"https://ilikemac.com/posts/remove-abc-input/","title":"移除默认输入法"},"https://ilikemac.com/posts/sync-between-two-macs/":{"body":"背景\n以往我们要在两台设备中传输文件,要么用QQ,要么用微信。现在,在Mac中,我们可以使用系统自带的文件传输功能。\n步骤\n主要分为三步,一是开启文件传输方的文件传输功能,二是接收方连接到对方的文件传输系统,三是复制文件,开始传输。\n传输方开启共享\n打开系统设置,进入文件共享,打开文件共享,输入系统密码,然后确认开启。\n\n接收方连接上传输方\n在传输方刚才开启共享的界面,点击右边小i字母带圆圈的图标,找到机器名称,复制。\n\n在接收方,进入Finder,同时按下Cmd+K的快捷键,粘贴传输方电脑的名称,回车确认\n\n复制文件\n输入传输方Mac的账号密码,或者匿名连接成功后,在打开的窗口中,就像在本地电脑之间复制文件夹一样,就可以复制文件了。\n总结\n通过Mac自带的文件传输功能,可以帮助我们在局域网中,快速地传输数据。\n","id":"https://ilikemac.com/posts/sync-between-two-macs/","title":"在两台Mac之间传输文件"}},"docInfo":{"https://ilikemac.com/":{"body":0,"title":0},"https://ilikemac.com/about/":{"body":0,"title":0},"https://ilikemac.com/posts/":{"body":0,"title":1},"https://ilikemac.com/posts/disable-special-characters/":{"body":5,"title":0},"https://ilikemac.com/posts/fix-damaged-app/":{"body":4,"title":0},"https://ilikemac.com/posts/make-macbook-external-display-working/":{"body":10,"title":2},"https://ilikemac.com/posts/open-3rd-party-app/":{"body":4,"title":0},"https://ilikemac.com/posts/play-3d-video/":{"body":34,"title":3},"https://ilikemac.com/posts/remove-abc-input/":{"body":7,"title":0},"https://ilikemac.com/posts/sync-between-two-macs/":{"body":4,"title":1}},"length":10},"lang":"English"}; \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml new file mode 100644 index 0000000..fedc9b6 --- /dev/null +++ b/sitemap.xml @@ -0,0 +1,43 @@ + + + + https://ilikemac.com/ + + + https://ilikemac.com/about/ + + + https://ilikemac.com/posts/ + + + https://ilikemac.com/posts/disable-special-characters/ + 2024-02-17 + + + https://ilikemac.com/posts/fix-damaged-app/ + 2024-04-03 + + + https://ilikemac.com/posts/make-macbook-external-display-working/ + 2024-12-06 + + + https://ilikemac.com/posts/open-3rd-party-app/ + 2024-02-24 + + + https://ilikemac.com/posts/page/1/ + + + https://ilikemac.com/posts/play-3d-video/ + 2024-12-07 + + + https://ilikemac.com/posts/remove-abc-input/ + 2024-04-05 + + + https://ilikemac.com/posts/sync-between-two-macs/ + 2024-02-24 + + diff --git a/social_icons/LICENSE b/social_icons/LICENSE new file mode 100644 index 0000000..993facc --- /dev/null +++ b/social_icons/LICENSE @@ -0,0 +1 @@ +All icons in this directory are downloaded from [FontAwesome](https://fontawesome.com/). They are part of the [free offer](https://fontawesome.com/license/free) and are licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). \ No newline at end of file diff --git a/social_icons/apple.svg b/social_icons/apple.svg new file mode 100644 index 0000000..d0532d5 --- /dev/null +++ b/social_icons/apple.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/bitcoin.svg b/social_icons/bitcoin.svg new file mode 100644 index 0000000..941d9b0 --- /dev/null +++ b/social_icons/bitcoin.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/deviantart.svg b/social_icons/deviantart.svg new file mode 100644 index 0000000..7dbd0b6 --- /dev/null +++ b/social_icons/deviantart.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/diaspora.svg b/social_icons/diaspora.svg new file mode 100644 index 0000000..55527b5 --- /dev/null +++ b/social_icons/diaspora.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/discord.svg b/social_icons/discord.svg new file mode 100644 index 0000000..f0dfeab --- /dev/null +++ b/social_icons/discord.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/discourse.svg b/social_icons/discourse.svg new file mode 100644 index 0000000..343bea6 --- /dev/null +++ b/social_icons/discourse.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/email.svg b/social_icons/email.svg new file mode 100644 index 0000000..85245e2 --- /dev/null +++ b/social_icons/email.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/ethereum.svg b/social_icons/ethereum.svg new file mode 100644 index 0000000..af202de --- /dev/null +++ b/social_icons/ethereum.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/etsy.svg b/social_icons/etsy.svg new file mode 100644 index 0000000..ebc040a --- /dev/null +++ b/social_icons/etsy.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/facebook.svg b/social_icons/facebook.svg new file mode 100644 index 0000000..0afaf7a --- /dev/null +++ b/social_icons/facebook.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/github.svg b/social_icons/github.svg new file mode 100644 index 0000000..e32807a --- /dev/null +++ b/social_icons/github.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/gitlab.svg b/social_icons/gitlab.svg new file mode 100644 index 0000000..b577d3f --- /dev/null +++ b/social_icons/gitlab.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/google.svg b/social_icons/google.svg new file mode 100644 index 0000000..b3776b0 --- /dev/null +++ b/social_icons/google.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/hacker-news.svg b/social_icons/hacker-news.svg new file mode 100644 index 0000000..23e3980 --- /dev/null +++ b/social_icons/hacker-news.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/instagram.svg b/social_icons/instagram.svg new file mode 100644 index 0000000..89f63c4 --- /dev/null +++ b/social_icons/instagram.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/linkedin.svg b/social_icons/linkedin.svg new file mode 100644 index 0000000..d54fcf5 --- /dev/null +++ b/social_icons/linkedin.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/mastodon.svg b/social_icons/mastodon.svg new file mode 100644 index 0000000..5e12f81 --- /dev/null +++ b/social_icons/mastodon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/matrix.svg b/social_icons/matrix.svg new file mode 100644 index 0000000..bc41720 --- /dev/null +++ b/social_icons/matrix.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/social_icons/paypal.svg b/social_icons/paypal.svg new file mode 100644 index 0000000..efdc81a --- /dev/null +++ b/social_icons/paypal.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/pinterest.svg b/social_icons/pinterest.svg new file mode 100644 index 0000000..eb977c2 --- /dev/null +++ b/social_icons/pinterest.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/quora.svg b/social_icons/quora.svg new file mode 100644 index 0000000..375d302 --- /dev/null +++ b/social_icons/quora.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/reddit.svg b/social_icons/reddit.svg new file mode 100644 index 0000000..a8a3a96 --- /dev/null +++ b/social_icons/reddit.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/rss.svg b/social_icons/rss.svg new file mode 100644 index 0000000..b862886 --- /dev/null +++ b/social_icons/rss.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/skype.svg b/social_icons/skype.svg new file mode 100644 index 0000000..3369aba --- /dev/null +++ b/social_icons/skype.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/slack.svg b/social_icons/slack.svg new file mode 100644 index 0000000..0dbc26d --- /dev/null +++ b/social_icons/slack.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/snapchat.svg b/social_icons/snapchat.svg new file mode 100644 index 0000000..2cd79dd --- /dev/null +++ b/social_icons/snapchat.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/soundcloud.svg b/social_icons/soundcloud.svg new file mode 100644 index 0000000..4724d74 --- /dev/null +++ b/social_icons/soundcloud.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/spotify.svg b/social_icons/spotify.svg new file mode 100644 index 0000000..1d393ba --- /dev/null +++ b/social_icons/spotify.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/stack-exchange.svg b/social_icons/stack-exchange.svg new file mode 100644 index 0000000..0a3177f --- /dev/null +++ b/social_icons/stack-exchange.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/stack-overflow.svg b/social_icons/stack-overflow.svg new file mode 100644 index 0000000..2ca50c7 --- /dev/null +++ b/social_icons/stack-overflow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/steam.svg b/social_icons/steam.svg new file mode 100644 index 0000000..b61f374 --- /dev/null +++ b/social_icons/steam.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/telegram.svg b/social_icons/telegram.svg new file mode 100644 index 0000000..02f48c0 --- /dev/null +++ b/social_icons/telegram.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/twitter.svg b/social_icons/twitter.svg new file mode 100644 index 0000000..0778f72 --- /dev/null +++ b/social_icons/twitter.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/vimeo.svg b/social_icons/vimeo.svg new file mode 100644 index 0000000..d98368e --- /dev/null +++ b/social_icons/vimeo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/whatsapp.svg b/social_icons/whatsapp.svg new file mode 100644 index 0000000..d259142 --- /dev/null +++ b/social_icons/whatsapp.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/x-twitter.svg b/social_icons/x-twitter.svg new file mode 100644 index 0000000..f5feed7 --- /dev/null +++ b/social_icons/x-twitter.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/social_icons/youtube.svg b/social_icons/youtube.svg new file mode 100644 index 0000000..287dca2 --- /dev/null +++ b/social_icons/youtube.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/theme/dark.css b/theme/dark.css new file mode 100644 index 0000000..8dfe74b --- /dev/null +++ b/theme/dark.css @@ -0,0 +1 @@ +:root.dark{--text-0: rgba(255, 255, 255, 87%);--text-1: rgba(255, 255, 255, 60%);--bg-0: #121212;--bg-1: rgba(255, 255, 255, 5%);--bg-2: rgba(23, 23, 23, 100%);--primary-color: #ef5350;--hover-color: white}:root.dark .social>img{filter:invert(1)} \ No newline at end of file diff --git a/theme/light.css b/theme/light.css new file mode 100644 index 0000000..0a438ed --- /dev/null +++ b/theme/light.css @@ -0,0 +1 @@ +:root.light{--text-0: rgba(0, 0, 0, 87%);--text-1: rgba(0, 0, 0, 66%);--bg-0: #fff;--bg-1: #f2f2f2;--bg-2: #fefefe;--primary-color: #ef5350;--hover-color: white}:root.light .social :hover{filter:invert(1)} \ No newline at end of file