Skip to content

Instantly share code, notes, and snippets.

View rostag's full-sized avatar
🏠
Working from home

Rosty rostag

🏠
Working from home
View GitHub Profile
@StephenFluin
StephenFluin / upload.component.ts
Created October 3, 2016 20:30
Firebase Uploader Component with Angular 2
import { Component, Input } from '@angular/core';
import { Router } from '@angular/router';
import { AngularFire, FirebaseListObservable } from 'angularfire2';
import { Observable } from 'rxjs';
declare var firebase: any;
interface Image {
path: string;
@ultimagriever
ultimagriever / migrate.js
Created August 26, 2016 15:33
Migrate Mongo -> Firebase
/**
* Migrate MongoDB database to Firebase.
* Syntax: node migrate.js [-c || --collection=]<MongoDB Collection> [ [-h || --host=]<MongoDB URI>]
* If no args are provided, the MONGODB_URI
* env variable declared in the .env file
* will be used instead.
*/
const env = require('dotenv');
const firebase = require('firebase');
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@btroncone
btroncone / ngrxintro.md
Last active February 9, 2024 15:37
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

@paulirish
paulirish / what-forces-layout.md
Last active April 30, 2024 17:56
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@PixelsCommander
PixelsCommander / proposal.md
Last active April 27, 2020 13:16
Rasterization API proposal

Rasterization API

Abstract

Rasterization API defines interface for making snapshots from HTML elements.

Introduction

@staltz
staltz / introrx.md
Last active May 3, 2024 13:00
The introduction to Reactive Programming you've been missing
@thomasfr
thomasfr / Git push deployment in 7 easy steps.md
Last active May 1, 2024 23:17
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
@nizaroni
nizaroni / Request Headers.http
Created May 6, 2013 22:12
Facebook iframe's HTTP response and request data for Download Tab
POST /b/en-US/facebookapps/downloadtab/noscroll/ HTTP/1.1
Host: www.mozilla.org
Connection: keep-alive
Content-Length: 277
Cache-Control: no-cache
Pragma: no-cache
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Origin: https://s-static.ak.facebook.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31
Content-Type: application/x-www-form-urlencoded
@ryanj
ryanj / gist:4446113
Last active June 12, 2016 09:41
How to keep secrets out of your public source by using OpenShift ENV variables

Keep secrets out of your source when working with OpenShift

These steps assume that you already have a working app on OpenShift. If you need help, you can get started here!

1. Find your app's ssh address

rhc app show YOUR_APP_NAME

2. ssh into your gear to set your environment variables:

ssh YOUR_APP_SSH_URL