Skip to content

Instantly share code, notes, and snippets.

View apostergiou's full-sized avatar
🌊
Focusing

Apostolis Stergiou apostergiou

🌊
Focusing
View GitHub Profile
@apostergiou
apostergiou / .md
Created November 2, 2017 07:35
spf13-vim + vim-go
  1. Install spf13-vim
sh <(curl https://j.mp/spf13-vim3 -L)
  1. Install Go bundle
echo "let g:spf13_bundle_groups=['general', 'neocomplete', 'programming', 'ruby', 'python', 'go', 'javascript', 'html', 'misc', 'writing' ]" >> ~/.vimrc.before.local 
@apostergiou
apostergiou / pr_etiquette.md
Created November 16, 2017 07:58 — forked from mikepea/pr_etiquette.md
Pull Request Etiquette

Pull Request Etiquette

Why do we use a Pull Request workflow?

PRs are a great way of sharing information, and can help us be aware of the changes that are occuring in our codebase. They are also an excellent way of getting peer review on the work that we do, without the cost of working in direct pairs.

Ultimately though, the primary reason we use PRs is to encourage quality in the commits that are made to our code repositories

Done well, the commits (and their attached messages) contained within tell a story to people examining the code at a later date. If we are not careful to ensure the quality of these commits, we silently lose this ability.

@apostergiou
apostergiou / README.md
Created December 5, 2017 19:56 — forked from akashnimare/README.md
A Beginners Guide to writing a Kickass README ✍

Project title

A little info about your project and/ or overview that explains what the project is about.

Motivation

A short description of the motivation behind the creation and maintenance of the project. This should explain why the project exists.

Build status

Build status of continus integration i.e. travis, appveyor etc. Ex. -

Build Status

@apostergiou
apostergiou / values_pointers.go
Created December 18, 2017 09:14 — forked from josephspurrier/values_pointers.go
Golang - Asterisk and Ampersand Cheatsheet
/*
********************************************************************************
Golang - Asterisk and Ampersand Cheatsheet
********************************************************************************
Also available at: https://play.golang.org/p/lNpnS9j1ma
Allowed:
--------
p := Person{"Steve", 28} stores the value
@apostergiou
apostergiou / pull_request_template.md
Last active January 15, 2018 09:50
Pull request template

Fixes T0001: link

Purpose

Manual testing

Notes for the reviewers

Background context

require 'rack'
class HelloWorldApp
def self.call(env)
# 200 is the HTTP status code
# the second element is the response HTTP header hash
# finally the last element is the response body
['200', {'Content-Type' => 'text/html'}, ['A hello world rack app.']]
end
end
@apostergiou
apostergiou / System Design.md
Created February 19, 2018 18:27 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@apostergiou
apostergiou / web-servers.md
Created May 1, 2018 19:13 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@apostergiou
apostergiou / rubymethodlookup.md
Created May 13, 2018 07:02 — forked from damien-roche/rubymethodlookup.md
A Primer on Ruby Method Lookup

A Primer on Ruby Method Lookup

Method lookup is a simple affair in most languages without multiple inheritance. You start from the receiver and move up the ancestors chain until you locate the method. Because Ruby allows you to mix in modules and extend singleton classes at runtime, this is an entirely different affair.

I will not build contrived code to exemplify the more complicated aspects of Ruby method lookup, as this will only serve to confuse the matter. If you are having trouble following method lookup in your own programs, it is not because Ruby has strange rules (it does), it is because your code is too tangled.

When you pass a message to an object, here is how Ruby finds what method to call:

1. Look within singleton class