Skip to content

Instantly share code, notes, and snippets.

import React, { Component } from 'react';
/**
* Main Application entry point.
*/
class App extends Component {
render() {
var place = 'yo';
return (
<div>
@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 { Injectable } from '@angular/core';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
export interface AlertConfig {
description?: string;
okButtonLabel?: string;
cancelButtonLabel?: string;
okCallback?: Function;
displayLoading?: boolean;
@uxder
uxder / config.js
Created February 2, 2017 20:27
React-native Typography
const CONFIG = {}
// Application colors.
CONFIG.colors = {
// Base
transparent: 'transparent',
};
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
class ExampleForMike {
private userStream$: BehaviorSubject<any>;
public getStream():BehaviorSubject<> {
return this.userStream$;
@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.
*
@uxder
uxder / mathf.js
Last active May 23, 2019 03:49
Mathf Temp
const mathf = {
getRandom : (min, max) => {
return Math.random() * (max - min) + min;
},
getRandomInt : (min, max)=>{
return Math.floor(Math.random() * (max - min + 1)) + min;
# Delete all branches that contain 'search_keyword'
git branch | grep 'search_keyword' | xargs git branch -D
# Delete all branches that have already merged into master or staging
git branch --merged | egrep -v "(^\*|master|staging)" | xargs git branch -D
import { MouseTracker } from './mousetracker';
/**
* A class that creates a parallax effect based on the mouse position.
* @hidden
*/
export class Parallaxer {
private animate_: boolean;
import { MouseTracker } from './mousetracker';
/**
* A class that creates a parallax effect based on the mouse position.
* @hidden
*/
export class Parallaxer {
private animate_: boolean;