Summary text.
Hello World, how is it going?
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Twitter Archive Browser</title> | |
<script src="https://unpkg.com/react@16/umd/react.development.js"></script> | |
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script> | |
<script src="https://unpkg.com/[email protected]/babel.min.js"></script> | |
<style> |
// When you are in the diff page of a GitHub PR | |
// And want to hide all the Pods/* files in that diff page, use this: | |
// Paste that in your Web Inspector's console | |
var nodes = document.evaluate("//div[@class='file-header' and starts-with(@data-path,'Pods/')]", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null ); | |
for(i=0; i<nodes.snapshotLength; ++i) { | |
nodes.snapshotItem(i).parentNode.hidden = true | |
} | |
// Or even better, create a bookmark with this code for easy quick access: |
Hello World, how is it going?
print(String(data: try! JSONSerialization.data(withJSONObject: dict, options: .prettyPrinted), encoding: .utf8)!) |
final class SampleViewController: StoryboardBackedViewController { | |
// Unfortunately this must be an IUO var, so that we can set the value after super.init | |
private var member: Foo! | |
// Proper dependency injection in a storyboard backed VC! | |
init(foo: Foo) { | |
super.init(storyboardIdentifier: "SampleViewControllerIdentifier") | |
// We have to set the members *after* calling super.init, since it changes the instance of `self`. | |
self.member = foo |
// UIWindow+AppSwitchScrollStopper.h | |
// Created by Tim Johnsen on 3/27/16. | |
#import <UIKit/UIKit.h> | |
@interface UIWindow (AppSwitchScrollStopper) | |
/// Call this early on in your app's lifecycle to avoid | |
/// scroll-related flashing when your app resumes from the background | |
- (void)installAppSwitchScrollStopper; |
#!/usr/bin/env ruby | |
require 'pathname' | |
code_files = ARGV | |
code_files.each do |file| | |
file = Pathname(file) | |
contents = file.read | |
contents.gsub!(/(^#import .*\n)+/) do |imports| | |
imports = imports.split("\n") | |
imports.sort.uniq.join("\n") << "\n" |
Xcode: | |
Show Toolbar: Shift + Command + T | |
Hide Toolbar: Shift + Command + T | |
Sketch: | |
Show Toolbar: Shift + Command + T | |
Hide Toolbar: Shift + Command + T | |
Show Inspector: Alt(Option) + Command + 0 | |
Show Layers List: Command + 0 |
post_install do |installer_representation| | |
installer_representation.pods_project.targets.each do |target| | |
target.build_configurations.each do |config| | |
if config.to_s == 'Beta' | |
config.build_settings['CODE_SIGN_IDENTITY[sdk=iphoneos*]'] = 'iPhone Distribution' | |
elsif config.to_s == 'Release' | |
config.build_settings['CODE_SIGN_IDENTITY[sdk=iphoneos*]'] = 'iPhone Distribution' | |
end | |
end | |
end |