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 / The Technical Interview Cheat Sheet.md
Last active November 22, 2018 19:36 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet.

Data Structure Basics

Array

Definition

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
  • They are one of the oldest, most commonly used data structures.

What you need to know:

  • Optimal for indexing; bad at searching, inserting, and deleting (except at the end).
@apostergiou
apostergiou / yardoc_cheatsheet.md
Last active March 1, 2017 11:14 — forked from chetan/yardoc_cheatsheet.md
YARD cheatsheet

YARD CHEATSHEET http://yardoc.org

cribbed from http://pastebin.com/xgzeAmBn

Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.

Modules

Namespace for classes and modules that handle serving documentation over HTTP

@apostergiou
apostergiou / gitcheats
Last active May 19, 2017 11:59 — forked from chrismccoy/gitcheats.txt
git cheats
# shortform git commands
alias g='git'
# push changes to an empty git repository for the first time
git push --set-upstream origin master
# remove untracked files in a git repository
git status -su | cut -d' ' -f2- | tr '\n' '\0' | xargs -0 rm
# get most modified files and counts
@apostergiou
apostergiou / mysql.md
Last active March 21, 2017 09:37
How to Back Up and Restore a MySQL Database

Back up From the Command Line (using mysqldump)

$ mysqldump -u root -p -h 127.0.0.1 --database Users --add-drop-database > ~/users_backup.sql

Back up your MySQL Database with Compress

$ mysqldump -u root -p -h 127.0.0.1 --database Users --add-drop-database | gzip -9 > ~/users_backup.sql.gz
@apostergiou
apostergiou / 00.howto_install_phantomjs.md
Created March 13, 2017 10:38 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@apostergiou
apostergiou / tmux-cheatsheet.markdown
Created March 24, 2017 09:31 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@apostergiou
apostergiou / tmux.md
Created March 24, 2017 15:04 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@apostergiou
apostergiou / debugging_ruby.md
Created March 25, 2017 19:10
Debugging ruby

Find out method definition

foo = Object.new
p foo.method(:bar).source_location

Bundle open

@apostergiou
apostergiou / gist:6dc89c22c5826c89547d24049e492885
Created May 13, 2017 09:56 — forked from ryansobol/gist:5252653
15 Questions to Ask During a Ruby Interview

Originally published in June 2008

When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.

To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.

What to expect

Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.