- Pastebot
- GIF Brewery
- Slack
- Keynote/Pages/Numbers
- 1Password
- OmniFocus 2
- Airmail 3
- iA Writer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name localhost; | |
root /var/www/html/src; | |
index index.php index.html index.htm; | |
access_log /var/log/default.access.log; | |
error_log /var/log/default.error.log; | |
location / { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Provisioning virtual machine..." | |
echo "####### Installing Git" | |
apt-get install git -y > /dev/null | |
echo "####### Installing Nginx" | |
apt-get install nginx -y > /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Path to your oh-my-zsh installation. | |
export ZSH=~/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="agnoster" | |
#ZSH_THEME="bira" | |
#ZSH_THEME="geoffgarside" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// How can this conditional be simplified? | |
let price = 5 | |
if price >= 1 && price <= 5 { | |
print("Price within range") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Why won't this compile? | |
var name: String? | |
if name != nil { | |
displayName(name: name) | |
} | |
func displayName(name: String) { | |
// display name | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// What's the output of this code? | |
extension Int { | |
func times(callback: (_ n: Int) -> ()) { | |
for n in 0...self { | |
callback(n) | |
} | |
} | |
} | |
2.times { (n) in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// What will be displayed by this code? | |
blueSquare.backgroundColor = UIColor.blue | |
redSquare.backgroundColor = UIColor.red | |
let constraints = [ | |
redSquare.topAnchor.constraint(equalTo: blueSquare.topAnchor), | |
blueSquare.leftAnchor.constraint(equalTo: redSquare.leftAnchor, constant: -40), | |
blueSquare.bottomAnchor.constraint(equalTo: redSquare.bottomAnchor), | |
redSquare.rightAnchor.constraint(equalTo: blueSquare.rightAnchor, constant: -40) | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- What's wrong with this layout, how can it be improve? --> | |
<?xml version="1.0" encoding="utf-8"?> | |
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<androidx.appcompat.widget.LinearLayoutCompat | |
android:id="@+id/fullnameLayout" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- How could we optimise this? --> | |
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content"> | |
<TextView | |
android:id="@+id/tv_top" | |
android:text="Full Name" |
OlderNewer