Skip to content

Instantly share code, notes, and snippets.

@cmargroff
cmargroff / window.themeColor.js
Last active August 15, 2018 21:48
Set window color for Chrome 39 Android 4.3+
(function(window, document){
if (typeof window.chrome != "undefined") {
document.themeColorMeta = document.createElement("meta");
document.themeColorMeta.name = "theme-color";
document.themeColorMeta.content = "transparent";
document.head.appendChild(document.themeColorMeta);
Object.defineProperty(window, "themeColor", {
get: function(){
return document.themeColorMeta.content;
},
@redesigned
redesigned / functions.php
Last active March 24, 2016 12:27
Wordpress Magento Cross Integration
/* ===================================== */
/* Add This to Wordpress's /wp-content/yourtheme/functions.php file */
define('MAGENTO_ROOT', '/Volumes/Storage/www/heartandsun/store/');
define('MAGENTO_LOADER', MAGENTO_ROOT.'app/Mage.php');
if (!class_exists('Mage')) {
require_once(MAGENTO_LOADER);
umask(0);
Mage::app("default");
};
/* ===================================== */
@bgallagh3r
bgallagh3r / wp.sh
Last active March 23, 2025 19:40
Wordpress: Bash Install Script -- Downloads latest WP version, updates wp-config with user supplied DB name, username and password, creates and CHMOD's uploads dir, copies all the files into the root dir you run the script from, then deletes itself!
#!/bin/bash -e
clear
echo "============================================"
echo "WordPress Install Script"
echo "============================================"
echo "Database Name: "
read -e dbname
echo "Database User: "
read -e dbuser
echo "Database Password: "