Skip to content

Instantly share code, notes, and snippets.

View mateuszszklarek's full-sized avatar
🗝️

Mateusz Szklarek mateuszszklarek

🗝️
View GitHub Profile

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@mateuszszklarek
mateuszszklarek / .vimrc
Created May 20, 2016 18:40 — forked from wswidzinski/.vimrc
.vimrc
" Use Vim settings, rather then Vi settings (much better!).
" " This must be first, because it changes other options as a side effect.
set nocompatible
set shell=bash
" TODO: this may not be in the correct place. It is intended to allow overriding <Leader>.
" source ~/.vimrc.before if it exists.
if filereadable(expand("~/.vimrc.before"))
source ~/.vimrc.before
endif
@mateuszszklarek
mateuszszklarek / multiple_ssh_setting.md
Created August 23, 2016 20:05 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@mateuszszklarek
mateuszszklarek / .swiftlint.yml
Created October 5, 2017 07:43
Configuration file for SwiftLint
opt_in_rules:
- empty_count
- sorted_imports
- force_unwrapping
- operator_usage_whitespace
- number_separator
- switch_case_on_newline
- implicit_return
- overridden_super_call
- object_literal
let string = "Hello World"
let encodedString = Data(string.utf8)
enum Sex: String, Encodable {
case male
case female
case other
}
struct User: Encodable {
let id: Int
let name: String
let surname: String
{
"id": 19,
"name": "John",
"surname": "Doe",
"sex": "male"
}
{
"id": 19,
"full_name": "John Doe",
"sex": "male"
}
enum Sex: String, Encodable {
case male
case female
case other
}
struct User: Encodable {
let id: Int
let name: String
let surname: String
func decode<T>(_ type: T.Type, from data: Data) throws -> T where T : Decodable