Skip to content

Instantly share code, notes, and snippets.

View scalvert's full-sized avatar
:octocat:

Steve Calvert scalvert

:octocat:
View GitHub Profile
@scalvert
scalvert / Commit Formatting.md
Created June 21, 2019 16:15 — forked from brianclements/Commit Formatting.md
Angular Commit Format Reference Sheet

Git Commit Guidelines

We have very precise rules over how our git commit messages can be formatted. This leads to more readable messages that are easy to follow when looking through the project history. But also, we use the git commit messages to generate the AngularJS change log.

Commit Message Format

Each commit message consists of a header, a body and a footer. The header has a special format that includes a type, a scope and a subject:

import Ember from 'ember';
class MyModel extends Ember.Object {
constructor() {
super();
this._first = "Ricardo";
this._last = "Mendes";
}
get first() {
@scalvert
scalvert / gist:b8fbe60ee2a545e9114d815cba196ee3
Created June 27, 2017 20:47 — forked from knu/gist:111055
How to mass-rename tags and push them with Git
# Rename tags named foo-bar-#.#.# to v#.#.# and push the tag changes
git tag -l | while read t; do n="v${t##*-}"; git tag $n $t; git push --tags ; git tag -d $t; git push origin :refs/tags/$t ; done
@scalvert
scalvert / controllers.application.js
Last active April 16, 2017 23:43 — forked from chadhietala/controllers.application.js
Pathless Routes For Deferred Rendering
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Component.extend({
isValid: Ember.computed('value', function() {
return true;
})
});
import Ember from 'ember';
import hexColor from '../utils/hex-color';
const {
Controller,
computed
} = Ember;
export default Controller.extend({
/**
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@scalvert
scalvert / DFS.cs
Last active August 29, 2015 14:04 — forked from riyadparvez/DFS.cs
public class Tree<K, V>
where K : class, IComparable<K>
where V : class
{
private Node<K, V> root;
public V DepthFirstSearch(K key)
{
Stack<Node<K, V>> stack = new Stack<Node<K, V>>();
root.Visited = true;
@scalvert
scalvert / BFS.cs
Last active December 30, 2019 15:31 — forked from riyadparvez/BFS.cs
public class Tree<K, V>
where K : class, IComparable<K>
where V : class
{
private Node<K, V> root;
public V BreadthFirstSearch(K key)
{
Queue<Node<K, V>> queue = new Queue<Node<K, V>>();
root.Visited = true;