Skip to content

Instantly share code, notes, and snippets.

View rafaelmaeuer's full-sized avatar

Rafael M. rafaelmaeuer

View GitHub Profile
var is_iPad = navigator.userAgent.match(/iPad/i) != null;
function is_iPhone_or_iPod(){
return navigator.platform.match(/i(Phone|Pod))/i)
}
function tryMe (param1, param2) {
alert(param1 + " and " + param2);
}
function callbackTester (callback) {
callback (arguments[1], arguments[2]);
}
callbackTester (tryMe, "hello", "goodbye");
/* latin-ext */
@font-face {
font-family: 'Oxygen';
font-style: normal;
font-weight: 400;
src: local('Oxygen'), local('Oxygen-Regular'), url(https://fonts.gstatic.com/s/oxygen/v5/LC4u_jU27qpsdszDEgeU_3-_kf6ByYO6CLYdB4HQE-Y.woff2) format('woff2');
unicode-range: U+30-39;
}
@rafaelmaeuer
rafaelmaeuer / google-api-key-acf.php
Created December 13, 2016 17:23
Google API Key for Advanced Custom Fields (Wordpress) From https://www.advancedcustomfields.com/resources/google-map/
function my_acf_google_map_api( $api ){
$api['key'] = 'xxx';
return $api;
}
add_filter('acf/fields/google_map/api', 'my_acf_google_map_api');
@rafaelmaeuer
rafaelmaeuer / wurfl.js
Last active October 9, 2017 14:01
wurfl.js: Detect Device-Type - From https://web.wurfl.io/#wurfl-js
if (WURFL.is_mobile === true && WURFL.form_factor === "Smartphone") {
// targetSmartPhoneDevices();
}
chown www-data:www-data -R * # Let Apache be owner
find . -type d -exec chmod 755 {} \; # Change directory permissions rwxr-xr-x
find . -type f -exec chmod 644 {} \; # Change file permissions rw-r--r--
define('FS_METHOD', 'direct');

##How to set up Virtual Hosts in Apache on Mac OSX

###Allow the vhosts configuration from the Apache configuration file httpd.conf

Open the httpd.conf

sudo nano /etc/apache2/httpd.conf
// get
var currentPoster = myPlayer.poster();
// set
myPlayer.poster('http://example.com/myImage.jpg');