Suppose you're opening an issue and there's a lot noisey logs that may be useful.
Rather than wrecking readability, wrap it in a <details> tag!
<details>
<summary>Summary Goes Here</summary>| sudo find /private/var/folders/ \ | |
| -name com.apple.dock.iconcache -exec rm {} \; | |
| sudo find /private/var/folders/ \ | |
| -name com.apple.iconservices -exec rm -rf {} \; | |
| sudo rm -rf /Library/Caches/com.apple.iconservices.store |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)| #!/bin/bash | |
| # | |
| # Restart Bluetooth Module on Mac OS X | |
| # | |
| # Requires Blueutil to be installed: http://brewformulas.org/blueutil | |
| BT="/usr/local/bin/blueutil" | |
| log() { | |
| echo "$@" |
| // | |
| // SpinlockTestTests.swift | |
| // SpinlockTestTests | |
| // | |
| // Created by Peter Steinberger on 04/10/2016. | |
| // Copyright © 2016 PSPDFKit GmbH. All rights reserved. | |
| // | |
| import XCTest |
| var readline = require('readline'), | |
| fs = require('fs'); | |
| var LinkMap = function(filePath) { | |
| this.files = [] | |
| this.filePath = filePath | |
| } | |
| LinkMap.prototype = { | |
| start: function(cb) { |
| // | |
| // PSPDFFastEnumeration.h | |
| // PSPDFFoundation | |
| // | |
| // PSPDFKit is the leading cross-platform solution for integrating PDFs into your apps: https://pspdfkit.com. | |
| // Try it today using our free PDF Viewer app: https://pdfviewer.io/ | |
| // | |
| // This file is MIT licensed. | |
| @protocol PSPDFFastEnumeration <NSFastEnumeration> |
| #import <Foundation/Foundation.h> | |
| int main(int argc, const char * argv[]) | |
| { | |
| NSRunLoop * runLoop; | |
| CLIMain * main; // replace with desired class | |
| @autoreleasepool | |
| { | |
| // create run loop |
| extension String | |
| { | |
| /// Creates a string by decoding a sequence of UTF-8 code units. | |
| init?<S: Sequence>(utf8 input: S) where S.Iterator.Element == UTF8.CodeUnit { | |
| var chars: [Character] = [] | |
| var decoder = UTF8() | |
| var iter = input.makeIterator() | |
| loop: while true { | |
| switch decoder.decode(&iter) { | |
| case .scalarValue(let scalar): chars.append(Character(scalar)) |