Skip to content

Instantly share code, notes, and snippets.

@jtibbertsma
jtibbertsma / actions.js
Last active December 28, 2020 06:23
react-native-navigation redux middleware example
import { createAction } from 'redux-actions';
import {
NAVIGATION_PUSH,
NAVIGATION_POP,
NAVIGATION_RESET_TO,
NAVIGATION_POP_TO_ROOT
} from './actions';
export const push = createAction(NAVIGATION_PUSH);
export const pop = createAction(NAVIGATION_POP);
@mairh
mairh / Redux-Form-Semantic-UI-React
Last active August 12, 2021 23:03
Semantic-UI-React form validation using redux-form example
// semantic-ui-form.js
import React from 'react';
import PropTypes from 'prop-types';
import { Form, Input } from 'semantic-ui-react';
export default function semanticFormField ({ input, type, label, placeholder, meta: { touched, error, warning }, as: As = Input, ...props }) {
function handleChange (e, { value }) {
return input.onChange(value);
}
@spencerhunter
spencerhunter / EventsDwollaAccounts.md
Created January 21, 2017 18:21
Example List of Events related to Dwolla Accounts

Example List of Events related to Dwolla Accounts

Each webhook sent by the Dwolla API contains an Event with _links to: the associated resource, account associated with the event, and the customer associated with the event (if applicable). It is important to note that a single API request can trigger multiple webhooks to be fired, e.g. initiating a transfer from an Account to Customer can create the events transfer_created and customer_transfer_created.

List of events by account type that can be triggered for a Dwolla account

Reference additional information on account types in this resource article.

Possible events for all account types

account_suspended

@spencerhunter
spencerhunter / EventsAPICustomers.md
Last active January 15, 2021 19:38
Example List of webhooks related to API Customers

Example List of webhooks related to API Customers

Each webhook sent by the Dwolla API contains an Event with _links to: the associated resource, account associated with the event, and the customer associated with the event (if applicable). It is important to note that a single API request can trigger multiple webhooks to be fired, e.g. initiating a transfer from an Account to Customer can create the events transfer_created and customer_transfer_created.

List of webhooks by Customer type that can be triggered for API Customers

Reference additional information on account types in this resource article.

Possible events for all Customer types

customer_created

@nimasdj
nimasdj / MimeTypes.php
Last active September 10, 2024 15:48
List of MimeTypes mapped to file extensions
<?php
// I made this array by joining all the following lists + .php extension which is missing in all of them.
// please contribute to this list to make it as accurate and complete as possible.
// https://gist.github.com/plasticbrain/3887245
// http://pastie.org/5668002
// http://pastebin.com/iuTy6K6d
// total: 1223 extensions as of 16 November 2015
$mime_types = array(
'3dm' => array('x-world/x-3dmf'),
'3dmf' => array('x-world/x-3dmf'),
@glen-cheney
glen-cheney / encoding-video.md
Last active November 24, 2024 10:09
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
@radzserg
radzserg / meteor pagination class
Last active October 19, 2016 20:34
meteor pagination class
namespace('App.data')
###
Meteor pagination class
Usage
UsersController = RouteController.extend
waitOn: ->
@page = @params.query.page || 1
@pagination = new App.data.Pagination(Users, selector, {page: @page})
@lylepratt
lylepratt / gist:d8bf84b3b7d6932e3549
Last active August 4, 2016 18:45
Grunt Task to Generate Manifest for cordova-app-loader
/* This generates a manifest file for use with the cordova-app-loader tool:
* https://github.com/markmarijnissen/cordova-app-loader
*/
/*
* You can add settings to your grunt initConfig
//jsonmanifest settings
jsonmanifest: {
generate: {
@demisx
demisx / angularjs-providers-explained.md
Last active December 26, 2024 05:39
AngularJS Providers: Constant/Value/Service/Factory/Decorator/Provider
Provider Singleton Instantiable Configurable
Constant Yes No No
Value Yes No No
Service Yes No No
Factory Yes Yes No
Decorator Yes No? No
Provider Yes Yes Yes

Constant

@naoyeye
naoyeye / angular.filters.nl2br.js
Created January 2, 2014 14:36
angular nl2br filter
/*
# Usage in html template:
"xxx | nl2br"
<div ng-bind-html=" YourString | nl2br "></div>
or: