Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Toni Dezman tonidezman

🎯
Focusing
Block or report user

Report or block tonidezman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kule
kule / mini_rspec.rb
Created Sep 11, 2018
Simplified example of how rspec works
View mini_rspec.rb
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'colorize'
end
class MatcherInterface
def initialize(some_object)
@some_object = some_object
View frozen_string_literals.rb
comment = "# frozen_string_literal: true\n"
filemode = "r+"
dirs = Dir[Rails.root.join('spec/**/*.rb').to_s] + Dir[Rails.root.join('lib/**/*.rake').to_s] + Dir[Rails.root.join('lib/**/*.rb').to_s]
dirs.each do |filename|
contents = File.open(filename, "r") do |f|
f.read
end
contents = comment + contents
@Reltre
Reltre / mocks-are-not-stubs.markdown
Last active May 28, 2018
Mocks Aren't Stubs - Notes
View mocks-are-not-stubs.markdown

Notes for an article on testing and the various paradigms available to us

SEAT: Setup, Exercise, Assert, Teardown

Setup: Setup any objects necessary for tests to run.


Exercise: Make any calls for invoke specific behavior that is necessary for testing a feature or aspect of our program.

@chrisman
chrisman / css-diner.txt
Created Aug 2, 2017
solutions for css diner
View css-diner.txt
# https://flukeout.github.io/ #
01. plate
02. bento
03. #fancy
04. plate apple
05. #fancy pickle
06. .small
07. orange.small
08. bento orange.small
@baweaver
baweaver / ruby_books.md
Last active Dec 6, 2019
A list of books for learning and expanding on your Ruby knowledge.
View ruby_books.md

Ruby Book List

Learning Ruby

You're taking your first steps into Ruby

The Well Grounded Rubyist

A good introduction to programming in general. Easy on newer programmers.

@baweaver
baweaver / open_source.md
Created Dec 2, 2016
So you want to start on Open Source?
View open_source.md

So you want to start on Open Source?

A short guide for getting you started into the magical world of OSS.

What is your passion?

Are you a musician? Look for musical tools. Are you an artist? Look for some graphics libraries. Find something that works with your other passions to get you going.

If your passion is programming, look for ways to improve the environment.

@milmazz
milmazz / imposter-handbook-links.md
Last active Dec 3, 2019
Useful links found in The Imposter's Handbook by Rob Conery
View imposter-handbook-links.md
@vasanthk
vasanthk / System Design.md
Last active Dec 8, 2019
System Design Cheatsheet
View System Design.md

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?
@mdang
mdang / RAILS_CHEATSHEET.md
Last active Dec 5, 2019
Ruby on Rails Cheatsheet
View RAILS_CHEATSHEET.md

Ruby on Rails Cheatsheet

Architecture

Create a new application

Install the Rails gem if you haven't done so before

@vero4karu
vero4karu / tests.py
Last active Nov 20, 2019
Mock/replace timezone.now() with a custom date in Django unittes
View tests.py
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import datetime
from mock import patch
from django.test import TestCase
from django.utils import timezone
class DatesTestCase(TestCase):
You can’t perform that action at this time.