Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
#!/bin/bash | |
#Path to swiftlint | |
SWIFT_LINT=/usr/local/bin/swiftlint | |
#if $SWIFT_LINT >/dev/null 2>&1; then | |
if [[ -e "${SWIFT_LINT}" ]]; then | |
count=0 | |
for file_path in $(git ls-files -m --exclude-from=.gitignore | grep ".swift$"); do | |
export SCRIPT_INPUT_FILE_$count=$file_path |
public protocol StoryboardInstantiable: class { | |
static func fromStoryboard(name: String, bundle: Bundle?) -> Self | |
} | |
extension StoryboardInstantiable where Self: UIViewController { | |
static func fromStoryboard(name: String = "Main", bundle: Bundle? = nil) -> Self { | |
let identifier = String(describing: self) | |
let storyboard = UIStoryboard(name: name, bundle: bundle) | |
guard let viewController = | |
storyboard.instantiateViewController(withIdentifier: identifier) as? Self else { |
javascript:(function(window, document, undefined) {try {var selectedText = document.getSelection().toString(); if (selectedText === ''){selectedText = window.location.href;} if(selectedText !== ''){var baseQRUrl = 'http://chart.apis.google.com/chart?cht=qr&chs=300x300&chl=' + encodeURIComponent(selectedText); window.open(baseQRUrl, '_blank', 'width=400,height=400');}} catch (e) {}})(window, document); |
# <type>: (If applied, this commit will...) <subject> (Max 50 char) | |
# |<---- Using a Maximum Of 50 Characters ---->| | |
# Explain why this change is being made | |
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->| | |
# Provide links or keys to any relevant tickets, articles or other resources | |
# Example: Github issue #23 |
A string identifying the build system action being performed.
The locations of any sparse SDKs that should be layered on top of the one specified by Base SDK (SDKROOT
). If more than one SDK is listed, the first one has highest precedence. Every SDK specified in this setting should be a "sparse" SDK, for example, not an SDK for an entire macOS release.
# |<---- Using a Maximum Of 50 Characters ---->| | |
Type: | |
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->| | |
Description: | |
# Ticket (Github issue #23, or Jira format) | |
Ticket: | |
# END ----------------------------------------------------------------- |
#!/usr/bin/env zsh | |
case "$OSTYPE" in | |
darwin*) IS_OSX=1 ;; | |
solaris*) IS_SOLARIS=1 ;; | |
linux*) IS_LINUX=1 ;; | |
bsd*) IS_BSD=1 ;; | |
*) ;; | |
esac |
#!/bin/bash | |
########################################################## | |
# Based in the sample script from the link: # | |
# "Can I convert an image from CMYK to RGB in Mac OS X?" # | |
# http://superuser.com/a/117489 # | |
########################################################## | |
if [ -z "$1" ]; then |
//: A UIKit based Playground for presenting user interface | |
import UIKit | |
import PlaygroundSupport | |
final class QRCodeViewController: UIViewController { | |
private var input: String = "" | |
func generateQRCode(from string: String) -> UIImage? { | |
let data = string.data(using: String.Encoding.ascii) |