Skip to content

Instantly share code, notes, and snippets.

View oskarrough's full-sized avatar
💭
██████

Oskar oskarrough

💭
██████
View GitHub Profile
@brendanoh
brendanoh / controller.js
Last active March 5, 2017 21:07
This is a GIST to explain a workaround to the lack of case insensitive or partial text search on the server side via the Emberfire add-on.
import Ember from 'ember';
import computed from 'ember-new-computed';
const inject = Ember.inject;
const alias = computed.alias;
const sort = computed.sort;
export default Ember.Controller.extend({
sessionManager: inject.service(),
person: alias('sessionManager.person'),
@Rich-Harris
Rich-Harris / README.md
Last active July 28, 2017 13:24
Bare imports in manifest

A hastily-written strawman for how bare imports could be resolved in browsers — see this convo.

@NuckChorris
NuckChorris / array.js
Last active February 12, 2018 19:47 — forked from pixelhandler/transforms.js
In Ember-CLI, transforms are located in app/transforms/name.js
// app/transforms/array.js
import Ember from 'ember';
import DS from 'ember-data';
export default DS.Transform.extend({
deserialize: function(value) {
if (Ember.isArray(value)) {
return Ember.A(value);
} else {
return Ember.A();
@mupkoo
mupkoo / .gitlab-ci.yml
Created August 22, 2017 08:07
Using Ember-CLI with Chrome on GitLab CI
image: node:7.10
cache:
paths:
- node_modules/
- bower_components/
before_script:
# Install Chrome
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
FROM ruby:2.3.3
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
RUN mkdir /app
WORKDIR /app
ADD Gemfile /app/Gemfile
ADD Gemfile.lock /app/Gemfile.lock
RUN bundle install
ADD . /app
EXPOSE 3000
CMD rails s -p 3000
@rugk
rugk / README.md
Created June 16, 2016 20:31
Create Link headers for HTTP/2 Server push

This script creates headers of all files in a given directory to use them for HTTP/2 server push.

Usage: linkheader.sh /mydir

import React, { Suspense, useState } from "react";
import { unstable_createResource as createResource } from "react-cache";
import {
Autocomplete as Combobox,
Input as ComboboxInput,
List as ComboboxList,
Option as ComboboxOption
} from "./Combobox";
function App({ tabIndex, navigate }) {
@simurai
simurai / README.md
Last active November 28, 2019 05:39
Atom for minimalists

For minimalist ❤️ ers

minimalist

Just you, your code and nothing else.... :meditatingbuddha:

@n370
n370 / 20150309_firebase_batch_push.md
Last active June 21, 2020 19:57
Using jq, HTTPie and the Firebase REST API to push JSON objects from your terminal.

Using jq, HTTPie and the Firebase REST API to push JSON objects from your terminal.

Imagine a scenario where you've been developing locally with dummy data and at some point decided to move this data to a Firebase instance.

Assuming your JSON file contents looks like the following.

[ 
  {
    "name": "Zapallo Anco",
@steven-ferguson
steven-ferguson / firebase-ui-auth.js
Created July 12, 2016 23:59
Emberfire + FirebaseUI Authentication
/* globals firebaseui */
import Ember from 'ember';
import firebase from 'firebase';
const { computed, inject: { service } } = Ember;
export default Ember.Component.extend({
firebaseApp: service(),
didInsertElement() {