Skip to content

Instantly share code, notes, and snippets.

View robbiegod's full-sized avatar
🧛‍♂️

Robert Fletcher robbiegod

🧛‍♂️
View GitHub Profile
@mandrasch
mandrasch / edit.php
Created October 17, 2011 13:11
Loading WYSIWYG Editor in custom block (Concrete5)
<h2>Description 1</h2>
<?php
Loader::element('editor_init');
Loader::element('editor_config');
Loader::element('editor_controls');
?>
<div class="ccm-block-field-group" id="ccm-editor-pane">
<textarea id="description" class="ccm-advanced-editor advancedEditor" name="description" rows="5" style="width: 95%;"><?php echo $description; ?></textarea>
</div>
@oodavid
oodavid / README.md
Last active April 6, 2024 18:45 — forked from aronwoost/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@adamjohnson
adamjohnson / index.html
Created October 3, 2012 19:48
Working with Attributes in Concrete5, download this code and paste into a .html document
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Working with Attributes in Concrete5</title>
<style>
pre { border: 1px solid black; padding:10px; }
</style>
</head>
<body>
@ifinoi
ifinoi / gist:4474902
Created January 7, 2013 13:20
LastBreath for WindowsPhone 8
* Set Last Action */
public App()
{
// Global handler for uncaught exceptions.
BugSenseHandler.Instance.Init(this, "YOUR_API_KEY");
BugSenseHandler.SetLastBreath(MyMethod);
// ...do more stuff...
}
@stowball
stowball / wp8-ie10-fix.js
Last active April 17, 2022 19:09
Microsoft's stop-gap solution to fix IE 10 & 11's viewport on Windows Phone 8. I've also added another condition so it won't run on other browsers that spoof the user agent. Details: http://mattstow.com/responsive-design-in-ie10-on-windows-phone-8.html
(function() {
if ("-ms-user-select" in document.documentElement.style && navigator.userAgent.match(/IEMobile/)) {
var msViewportStyle = document.createElement("style");
msViewportStyle.appendChild(
document.createTextNode("@-ms-viewport{width:auto!important}")
);
document.getElementsByTagName("head")[0].appendChild(msViewportStyle);
}
})();
@bhubbard
bhubbard / .htaccess
Last active December 25, 2023 02:59
This is my template .htaccess file for WordPress on Cloud Sites.
# Apache Server Config | MIT License
# https://gist.github.com/bhubbard/6082577
# Modified from https://github.com/h5bp/server-configs-apaches
# ##############################################################################
# # Default WordPress #
# ##############################################################################
# http://randomtype.ca/blog/the-wordpress-htaccess-file-explained/
# BEGIN WordPress
IMPORTANT
Please duplicate this radar for a Safari fix!
This will clean up a 50-line workaround.
rdar://22376037 (https://openradar.appspot.com/radar?id=4965070979203072)
//////////////////////////////////////////////////////////////////////////////
(Now available as a standalone repo.)
@francoishill
francoishill / gist:6483997
Created September 8, 2013 11:27
Media queries for mobile devices - Requires at least requires the meta viewport tag with content 'width=device-width'
/*http://i-skool.co.uk/mobile-development/web-design-for-mobiles-and-tablets-viewport-sizes/*/
/*At least requires the meta viewport tag with content 'width=device-width'*/
@media only screen and (max-width: 1080px) and (orientation : portrait) {
/* PORTRAIT:
Windows Surface Pro*/
}
@media only screen and (max-width: 800px) and (orientation : portrait) {
/* PORTRAIT:
Acer Iconia Tab A100
@paulferrett
paulferrett / imagick_average_colour.php
Created December 23, 2013 14:40
This function will get the average colour of an image file using PHP and Image Magick using the IMagick extension.
<?php
/**
* Get the average pixel colour from the given file using Image Magick
*
* @param string $filename
* @param bool $as_hex Set to true, the function will return the 6 character HEX value of the colour.
* If false, an array will be returned with r, g, b components.
*/
function get_average_colour($filename, $as_hex_string = true) {
@salcode
salcode / .gitignore
Last active February 10, 2024 10:56
See https://salferrarello.com/wordpress-gitignore/ for the latest version of my WordPress .gitignore file
# -----------------------------------------------------------------
# .gitignore for WordPress
# Bare Minimum Git
# http://ironco.de/bare-minimum-git/
# ver 20150227
#
# This file is tailored for a WordPress project
# using the default directory structure
#
# This file specifies intentionally untracked files to ignore