Skip to content

Instantly share code, notes, and snippets.

View k30v1n's full-sized avatar

Kelvin Ferreira k30v1n

View GitHub Profile
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active June 21, 2024 21:39
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@wojteklu
wojteklu / clean_code.md
Last active June 20, 2024 21:37
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@HaNdTriX
HaNdTriX / imgURLToDataURL.es6
Last active October 31, 2018 20:06
Convert an imageURL to a base64 dataURL via canvas
/**
* Convert an imageURL to a
* base64 dataURL via canvas
*
* @param {String} url
* @param {Object} options
* @param {String} options.outputFormat [outputFormat='image/png']
* @param {Float} options.quality [quality=1.0]
* @return {Promise}
* @docs https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement#Methods
@mortezaadi
mortezaadi / persistence.xml
Last active March 13, 2023 10:54
persistence xml configurations for major databases and jpa providers
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<!-- derby -->
@rally25rs
rally25rs / FakeDbSet.cs
Created December 18, 2011 02:11
Fake implementation of Entity Framework IDbSet to use for unit testing.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Data.Entity;
using System.Linq;
using System.Linq.Expressions;
namespace Rally25rs.Gist.Data
{