Updated this for the first time in awhile in late 2020.
- Enable iCloud
- Disable iCloud mail
- Display to medium
- Turn up trackpad speed
Most of these guidelines are to match Apple's documentation and community-accepted best practices. Some are derived some personal preference. This document aims to set a standard way of doing things so everyone can do things the same way. If there is something you are not particularly fond of, it is encouraged to do it anyway to be consistent with everyone else.
This document is mainly targeted toward iOS development, but definitely applies to Mac as well.
NSString *foo = @"bar";
Resources for learning web design & front-end development:
ONLINE
Design
using System; | |
namespace Programmer { | |
public class Skillz { | |
public static void Main() { | |
Console.WriteLine("Round 1. CODE!"); | |
Console.WriteLine("--------------\n"); |
var querystring = require('querystring'); | |
var http = require('http'); | |
var util = require('util'); | |
exports.process = function(message, sayCallback) { | |
if(message.indexOf('generate meme') !== -1) { | |
var params = message.split(' '); | |
if(exports.types[params[2]]) { | |
var linesRegex = new RegExp(params[2] + " (.*) / (.*)"); | |
var lines = linesRegex.exec(message); |
#Vim Cheat Sheet
gqip
- Reformats paragraph to textwidthgq
- Reformats selection:Tab /=
- Equally spaces based on the = symbol (requires Tabular vim plugin):setf language
- Changes current language:set language=language
- Changes current language<C-a>
- Increments the number under the cursor<C-x>
- Decrements the number under the cursor~
- Toggles case and moves to next character in normal modeunless Rails.env.development? | |
require "active_record/connection_adapters/mysql2_adapter" | |
module ActiveRecord | |
module ConnectionAdapters | |
class Mysql2Adapter < AbstractAdapter | |
extend ActiveSupport::Memoizable | |
memoize :tables, :pk_and_sequence_for, :columns | |
end | |
end |
module Bus where | |
import Data.List (find, intercalate) | |
data BuildStatus = AllGreen | |
| Borken | |
deriving (Eq, Show) | |
data Brogrammer = Johnny | |
| Arthur |
class MetalController < ActionController::Metal | |
include AbstractController::Rendering | |
include ActionView::Layouts | |
include ActionController::Serialization | |
include ActionController::Rendering | |
include ActionController::Renderers::All | |
include ActionController::Redirecting | |
include AbstractController::Callbacks | |
include AbstractController::Helpers | |
include ActionController::ParamsWrapper |
# Without this fix, downgrading from Rails 4 to Rails 3 causes session cookies to blow up. | |
# | |
# The way the flash is stored in the session changed in a backwards-incompatible way. | |
if Rails::VERSION::MAJOR == 3 | |
module ActionDispatch | |
class Flash | |
def call(env) | |
if (session = env['rack.session']) && (flash = session['flash']) |