Skip to content

Instantly share code, notes, and snippets.

View DakotaLMartinez's full-sized avatar

Dakota Lee Martinez DakotaLMartinez

View GitHub Profile

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

@DakotaLMartinez
DakotaLMartinez / 0_reuse_code.js
Created March 27, 2016 20:58
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@DakotaLMartinez
DakotaLMartinez / rspec_model_testing_template.rb
Created April 6, 2016 02:04 — forked from SabretWoW/rspec_model_testing_template.rb
Rails Rspec model testing skeleton & cheat sheet using rspec-rails, shoulda-matchers, shoulda-callbacks, and factory_girl_rails. Pretty much a brain dump of examples of what you can (should?) test in a model. Pick & choose what you like, and please let me know if there are any errors or new/changed features out there. Reddit comment thread: http…
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems:
@DakotaLMartinez
DakotaLMartinez / test.md
Created May 1, 2016 23:41
This is a test from my Github API lab on learn.co

did it work????

@DakotaLMartinez
DakotaLMartinez / test.md
Created May 1, 2016 23:44
This is a test from my Github API lab on learn.co

I'm not sure this worked...

@DakotaLMartinez
DakotaLMartinez / test.md
Created May 1, 2016 23:45
This is a test from my Github API lab on learn.co

did it work???

@DakotaLMartinez
DakotaLMartinez / javascript.json
Last active September 22, 2016 20:02
Visual Studio Code Snippet to create an Angular 1 Component
"Angular Component": {
"prefix": "ng1component",
"body": [
"(function() {",
"\t'use strict';",
"\t// Usage:",
"\t//",
"\t// Creates:",
"\t//",
"",
@DakotaLMartinez
DakotaLMartinez / javascript.json
Last active September 19, 2016 22:46
Visual Studio Code Snippet for Angular 1 Custom Filter
"Angular Filter": {
"prefix": "ng1filter",
"body": [
"angular",
"\t.module('app')",
"\t.filter('${filterName}', ${filterName});",
"\t",
"\tfunction ${filterName}() {",
"\t\treturn function(input) {",
"\t\t\tif (${formatCondition}) {",
@DakotaLMartinez
DakotaLMartinez / Codility Flags Challenge
Created March 29, 2017 21:01
This one is O(n) time complexity, but there's still a weird bug coming up in the test cases...
def create_peaks(a)
peaks = [false]
(1..a.size - 2).each do |i|
if a[i] > a[i - 1] && a[i] > a[i + 1]
peaks << true
else
peaks << false
end
end
peaks
@DakotaLMartinez
DakotaLMartinez / Dockerfile
Created December 3, 2017 23:01
Sharetribe Dockerfile
FROM ruby:2.3.4
MAINTAINER Sharetribe Team <team@sharetribe.com>
ENV REFRESHED_AT 2016-11-08
RUN apt-get update \
&& apt-get dist-upgrade -y
#