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 / gist:9510889
Created March 12, 2014 16:37
testRunner.js
require(['config'], function(){
require(['require',
'walk',
'chai',
'mocha'],
function(require, walk, chai, mocha){
var tests = [];
var walker = walk.walk('./', { followLinks: false });
(function($) {
$.extend($.fn, {
removeStyle: function() {
this.each(function() {
return $(this).removeAttr('style');
});
}
});
})(Mobify.$);
@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;
@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 / objects_and_memory
Created July 28, 2014 18:05
Mobify Technical Evaluations
/*
Instructions:
Implement the structure that makes this code runnable. To read the output, simply write
the result of the shout call to the console. You can use the developer tools to view
the result of the console call.
The result of the shout call should be "MOBIFY", without quotations.
How many different ways can you modify your syntax to make this code work?
@scalvert
scalvert / Sharebox example
Last active November 15, 2016 07:15
Sharebox
This gist demonstrates sharebox composability
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
toggleCheckbox() {
alert('toggled!');
}
}
});
import Ember from 'ember';
export default Ember.Component.extend({
});
@scalvert
scalvert / components.bottom-level.js
Last active August 18, 2016 19:13
Closure actions to components
import Ember from 'ember';
export default Ember.Component.extend({
click() {
this.onTopLevel();
}
});
@scalvert
scalvert / components.bottom-level.js
Last active August 18, 2016 19:15
String actions with sendAction bubbling
import Ember from 'ember';
export default Ember.Component.extend({
click() {
this.sendAction('onTopLevel');
}
});