- Open below directory in Finder with Cmnd + Shift + G
/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/
import UIKit | |
import PlaygroundSupport | |
struct StringConstants { | |
static let bullet1 = "This is a small string." | |
static let bullet2 = "This is more of medium string with a few more words etc." | |
static let bullet3 = "Well this is certainly a longer string, with many more words than either of the previuos two strings." | |
} | |
typealias ParagraphData = (bullet: String, paragraph: String) |
extension UIViewController { | |
func configureNavigationBar(largeTitleColor: UIColor, backgoundColor: UIColor, tintColor: UIColor, title: String, preferredLargeTitle: Bool) { | |
if #available(iOS 13.0, *) { | |
let navBarAppearance = UINavigationBarAppearance() | |
navBarAppearance.configureWithOpaqueBackground() | |
navBarAppearance.largeTitleTextAttributes = [.foregroundColor: largeTitleColor] | |
navBarAppearance.titleTextAttributes = [.foregroundColor: largeTitleColor] | |
navBarAppearance.backgroundColor = backgoundColor | |
navigationController?.navigationBar.standardAppearance = navBarAppearance |
if Rails.env.development? || Rails.env.test? | |
puts 'Deleting Line Items, Orders and Products' | |
LineItem.delete_all | |
Order.delete_all | |
Product.delete_all | |
else | |
puts 'NOT DELETING LINE-ITEMS, ORDERS, and PRODUCTS' | |
end |
if Rails.const_defined? 'Server' | |
options = { addr: ENV.fetch('PORT') { 3000 } } | |
puts 'Starting Ngrok' | |
Ngrok::Tunnel.start(options) | |
puts '[NGROK] tunneling at ' + Ngrok::Tunnel.ngrok_url_https | |
config.hosts << Ngrok::Tunnel.ngrok_url_https | |
ENV['api_return_url_base'] = Ngrok::Tunnel.ngrok_url_https | |
puts "[Ngrok] ENV VARIABLE api_return_url_base: #{ENV["api_return_url_base"]}" |
HANDY ONE-LINE SCRIPTS FOR AWK 30 April 2008 | |
USAGE: | |
Unix: awk '/pattern/ {print "$1"}' # standard Unix shells | |
DOS/Win: awk '/pattern/ {print "$1"}' # compiled with DJGPP, Cygwin | |
awk "/pattern/ {print \"$1\"}" # GnuWin32, UnxUtils, Mingw | |
# FILE SPACING: |
<script> | |
window.onload = function() { | |
var target = document.getElementById('revealthis'); | |
if( $('#yourtarget').is(':empty') ) { | |
target.style.display = 'block'; | |
} else { | |
target.style.display = 'none'; | |
} | |
#!/bin/sh | |
for file in *_h.png | |
do | |
mv "$file" "${file}/_h.png/_half.png" | |
done |