<?php | |
/* Instant Articles (https://wordpress.org/plugins/fb-instant-articles/) - Use post excerpt as subtitle */ | |
add_filter( 'instant_articles_subtitle', 'hf_instant_articles_subtitle' ); | |
function hf_instant_articles_subtitle( $subtitle ) { | |
$excerpt = get_the_excerpt(); | |
if ( trim($excerpt)!='' ) $subtitle = trim($excerpt); | |
return $subtitle; | |
} |
#!/bin/bash | |
echo 'Zipping folders for save function' | |
zip -r Save.zip node_modules save.js | |
echo 'Zipped... uploading to AWS' | |
aws lambda update-function-code --region us-east-1 --function-name saveEmailSubscriptor --zip-file fileb://./Save.zip --profile your-profile | |
echo 'Zipping folders for list function' | |
zip -r List.zip node_modules list.js | |
echo 'Zipped... uploading to AWS' | |
aws lambda update-function-code --region us-east-1 --function-name listEmailSubscriptors --zip-file fileb://./List.zip --profile your-profile |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
# ----------------------------------------------------------------- | |
# .gitignore for WordPress @salcode | |
# ver 20180808 | |
# | |
# From the root of your project run | |
# curl -O https://gist.githubusercontent.com/salcode/b515f520d3f8207ecd04/raw/.gitignore | |
# to download this file | |
# | |
# By default all files are ignored. You'll need to whitelist | |
# any mu-plugins, plugins, or themes you want to include in the repo. |
As William Durand was recently explaining in his SOS, he "didn't see any other interesting blog post about REST with Symfony recently unfortunately". After spending some long hours to implement an API strongly secured with oAuth, I thought it was time for me to purpose my simple explanation of how to do it.
You might have already seen some good explanation of how to easily create a REST API with Symfony2. There are famous really good bundles a.k.a. :
uglify: { | |
production: { | |
options: { | |
report: 'min' | |
}, | |
files: [{ | |
expand: true, | |
cwd: '<%= dir.tempJS %>/', | |
src: '*.js', | |
dest: '<%= dir.publicJS %>', |
To allow easier contributions, I've moved this to https://github.com/cheeaun/javascript-error-logging. Thanks! 😄
- http://errorception.com/ - translate error messages to English
- http://www.exceptionhub.com/
- http://jserrlog.appspot.com/
- http://www.muscula.com/ - source maps, translate error messages to English
- https://www.airbrake.io/ - tracekit, source maps