Skip to content

Instantly share code, notes, and snippets.

View ddeveloperr's full-sized avatar
👨‍💻
Doist

Kemal C. ddeveloperr

👨‍💻
Doist
View GitHub Profile
Railscasts videos all in one:
http://media.railscasts.com/assets/episodes/videos/001-caching-with-instance-variables.mp4
http://media.railscasts.com/assets/episodes/videos/002-dynamic-find-by-methods.mp4
http://media.railscasts.com/assets/episodes/videos/003-find-through-association.mp4
http://media.railscasts.com/assets/episodes/videos/004-move-find-into-model.mp4
http://media.railscasts.com/assets/episodes/videos/005-using-with-scope.mp4
http://media.railscasts.com/assets/episodes/videos/006-shortcut-blocks-with-symbol-to-proc.mp4
http://media.railscasts.com/assets/episodes/videos/007-all-about-layouts.mp4
http://media.railscasts.com/assets/episodes/videos/008-layouts-and-content-for.mp4

How I Stay Up to Date on Rails

For last night's UW Advanced Rails last class I put together my short list for staying up to date with Ruby, Rails, and the Web Development community. Here's the list:

@ddeveloperr
ddeveloperr / latency.markdown
Created April 6, 2016 12:09 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@ddeveloperr
ddeveloperr / css-selectors.md
Created October 10, 2016 19:46
CSS must-know selectors

###1. *

* { margin: 0; padding: 0; }

Let’s knock the obvious ones out, for the beginners, before we move onto the more advanced selectors. The star symbol will target every single element on the page. Many developers will use this trick to zero out the margins and padding. While this is certainly fine for quick tests, I’d advise you to never use this in production code. It adds too much weight on the browser, and is unnecessary.

Git Cheat Sheet

Basic commands

git init Creates a new git repository in the directory

git add <file name> Adds a specific file to staging

git add . or git add -A Adds the full directory and its contents to staging

@ddeveloperr
ddeveloperr / SOLID.markdown
Created June 5, 2019 17:18 — forked from emaraschio/SOLID.markdown
SOLID Principles with ruby examples

#SOLID Principles with ruby examples

##SRP - Single responsibility principle A class should have only a single responsibility.

Every class should have a single responsibility, and that responsibility should be entirely encapsulated. All its services should be narrowly aligned with that responsibility, this embrace the high cohesion.

##OCP - Open/closed principle Software entities should be open for extension, but closed for modification.