This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| while (true) do | |
| puts "4 8 15 16 23 42" | |
| sleep(6300) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Project < ActiveRecord::Base | |
| # Associations | |
| has_and_belongs_to_many :users | |
| has_many :proposals, dependent: :destroy | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class LimitedTextInput < SimpleForm::Inputs::Base | |
| def input | |
| merge_limited_attributes find_maxlength | |
| @builder.text_area attribute_name, input_html_options | |
| end | |
| private | |
| def find_maxlength |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl 'http://127.0.0.1:3000/emojis/' -H 'Origin: http://localhost:4200' -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: en-US,en;q=0.8' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36' -H 'X-File-Size: 101849' -H 'Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7ZQJvvFCg4Yp6dIO' -H 'Accept: */*' -H 'Referer: http://localhost:4200/emojis/new' -H 'Connection: keep-alive' --data-binary $'------WebKitFormBoundary7ZQJvvFCg4Yp6dIO\r\nContent-Disposition: form-data; name="file"; filename="Batman.jpg"\r\nContent-Type: image/jpeg\r\n\r\n\r\n------WebKitFormBoundary7ZQJvvFCg4Yp6dIO\r\nContent-Disposition: form-data; name="file"; filename="wonder_woman.jpg"\r\nContent-Type: image/gif\r\n\r\n\r\n------WebKitFormBoundary7ZQJvvFCg4Yp6dIO\r\nContent-Disposition: form-data; name="file"; filename="superman.jpg"\r\nContent-Type: image/jpeg\r\n\r\n\r\n------WebKitFormBoundary7ZQJvvFCg4Yp6dIO--\r\n' --compressed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Ember from 'ember'; | |
| function authorizationHeader() { | |
| // I guess I need to inject service:session here and pull the data from it? | |
| // how do? | |
| } | |
| export default Ember.Component.extend(Droplet, { | |
| // options: { | |
| // requestHeaders: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class EmojiSearcherTest < ActiveSupport::TestCase | |
| let(:collection) { create(:collection) } | |
| let(:user) { create(:user) } | |
| describe '#search' do | |
| before { populate_emoji_list } | |
| describe 'when a query argument is sent' do | |
| let(:params) do | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // app/controllers/resource/index.js | |
| import Ember from 'ember'; | |
| // The resource in the file path here is just whatever you are searching. In this app, it's emoji | |
| // but I wanted to standardize a bit. Here we are just defining the search query as a query param on | |
| // line 9 and then, when the search action is triggered by the form we set the query param on the | |
| // current route. | |
| export default Ember.Controller.extend({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| root = this | |
| module = window.Sorta ||= {} | |
| $ = jQuery | |
| root.Sorta = do ( module, $ ) -> | |
| self = module.lists = module.lists || {} | |
| self.index = -> | |
| Sorta.timeago.callTimeAgo() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { withEvents } from 'react-compose-events'; | |
| import { compose, withHandlers, withState } from 'recompose'; | |
| import { debounce } from './utils'; | |
| const LOAD_DISTANCE_FROM_PAGE_BOTTOM = 500; | |
| const LOAD_MORE_DEBOUNCE_TIME = 100; | |
| const withInfiniteScrolling = (loadMoreFunctionName, startsInfiniteEnabled = false) => compose( | |
| withState('infiniteEnabled', 'setInfiniteEnabled', startsInfiniteEnabled), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useEffect, useState } from 'react'; | |
| import { useInView } from 'react-intersection-observer'; | |
| const WithInfiniteScrolling = ({ | |
| children, | |
| hasMultiplePages, | |
| loading, | |
| loadMoreFunction, | |
| requireButtonClick = true | |
| }) => { |
OlderNewer