Skip to content

Instantly share code, notes, and snippets.

View cameck's full-sized avatar
🍩
(ॢ◕ัڡ ◕ั ॢ)

Cameron Eckelberry cameck

🍩
(ॢ◕ัڡ ◕ั ॢ)
View GitHub Profile
// Replace header hook to include slider
remove_action( 'genesis_header', 'genesis_do_header' );
add_action( 'genesis_header', 'genesis_do_new_header' );
function genesis_do_new_header() {
//add your custom slider shortcode here:
echo do_shortcode('[rev_slider alias="main"][/rev_slider]');
if ( is_active_sidebar( 'header-right' ) || has_action( 'genesis_header_right' ) ) {
echo '<div class="widget-area">';
/*Slider Fix*/
.cafe-pro-home .site-header .wrap {
padding: 0;
}
$('.front-page-header') .css({'height': newHeight +'px'});
/*
Theme Name: Jupiter Child Theme
Theme URI: http://themeforest.net/user/artbees
Description: Child theme for the Jupiter theme
Author: Cameron
Theme URI: http://themeforest.net/user/artbees
Template: jupiter
Version: 5.0.5
*/
<?php
/**
* This file adds the Home Page to the Cafe Pro Theme.
*
* @author StudioPress
* @package Cafe
* @subpackage Customizations
*/
add_action( 'genesis_meta', 'cafe_home_genesis_meta' );
@cameck
cameck / functions.php
Last active March 29, 2016 23:32
Cancel Constant Contact Subscription if User does not Check the sign up box on more than one form.
<?php
function disable_newsletter_signup( $form_id ) {
global $ninja_forms_processing;
$form_id = $ninja_forms_processing->get_form_ID();
if ( $form_id == 1 || $form_id == 2 || $form_id == 3 ) {
switch ($form_id) {
case 1: //Form 1
$opt_in = $ninja_forms_processing->get_field_value( 32 );
break;
# Hostage! A Terminal based interactive Choose Your Own Adventure Game (All sounds from http://soundbible.com & http://www.freesound.org/)
# Download the audio files here: https://www.dropbox.com/sh/d4h5f36nwy4pw3j/AADjkh_ZLf9PK8cltX8ZUahTa?dl=0
# Once downloaded them place them in a folder named "audio" in the same directory as this game and start playing!
# variables
invalid_entry = "INVALID ENTRY TRY AGAIN"
thanks = "\nThanks for Playing! 👏 👏 👏 👏"
meet_cortana1 = "Upon entering the Cortana’s study, he smiles. As he open’s his mouth to speak..."
meet_cortana2 = "the room erupts in flames.🔥 🔥 🔥\nNorth Korea finally launched a successful ballistic missile. 🚀️"
hr = "______________________________________________________________________________"
@cameck
cameck / person.rb
Created April 11, 2016 01:16
#This is a REPL directory creator for a mock Voting database. #It allows you to use all aspects of CRUD.
class Person
attr_accessor :name
def initialize(name)
@name = name
end
end
@cameck
cameck / index.html
Last active April 15, 2016 03:10
The Holy Grail of Layouts with Flex Box
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>This is the Holy Grail</title>
<link rel="stylesheet" href="css/styles.css" />
</head>
<body>
<header>This is my header</header>
@cameck
cameck / script.js
Created May 6, 2016 23:37
Scripts for the Loneliest Chat room
$(document).ready(function(){
var newChat = function() {
var author = ["Me", "Myself", "I"];
var randomNumber = Math.floor(Math.random() * 3);
var time = new Date();
time = time.getHours() + ":" + time.getMinutes() + ":" + time.getSeconds();
console.log(time);
var newMessage = $('#new-message-body').val();