Skip to content

Instantly share code, notes, and snippets.

View sherakama's full-sized avatar
💭
🇨🇦 Working from home

Sherakama sherakama

💭
🇨🇦 Working from home
View GitHub Profile
@sherakama
sherakama / multiple-values-xpath.php
Created April 24, 2014 15:43
Feeds Importer X-Path Sub Selector
<?php
/**
* @file
* Feeds Tamper Plugin
* Provides a sub xpath selector for parsing xml for field collections with
* multiple value fields.
*/
/**
* Plugin definition
@sherakama
sherakama / multi_keyword_filter_plugin.inc
Created May 6, 2014 15:15
Feeds tamper plugin for multiple keywords.
<?php
/**
* @file
* Filter based on a list of words/phrases.
* This file is a copy of the default keyword_filter plugin except it has been
* modified to work with an array of values as well as single strings.
*/
$plugin = array(
@sherakama
sherakama / drush.rb
Created August 21, 2015 23:39
brew install drush 7.0-dev
require File.expand_path("/usr/local/Library/Taps/homebrew/homebrew-php/Requirements/php-meta-requirement", __FILE__)
class Drush < Formula
desc "A command-line shell and scripting interface for Drupal"
homepage "https://github.com/drush-ops/drush"
url "https://github.com/drush-ops/drush/archive/7.x.tar.gz"
sha1 "6e648c6056a6a6d738ad5665ce842083b22e7e61"
version "7.0-dev"
head do
@sherakama
sherakama / save_images.rb
Last active September 17, 2015 22:56
Pass ignore options to phantom.js for wraith when SSL cert is self signed or not working.
# OSX path: /Library/Ruby/Gems/2.0.0/gems/wraith-2.6.0/lib/wraith/save_images.rb
require "wraith"
require "parallel"
require "shellwords"
class Wraith::SaveImages
attr_reader :wraith, :history, :meta
def initialize(config, history = false)
@sherakama
sherakama / Delete these
Created September 14, 2015 21:34
Remove these
Github cleanup. Anyone object to deleting these repositories:
https://github.com/SU-SWS/stanford_baseline_roles
https://github.com/SU-SWS/stanford_ownership
https://github.com/SU-SWS/stanford_spotlight
https://github.com/SU-SWS/stanford_document
https://github.com/SU-SWS/stanford_display_categories
https://github.com/SU-SWS/stanford_article
https://github.com/SU-SWS/stanford_thesis_importer
https://github.com/SU-SWS/stanford_thesis_views
https://github.com/SU-SWS/stanford_person_views_english
@sherakama
sherakama / .bashrc
Last active November 18, 2015 19:21
.bashrc file
export PATH=${PATH}:/usr/local/sbin
export PATH=/usr/local/bin:${PATH}
export PATH=${PATH}:~/bin
export PS1="\u:\w$ "
# alias composer="php /usr/bin/composer.phar"
alias ppp="php app/console"
alias chrome='open -n -a "Google Chrome.app" --args --auth-server-whitelist="*.stanford.edu" --auth-negotiate-delegate-whitelist="*.stanford.edu"'
@sherakama
sherakama / my.cnf
Last active November 21, 2015 00:01
my.cnf for large sites
# The MySQL server
[mysqld]
key_buffer_size = 384M
max_allowed_packet = 32M
sort_buffer_size = 8M
read_buffer_size = 8M
read_rnd_buffer_size = 64M
myisam_sort_buffer_size = 64M
query_cache_size = 32M
@sherakama
sherakama / stanford_jumpstart-css.patch
Created March 15, 2016 20:00
stanford_jumpstart-css.patch
diff --git a/modules/stanford_jumpstart_wysiwyg/stanford_jumpstart_wysiwyg.module b/modules/stanford_jumpstart_wysiwyg/stanford_jumpstart_wysiwyg.module
index 6e1303c..fcdf43d 100644
--- a/modules/stanford_jumpstart_wysiwyg/stanford_jumpstart_wysiwyg.module
+++ b/modules/stanford_jumpstart_wysiwyg/stanford_jumpstart_wysiwyg.module
@@ -23,7 +23,7 @@ function stanford_jumpstart_wysiwyg_wysiwyg_editor_settings_alter(&$settings, $c
$theme_default = variable_get('theme_default');
switch ($theme_default) {
case 'open_framework' :
- $settings['contentsCss'][] = url(drupal_get_path('theme', 'open_framework') . '/bootstrap/css/bootstrap.css');
+ $settings['contentsCss'][] = url(drupal_get_path('theme', 'open_framework') . '/packages/bootstrap-2.3.1/css/bootstrap.css');
@sherakama
sherakama / jsa-layouts-no-webauth.patch
Created March 15, 2016 21:02
Urban Studies JSA Layouts Patch file for build
diff --git a/modules/stanford_jsa_layouts/stanford_jsa_layouts.info b/modules/stanford_jsa_layouts/stanford_jsa_layouts.info
index 329b14a..5ff5f14 100644
--- a/modules/stanford_jsa_layouts/stanford_jsa_layouts.info
+++ b/modules/stanford_jsa_layouts/stanford_jsa_layouts.info
@@ -15,7 +15,6 @@ dependencies[] = search
dependencies[] = stanford_events_importer
dependencies[] = stanford_publication
dependencies[] = views
-dependencies[] = webauth
features[context][] = 9-col-banner-fsb-homepage
@sherakama
sherakama / vhosts-laptop.conf
Last active May 3, 2016 17:11
vhosts for *.dev domain
#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>