Skip to content

Instantly share code, notes, and snippets.

View sirkitree's full-sized avatar

Jerad Bitner sirkitree

View GitHub Profile
@sirkitree
sirkitree / memcached
Created July 27, 2010 20:23
memcached
#! /bin/sh
#
PORT=11211
USER=nobody
MAXCONN=1024
OPTIONS=""
DAEMON=/usr/bin/memcached
RETVAL=0
@sirkitree
sirkitree / Starter Drush Make
Created July 28, 2010 18:01 — forked from q0rban/Starter Drush Make
Starter Drush Make
core = 6.x
projects[pressflow][type] = "core"
projects[pressflow][download][type] = "get"
projects[pressflow][download][url] = "http://launchpad.net/pressflow/6.x/6.17.83/+download/pressflow-6.17.83.tar.gz"
; INSTALL PROFILES
projects[profiler] = 1.0
; DEVELOPMENT
@sirkitree
sirkitree / Simple panels 'block' (php, drupal, panels)
Created August 20, 2010 14:54
Simple panels 'block' (php, drupal, panels) #
<?php
/**
* Plugins are described by creating a $plugin array which will be used
* by the system that includes this file.
*/
$plugin = array(
'title' => t('Work Wizard Menu'),
'description' => t('This is the menu for the work wizard.'),
'single' => TRUE,
'content_types' => array('work_wizard_menu'),
@sirkitree
sirkitree / gist:660167
Created November 2, 2010 19:42
branch indicator in your PS1
##############
## Bash prompt
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
function proml {
local BLUE="\[\033[0;34m\]"
local RED="\[\033[0;31m\]"
local LIGHT_RED="\[\033[1;31m\]"
@sirkitree
sirkitree / gist:795807
Created January 25, 2011 22:20
Panels flexible layout markup
<div class="panel-flexible panels-flexible-homepage clear-block" id="home">
<div class="panel-flexible-inside panels-flexible-homepage-inside">
<div class="panels-flexible-row panels-flexible-row-homepage-1 panels-flexible-row-first clear-block header">
<div class="inside panels-flexible-row-inside panels-flexible-row-homepage-1-inside panels-flexible-row-inside-first clear-block">
<div class="panels-flexible-region panels-flexible-region-homepage-header panels-flexible-region-first panels-flexible-region-last header-region">
<div class="inside panels-flexible-region-inside panels-flexible-region-homepage-header-inside panels-flexible-region-inside-first panels-flexible-region-inside-last">
</div>
</div>
</div>
</div>
@sirkitree
sirkitree / gist:795811
Created January 25, 2011 22:21
Panels flexible layout converted to theme layout include
<div class="panel-display diwd2011-homepage clearfix" id="home">
<div class="panel-header">
<div class="panel-header-inner inside panel-panel">
</div>
</div>
<div class="panel-post-header">
<div class="panel-post-header-left inside panel-panel">
</div>
@sirkitree
sirkitree / vbo-code
Created February 23, 2011 22:09
hook_user_operations *csv*
<?php
/**
* Implementation of hook_node_operations().
*/
function user_export_user_operations() {
return array(
'export' => array(
'label' => t('Export to CSV'),
'callback' => 'user_export_csv',
@sirkitree
sirkitree / escape.php
Created July 10, 2011 15:08
Escaping from HTML
<html>
<body>
<p>This is an example of escaping HTML and placing a little PHP in the mix!</p>
<?php print "<p>I'm being printed from PHP!!</p>"; ?>
<p>I can also get a little extra credit by using a little logic!</p>
<?php
// Set our variable.
@sirkitree
sirkitree / strings.php
Created July 28, 2011 02:11 — forked from toddota/strings.php
PHP Learning
<html>
<body>
<p> Jeff Buckley is playing on the radio, and I like it. </p>
<p> It's John's birthday. He's so old! </p>
<?php print "Jerad said, \"Awesome!\" in response to my last assignment."; ?>
@sirkitree
sirkitree / strings.php
Created August 24, 2011 04:42
Strings & Variables
<?php
// The following sentence in quotes is a basic string that is printed to the screen.
print "Hi, I am proud!";
// You can assign a string to a variable for storage and then print the variable.
$sentence = "Hi, I am proud!";
print $sentence;
// You can combine strings in various ways using the period (.) for concatenation.