Skip to content

Instantly share code, notes, and snippets.

@uxder
uxder / gist:8464331241ab43bf2cd879693b47a56c
Last active April 7, 2017 20:47
Sticky Component using RAF (works better than window scroll on specific mobile devices) -WIP
import {ViewChild, ViewChildren, Component, AfterViewChecked, OnDestroy, OnInit, ElementRef, Inject, Output, EventEmitter, HostListener, HostBinding} from "@angular/core";
import { DOCUMENT } from '@angular/platform-browser';
import { RafManager} from '../lib/animations/raf-manager';
declare var cordova: any;
/**
* A very simple sticky component. Supports stacking multiple.
*
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
class ExampleForMike {
private userStream$: BehaviorSubject<any>;
public getStream():BehaviorSubject<> {
return this.userStream$;
@uxder
uxder / config.js
Created February 2, 2017 20:27
React-native Typography
const CONFIG = {}
// Application colors.
CONFIG.colors = {
// Base
transparent: 'transparent',
};
import { Injectable } from '@angular/core';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
export interface AlertConfig {
description?: string;
okButtonLabel?: string;
cancelButtonLabel?: string;
okCallback?: Function;
displayLoading?: boolean;
@uxder
uxder / convert-to-transparent.gif
Created September 30, 2016 08:03
alpha-transparency-gif-maker.sh
## A script to make a series of pngs that uses alpha transparency into an animated gif.
## Gifs only support 100% transparent or a 100% opaque pixel colors so imagemagick will convert your 80% transparent color into 100%.
## Requires: Imagemagick
# Make all transparency into white pixels.
mogrify -background white -alpha remove *.png
# Convert the white pixels back to transparency.
for f in *.png
do
import React, { Component } from 'react';
/**
* Main Application entry point.
*/
class App extends Component {
render() {
var place = 'yo';
return (
<div>