Skip to content

Instantly share code, notes, and snippets.

View rafaelmaeuer's full-sized avatar

Rafael M. rafaelmaeuer

View GitHub Profile
myPlayer.src([
{ type: "video/mp4", src: "http://www.example.com/path/to/video.mp4" },
{ type: "video/webm", src: "http://www.example.com/path/to/video.webm" },
{ type: "video/ogg", src: "http://www.example.com/path/to/video.ogv" }
]);
<IfModule mod_php5.c>
php_value max_execution_time 300
</IfModule>
// enqueue scripts and styles
function nr_load_scripts() {
wp_register_script('googlemaps', 'https://maps.googleapis.com/maps/api/js?key=XXX',null,null,true);
wp_enqueue_script('googlemaps');
}
add_action( 'wp_enqueue_scripts', 'nr_load_scripts' );
@rafaelmaeuer
rafaelmaeuer / fontface.css
Created December 14, 2016 11:16
Fontface File Formats and Browser Support From https://css-tricks.com/snippets/css/using-font-face/
@font-face {
font-family: 'MyWebFont';
src: url('webfont.eot'); /* IE9 Compat Modes */
src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('webfont.woff2') format('woff2'), /* Super Modern Browsers */
url('webfont.woff') format('woff'), /* Pretty Modern Browsers */
url('webfont.ttf') format('truetype'), /* Safari, Android, iOS */
url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */
}

solution: It happens because of framework compilation.

App target -> Build Phases -> Embed Frameworks.

So mark copy only when installing on. Clean the project and run it!

iOS-Simulator

@rafaelmaeuer
rafaelmaeuer / bash_profile.md
Last active October 9, 2017 14:00
Remove duplicates for "open with" in OS X From https://github.com/atom/atom/issues/1720

This does happen with other applications, and there's uncertainty about whether it's an OS X or Atom bug, consensus seems to be OS X. I worked around it by adding the recommended commands to an alias to my .bash_profile so I can just do killdups when it happens:

alias killdups='/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user;killall Finder;echo "Rebuilt Open With, relaunching Finder"'

Reload .bash_profile with:

source ~/.bash_profile
@rafaelmaeuer
rafaelmaeuer / pseudo-element-property.js
Last active October 9, 2017 14:00
Get Pseudo-Element Properties with JavaScript From https://davidwalsh.name/pseudo-element
var color = window.getComputedStyle(
document.querySelector('.element'), ':before'
).getPropertyValue('color')
// just add rule
document.styleSheets[0].addRule('.red::before','color: green');
// or insert rule at index 0 to remove it later
document.styleSheets[0].insertRule('.red::before { color: green }', 0);
#rotatedtext {
transform-origin: left;
transform: translate(50%, 50%) rotate(90deg) ;
}