Skip to content

Instantly share code, notes, and snippets.

View lrdiv's full-sized avatar

Lawrence Davis lrdiv

View GitHub Profile
@lrdiv
lrdiv / default_hooks.php
Created September 17, 2013 00:18
default_hooks.php
<?php
// This function include screen.css in wp_head() function
function enqueue_stylesheets() {
wp_register_style("screen", stylesheet_url("screen"), false, false);
wp_enqueue_style("screen");
}
add_action('wp_enqueue_scripts', 'enqueue_stylesheets');
upstream gitlab {
server 192.168.254.37:80;
}
server {
listen 0.0.0.0:80;
server_name gitlab.kohsrv.net;
location / {
proxy_set_header X-Real-IP $remote_addr
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@lrdiv
lrdiv / gist:4613550
Last active December 11, 2015 14:19
For IE9, 8, 7, 6 check user's version of Flash Player. If it's less than 11.5, use static image for background and show div prompting them to upgrade.
var bgImageInit = function(mobile) {
var bg_image = "#{image_path('application/mobile-splash-bg.jpg')}";
$('#main-container').css('background', 'url(' + bg_image + ') right top no-repeat');
if (mobile == true) {
$('#main-container').css('background-size', '70%');
}
}
var mobileInit = function() {
var BV = new $.BigVideo({forceAutoplay:is_touch});