Skip to content

Instantly share code, notes, and snippets.

@romanmt
romanmt / takehome-test-ui-readme.md
Last active September 9, 2019 19:07
Take Home Test UI

For this assignment, we'd like you to: Create a simple web UI for creating and displaying dental appointments. The appointments can be stored in memory so you can avoid the need for a server or database.

The appointments should conform to the following interface:

DentalAppointment

  startTime: DateTime or unix timestamp
  endTime: DateTime or unix timestamp
 dentistName: String
@romanmt
romanmt / anagram.js
Last active September 2, 2016 22:39
Anagram Dictionary
import _, {reject, every, includes} from 'lodash'
const dictionary = [ "a", "sand", "car", "ester", "reset", "steer", "terse", "trees" ]
export function getMatches(characterString) {
let characters = characterString.split("")
return reject(dictionary, (entry) => {
return !every(characters, (character) => {
return includes(entry, character)
@romanmt
romanmt / keybase.md
Created September 15, 2014 14:44
keybase.md

Keybase proof

I hereby claim:

  • I am romanmt on github.
  • I am mattroman (https://keybase.io/mattroman) on keybase.
  • I have a public key whose fingerprint is 1E10 530A 1D67 F90B 61F4 937B 7B5C 57DA 7723 F2C3

To claim this, I am signing this object:

1 namespace :dm do
2 task :migrate => :environment do
3 gem "dm-migrations", "=0.9.6"
4 require "migration_runner"
5 Dir[File.join(Rails.root, "db", "migrate", "*")].each {|f| require f}
6 migrate_up!
7 end
8 end
echo"{\"ho\":\"hey\"}" | pp
upstream elasticsearch {
server 10.0.0.1:9200;
server 10.0.0.2:9200;
server 10.0.0.3:9200;
keepalive 64;
}
server {
listen 9200;
server_name search.proxy;
@romanmt
romanmt / 0_reuse_code.js
Created June 2, 2014 16:38
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
@romanmt
romanmt / function.snippets
Created January 23, 2013 15:29
Snippet file for a function
# -*- mode: snippet -*-
# name: f
# key: f
# binding: C-q f
# type: command
# --
function $1($2) {
$0
}
var _ = require('underscore')
var levers = [
{ id: '1', val: 'one'},
{ id: '2', val: 'two'},
{ id: '3', val: 'three'},
]
var ids = ['1', '3']
@romanmt
romanmt / gist:4485038
Created January 8, 2013 16:13
join problem
var Levers = function() {
var exports = {
select: function(ids, levers, defaults) {
function mapper(element) {
return levers[element] || _(defaults).extend({id: element});
}
return _(ids).map(mapper);
},
objectify: function(levers) {