Skip to content

Instantly share code, notes, and snippets.

View miikkaa's full-sized avatar

Misha K. miikkaa

View GitHub Profile
@pixelastic
pixelastic / custom-token.js
Created July 2, 2018 10:44
Firebase function to return an Auth0 custom token
import cors from 'cors';
import Promise from 'bluebird';
import axios from 'axios';
import database from '../database/database.js';
/**
* The goal of this function is to mint custom token that can be used to
* authenticate to Firebase.
* The function will be called through https, and will check the credentials of
* the requested user (through the usage of its Auth0 token). If the Auth0 token
@oscherler
oscherler / README.md
Last active April 6, 2023 10:03
Diff JSON in Git using gron

jsondiff: diff JSON in Git using gron

gron is an incredible tool that makes JSON greppable. But it also makes it diffable, which is great if you have JSON files in Git.

To use gron to diff JSON in Git, save the json-diff script below and make it executable. Then add a difftool as shown in gitconfig, and optionally create an alias to invoke it more easily. Then try it:

git init
echo '{"foo":42,"bar":"hello"}' > foo.json
git add foo.json && git commit -m 'Initial commit.'
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active April 30, 2024 19:19
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@nickjohnson-dev
nickjohnson-dev / my-app.ts
Created March 30, 2016 23:25
Angular 2 Simple Wizard
import { Component } from 'angular2/core';
import { MyWizard } from './my-wizard';
import { MyWizardStep } from './my-wizard-step';
@Component({
selector: 'my-app',
directives: [
MyWizard,
MyWizardStep,
],
@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

@Fishrock123
Fishrock123 / gulp.js
Last active August 1, 2021 11:19
gulp & browserify (+watchify +babelify)
var gulp = require('gulp')
var browserify = require('browserify')
var watchify = require('watchify')
var babelify = require('babelify')
var source = require('vinyl-source-stream')
var buffer = require('vinyl-buffer')
var merge = require('utils-merge')
@busypeoples
busypeoples / AngularJS-ES6-Test-Skeleton
Last active June 6, 2020 01:29
AngularJS - Karma, Jasmine, Browserify, Stringify - ES6 Test Setup
We couldn’t find that file to show.
@danharper
danharper / gulpfile.js
Last active April 11, 2024 08:31
New ES6 project with Babel, Browserify & Gulp
var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var browserify = require('browserify');
var watchify = require('watchify');
var babel = require('babelify');
function compile(watch) {
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel));
@staltz
staltz / introrx.md
Last active April 29, 2024 09:25
The introduction to Reactive Programming you've been missing
@Craga89
Craga89 / jquery-ui-droppable-iframe-fix.js
Last active September 4, 2019 07:14
jQuery UI Draggable - Droppables in an iFrame
// Create new object to cache iframe offsets
$.ui.ddmanager.frameOffsets = {};
// Override the native `prepareOffsets` method. This is almost
// identical to the un-edited method, except for the last part!
$.ui.ddmanager.prepareOffsets = function (t, event) {
var i, j,
m = $.ui.ddmanager.droppables[t.options.scope] || [],
type = event ? event.type : null, // workaround for #2317
list = (t.currentItem || t.element).find(":data(ui-droppable)").addBack(),