https://github.com/ReactiveCocoa/ReactiveCocoa
https://github.com/Alamofire/Alamofire
https://github.com/antitypical/Result
// SPDX-License-Identifier: MIT | |
// ^ recommended, included machine readable in bytecode metadata | |
// Software Package Data Exchange is an open standard | |
pragma solidity ^0.8.7; | |
// ^ floating pragma, min 0.8.7 max excluding 0.9.0 | |
// same as complex pragma: pragma solidity >=0.8.7 <0.9.0; | |
// major.breakingchanges.bugfixes | |
// only makes the compiler check for compatibility and throws error if not matching! | |
// should only be floating during development, fixed everywhere during testing & deployment |
import Foundation | |
func main() { | |
print("Starting") | |
// GCD works by dispatching chunks of code (represented by closures, and called 'blocks') onto things called 'dispatch | |
// queues'. These queues run the blocks, either on the main thread or in a background thread. (Queues don't correspond | |
// to threads on a one-to-one basis; GCD is responsible for spinning up threads to service queues.) | |
// Here's a variable representing shared state I want to manipulate from different threads. |
#Getting Started
##Webpage:
<html>
<head>
<title>Testing with Ruby and Selenium WebDriver</title>
</head>
<body bgcolor="antiquewhite">
var x: Int? = 0 | |
// Lets me unwrap x and also check a condition on it | |
func fooGuard() { | |
guard let x = x where x > 0 else { | |
return | |
} | |
// Do stuff with x | |
x.value |
Whether you use 2 spaces or 4 spaces, there are a few simple things that can make your node.js code easier to read. We've been using them in all the hapi modules for over 4 years now to great results. This list is by no means complete but it highlights the most useful elements that will give you immediate value in reducing bugs.
JavaScript makes it harder than most languages to know where variables are coming from. Variables assigned required modules are particularly important because they represent a singleton object shared with the entire application. There are also globals and module globals, along with function variables and arguments.
Traditionally, variables starting with an uppercase letter represent a class that must be instantiated using new
. This was an important semantic in the early days of JavaScript but at this point, if you don't know Date
requires new Date()
you are probably very new. We have adopted Upper Camel Case variable names for all module global variables
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications
like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.
open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl
You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html