Skip to content

Instantly share code, notes, and snippets.

@shidel-dev
shidel-dev / README.md
Last active January 10, 2019 23:14
Ember Twiddle Demo: Mirage with Ember Twiddle

Ember Twiddle Demo: Mirage with Ember Twiddle

Demo

This is a very trivial example of using mirage with Ember Twiddle.

@shidel-dev
shidel-dev / adapters.application.js
Last active January 10, 2019 20:38
ember data included issue
import Adapter from "ember-data/adapters/json-api";
export default Adapter.extend();
module Magic
def self.respond_to?(method_sym, include_private = false)
if method_sym.to_s =~ /^contains_(.*)/
true
else
super
end
end
def self.method_missing(m, *args, &block)
module Magic
def self.respond_to?(method_sym, include_private = false)
if method_sym.to_s =~ /^find_where_(.*)$/
true
else
super
end
end
module Magic
def self.respond_to?(method_sym, include_private = false)
#Logic to decide which methods to respond to.
end
def self.method_missing(m, *args, &block)
#dynamically handle method calls
end
Number.prototype.isCoprimeTo = function(num) {
if (this>num) var small = num, big = this;
else var small = this, big = num;
return (function(a, b) {
if (b == 0) return a;
return arguments.callee(b, a % b);
})(small, big) == 1
}
(ns words)
(use 'clojure.java.io)
(defn get-lines [fname]
(with-open [r (reader fname)]
(doall (line-seq r))))
(defn divide [list]
(partition-all (/ (count list) 4) list))

Keybase proof

I hereby claim:

  • I am shidel-dev on github.
  • I am joeshidel (https://keybase.io/joeshidel) on keybase.
  • I have a public key whose fingerprint is 753D 97CF E6EB 09D7 973B 0754 11B7 FAC2 B8D8 72AF

To claim this, I am signing this object:

#=====bob
class Bob
hey:(words) ->
switch
when words.replace(/\s+/, '') == '' then "Fine. Be that way!"
when words == words.toUpperCase() then "Woah, chill out!"
when /\?$/.test(words) then "Sure."
else "Whatever."
module.exports = Bob
@shidel-dev
shidel-dev / carousel.js
Last active August 29, 2015 13:56 — forked from ksolo/carousel.js
Image Carousel