Skip to content

Instantly share code, notes, and snippets.

Elliott Greaves greaveselliott

Block or report user

Report or block greaveselliott

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@greaveselliott
greaveselliott / search-js-object
Created Feb 28, 2018
Searches JS object for values
View search-js-object
function find_property(object, property) {
var results = [];
for (var key in object) {
if (object !== undefined) {
var value = object[key];
if (key === property) {
results.push({
"property": key,
"value": value
View simplePeopleFilter
function simpleFilter(people) {
return people.filter(function(person){
return person.age >= 30 && person.age <= 40 && person.gender === "male";
});
}
@greaveselliott
greaveselliott / disable-wordpress-admin-updates.php
Created Nov 3, 2015
Prevents users from updating their WordPress installation
View disable-wordpress-admin-updates.php
<?php
add_action('admin_menu','wphidenag');
function wphidenag() {
remove_action( 'admin_notices', 'update_nag', 3 );
}
add_action('admin_head', 'my_custom_fonts');
function my_custom_fonts() {
echo '<style>
View block-grid.scss
// Block Grid
// Technique adapted from Foundation 5 for Bootstrap 3.
// https://github.com/zurb/foundation/blob/f755d8704123f86c281ede0b171881e2672f150d/scss/foundation/components/_block-grid.scss
// Original LESS Version by Christopher Mitchell (https://gist.github.com/ChrisTM)
// Converted to SCSS by Rasmus Jürs (https://github.com/Jursdotme)
[class*="block-grid-"] {
display: block;
margin: -($grid-gutter-width/2);
padding: 0;
View sass-responsive-mixin.scss
/**
* Responsive mixin. The media breakpoints are as defined
* in the twitter bootstrap framework:
*
* - phone
* - tablet-portrait
* - tablet-landscape-desktop
* - large-desktop
*
* Additional parameters for tagetting retina and non-retina
You can’t perform that action at this time.