Skip to content

Instantly share code, notes, and snippets.

View chrisjlee's full-sized avatar
💭
🏈

Chris J. Lee chrisjlee

💭
🏈
View GitHub Profile
@chrisjlee
chrisjlee / 2012dcdenver-pcicompliance.txt
Created March 21, 2012 21:55
Denver Drupalcon 2012 - PCI compliance with vordude (notes)
* qsa - qualified security assessor
Hartland Data breach
- law suits
- example of unauthorized access to credit card data
Costs of data breach
- Law suites
- reputation
@chrisjlee
chrisjlee / 2012dcdenver-entitiesfago.txt
Created March 21, 2012 23:30
Drupalcon Denver 2012 - store your data with entities
Drupal 7
- example bundles
- node type
- vocabulary
What are entities
- drupal commerce entity / product display
- organic groups
- profile2
@chrisjlee
chrisjlee / createdesktop.sh
Created March 22, 2012 02:29
ubuntu 11.10 - create desktop icon
#!/bin/bash
#install gnome panel if needed
sudo apt-get install --no-install-recommends gnome-panel
#create an icon on to the desktop - pops up interface to do so
sudo gnome-desktop-item-edit --create-new ~/Desktop
@chrisjlee
chrisjlee / aptanastudio3.desktop
Created March 22, 2012 02:30
Aptana Launcher icon - change paths if needed
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_US]=/opt/AptanaStudio3/icon.xpm
Name[en_US]=AptanaStudio3
Exec=/opt/AptanaStudio3/AptanaStudio3
Name=AptanaStudio3
@chrisjlee
chrisjlee / 2012dcdenver-stevefrancia-mongodb.txt
Created March 22, 2012 17:44
drupalcon denver 2012 - steve francia mongodb
mongodb - steve francia from 10gen (new york co)
uses native storage methods
useful for large storage
example blog
- mongo db using php
- mongodb doesn't need to convert to array
- just pass to connection object with array to collection object
- memcache -> query one dimension
@chrisjlee
chrisjlee / drushrc.php
Created March 28, 2012 20:38
drushrc.php - preferred drushrc.php file
<?php
/**
* Examples of valid statements for a Drush runtime config (drushrc) file.
* Use this file to cut down on typing out lenghty and repetetive command line
* options in the Drush commands you use and to avoid mistakes.
*
* Rename this file to drushrc.php and optionally copy it to one of the places
* listed below in order of precedence:
*
@chrisjlee
chrisjlee / drushinstall.sh
Created April 2, 2012 15:04
Bash script to install drush into your user folder on Ubuntu
#!/bin/bash
# Install dependencies
function base_install {
sudo apt-get -y install git-all unzip curl php5-cli php5-gd
}
# Clone Drush and place in user folder
function drush_install {
cd /tmp && git clone --branch 7.x-5.x http://git.drupal.org/project/drush.git /home/$user/.drush/drush
@chrisjlee
chrisjlee / 960gs.scss
Created April 4, 2012 02:51 — forked from jmblog/960gs.scss
960gs.scss
/*-----------------------------------------------------
960 Grid System ~ Core CSS.
Learn more ~ http://960.gs/
Licensed under GPL and MIT.
-------------------------------------------------------*/
/* Grid Settings
---------------------------*/
// 12-column grid
@chrisjlee
chrisjlee / .my.cnf
Created April 4, 2012 16:13
using .my.cnf to set a password for the user to allow automatic login
[client]
user = DBUSERNAME
password = DBPASSWORD
host = DBSERVER
[mysql]
database = DBNAME
@chrisjlee
chrisjlee / fix-permissions.sh
Created May 17, 2012 16:15
Permissions script for drupal - fixes the permissions of any drupal install automatically!
#!/bin/bash
# From: http://drupal.org/node/244924
path=${1%/}
user=${2}
group="www-data"
help="\nHelp: This script is used to fix permissions of a drupal installation\nyou need to provide the following arguments:\n\t 1) Path to your drupal installation\n\t 2) Username of the user that you want to give files/directories ownership\nNote: \"www-data\" (apache default) is assumed as the group the server is belonging to, if this is different you need to modify it manually by editing this script\n\nUsage: (sudo) bash ${0##*/} drupal_path user_name\n"
if [ -z "${path}" ] || [ ! -d "${path}/sites" ] || [ ! -f "${path}/modules/system/system.module" ]; then
echo "Please provide a valid drupal path"
echo -e $help