Skip to content

Instantly share code, notes, and snippets.

View zpalexander's full-sized avatar

Zach Alexander zpalexander

View GitHub Profile
@zpalexander
zpalexander / .bash_profile
Created April 15, 2017 18:50
Bash Profile
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
export NVM_DIR="$HOME/.nvm"
. "$(brew --prefix nvm)/nvm.sh"
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".
# If you want to allow non-ASCII filenames set this variable to true.
@zpalexander
zpalexander / gist:ac1134f04ad164ceb5c6
Created October 6, 2015 21:08
Click Listener for Webview
// Set the click listener for opening the slideshow
final int j = i;
slide.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(getActivity(), SlideshowWebview.class);
intent.putExtra("slideshowURL", cards[j].slideshowURL.toString());
intent.putExtra("slideshowTitle", cards[j].title.toString());
startActivity(intent);
}
# Search API Notes
[Project on drupal.org](https://www.drupal.org/project/search_api):
>This module provides a framework for easily creating searches on any entity known to Drupal, using any kind of search engine. For site administrators, it is a great alternative to other search solutions, since it already incorporates facetting support and the ability to use the Views module for displaying search results, filters, etc. Also, with the Apache Solr integration, a high-performance search engine is available for this module.
>Developers, on the other hand, will be impressed by the large flexibility and numerous ways of extension the module provides. Hence, the growing number of additional contrib modules, providing additional functionality or helping users customize some aspects of the search process.
### Use
***Basic:***
1. Go to `Configuration -> Search API` and create a server (name, description, service class)
2. Go to `Configuration -> Search API` and create an index (choose what to index and attach it to
@zpalexander
zpalexander / Page
Created February 13, 2014 21:32
Virtual Trip Booking Form
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="virtual-booking-style.css">
</head>
<body>
<div class="virtual-booking">
<h4>Online Inquiry</h4>
<div class="form-wrapper">
<form method="post" target="" action"">
@zpalexander
zpalexander / gist:8713052
Created January 30, 2014 16:50
K'Dee VarDump Entire
Notice: Trying to get property of non-object in /srv/www/clients/kdee-miller/wordpress/wp-includes/nav-menu-template.php on line 148
array(17) {
[0]=>
array(5) {
["function"]=>
string(8) "start_el"
["class"]=>
string(15) "Walker_Nav_Menu"
-- phpMyAdmin SQL Dump
-- version 3.5.7
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 22, 2013 at 04:17 PM
-- Server version: 5.5.29
-- PHP Version: 5.4.10
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";