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
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
import { CALL_API } from 'redux-api-middleware' | |
export function fetchLocations() { | |
return { | |
[CALL_API]: { | |
endpoint: 'http://api.somesite.com/api/locations', | |
method: 'GET', | |
// Don't have to manually add the Authorization header to every request. | |
headers: { 'Content-Type': 'application/json' }, | |
types: ['REQUEST', 'SUCCESS', 'FAILURE'] |
############################################## | |
## Example 1 - play a note | |
play 60 | |
############################################## | |
## Example 2 - play 4 random notes | |
4.times do | |
play rrand_i(60, 90) | |
sleep 0.5 |
function mapValues(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
result[key] = fn(obj[key], key); | |
return result; | |
}, {}); | |
} | |
function pick(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
if (fn(obj[key])) { |
/** | |
* ================== angular-ios9-uiwebview.patch.js v1.1.1 ================== | |
* | |
* This patch works around iOS9 UIWebView regression that causes infinite digest | |
* errors in Angular. | |
* | |
* The patch can be applied to Angular 1.2.0 – 1.4.5. Newer versions of Angular | |
* have the workaround baked in. | |
* | |
* To apply this patch load/bundle this file with your application and add a |
<!-- replace 000001 with the site_id from your specific iubenda embed code --> | |
<!-- replace 000002 with the policy_id from your EN iubenda embed code --> | |
<!-- replace 000003 with the policy_id from your IT iubenda embed code --> | |
<script type="text/javascript"> | |
var lang_id = jQuery('html').attr('lang').split('-')[0] | |
, site_id = 000001; // site_id from iubenda embed code | |
switch( lang_id ){ | |
case 'en': |
.platform-android4_1 { | |
/*Any styles for android 4.1*/ | |
} | |
.platform-android4_3 { | |
/*Any styles for android 4.3*/ | |
} | |
.platform-android4_4 { | |
/*Any styles for android 4.4*/ |
# ionic | |
-keep class org.apache.cordova.** { *; } | |
-keep public class * extends org.apache.cordova.CordovaPlugin | |
-keep class com.ionic.keyboard.IonicKeyboard.** { *; } | |
-keepclassmembers class com.your.package.YourWebViewClass$JSInterfaceClass { | |
public *; | |
} | |
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt | |
http://www.tagwith.com/question_290772_how-to-use-proguard-in-cordova-android-app |
#!/usr/bin/env node | |
// This plugin replaces text in a file with the app version from config.xml. | |
var wwwFileToReplace = "js/build.js"; | |
var fs = require('fs'); | |
var path = require('path'); | |
var rootdir = process.argv[2]; |