Skip to content

Instantly share code, notes, and snippets.

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

Oskar oskarrough

💭
██████
View GitHub Profile
@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",

Scrolleo

Apple has been creating some amazing scrolling video sites lately and I've been trying to create a simplified plugin to recreate this effect. This is the alpha version of this plugin. You can see an example of the effect I'm recreating here: http://www.apple.com/macbook/

This uses requestAnimationFrame and allows you to create multiple custom scrolling videos easily.

A Pen by Mark Teater on CodePen.

License.

@paulirish
paulirish / bling.js
Last active May 1, 2024 19:56
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@sebz
sebz / grunt-hugo-lunrjs.md
Last active April 29, 2024 16:44
hugo + gruntjs + lunrjs = <3 search
@elithrar
elithrar / history.js
Last active January 10, 2016 14:03
smartScroll for Ember.js - reset the scroll position on forward transitions you haven't previously visited - via @rwjblue on embercommunity.slack.com
// app/locations/history.js
export default Ember.HistoryLocation.extend({
pushState() {
this._super(...arguments);
window.scrollTo(0, 0);
}
});
```​
@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'),
@planetcrypton
planetcrypton / text-2-html-test.js
Last active February 22, 2016 08:55
Ember JS Helper for converting parts of a text (non-mark-down) to HTML whenever certain patterns are recognized
/**
* $ ember test --filter "text-2-html"
*/
import { text2Html } from '../../../helpers/text-2-html';
import { module, test } from 'qunit';
module('Unit | Helper | text 2 html');
const input = "Hey\nHow're ya doin'?\nSorry you can't get through.\nWhy don't you leave me your name, mine is @planetcrypton, and your number, mine is +4512345678, and I'll get back to you.\nDon't forget to visit http://www.wearedelasoul.com/\nMail me at plug2@reversed-yogurt.com #oldschool #plug1 #plug2 #plug3";
@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

@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() {