Skip to content

Instantly share code, notes, and snippets.

Cody Swartz g5codyswartz

Block or report user

Report or block g5codyswartz

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
@g5codyswartz
g5codyswartz / Selenium Cheat Sheet.md
Last active Sep 20, 2018 — forked from kenrett/Selenium Cheat Sheet.md
Selenium Cheat Sheet with Table of Contents and Header Fixes - Ruby
View Slack Emoji Ranking.js
// https://gist.github.com/g5codyswartz/3a39448d5919588fb5627ca0344fd4da
var authors = {};
var author;
$(".author_cell").each(function(i,e) {
author = $(e).text().trim();
if (!authors.hasOwnProperty(author)) authors[author] = 0;
authors[author]++
});
View SF Custom Search & Extraction.txt
===== Custom
{{
---
onot
placehold
lorem
Reputation Manger Login
istock
,
https://reputation.g5search.com/
View Gallery Export.js
@g5codyswartz
g5codyswartz / name_me_a_widget.rb
Last active Dec 31, 2015 — forked from Sillson/name_me_a_widget.rb
Output an array of widget names & locations
View name_me_a_widget.rb
class OrphanAnnie
def self.perform
lost_souls = mom_is_that_you
write_to_loggers("#{lost_souls}")
end
def self.mom_is_that_you
names = Widget.orphans.select {|i| !i.parent_widget.nil?}
web_pages = names.map {|w|
self.get_infos(w)
@g5codyswartz
g5codyswartz / Filter Locations.js
Last active Sep 28, 2015
Filters out a list of locations, great for phased builds and large clients. It also calls the location sorter after filtering out.
View Filter Locations.js
// MR Phase 1 Locations
var showLocations = [
"Broadmoor Ridge Apartment Homes",
"Candlelight Square",
"Cherry Creek Apartments",
"Cherry Lane Apartment Homes",
"Hampton Park Apartment Homes",
"Indigo Park",
"Lakeside Casitas Apartment Homes",
"Lamplight Square at The Park",
View get-down-with-down-arrows.js
/* Fixes overlap issues */
.row .down-arrow {z-index:0;}
.row .down-arrow.home-arrow {z-index:100;}
</style><script>function insertAfter(referenceNode, newNode) {
referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
console.log(referenceNode.parentNode);
}
var div = document.getElementsByClassName("row-grid");
@g5codyswartz
g5codyswartz / AddLocationInputLengthChecker.js
Created May 29, 2015
Add Location Input Length Checker
View AddLocationInputLengthChecker.js
var longInputTextLengths = 0;
var inputTextFields = $('input[type=text]');
var inputTextFieldsCount = inputTextFields.length;
$(inputTextFields).each(function() {
if($(this).val().length > 155) {
console.log(this);
console.log('^ Above element character length: '+$(this).val().length);
longInputTextLengths++;
}
@g5codyswartz
g5codyswartz / AutoPlaceholder.js
Last active Sep 28, 2015
Auto Placeholder for Liquid Variables
View AutoPlaceholder.js
// v1.3.2
// Author: Cody Swartz
// Check for stragglers like G+ input that has no place holder yet
// Then inject the place holder to bandaide it so we can handle it
// Also patch any that have incorrect placeholders
$("input[type=text][id^=widget_settings_attributes]").each(function() {
$(this).attr('placeholder', getCorrectPlaceholder(this));
});
You can’t perform that action at this time.