Skip to content

Instantly share code, notes, and snippets.

<?php get_header(); ?>
<div id="content" class="group two-col">
<div id="main-content" class="single-<?php the_ID(); ?>">
<h1> <?php the_title(); ?> </h1>
<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
<div class="single-content">
<?php the_content(); ?>
#!/bin/sh
#
# memcached Startup script for memcached processes
#
# chkconfig: - 90 10
# description: Memcache provides fast memory based storage.
# processname: memcached
# These mappings correspond one-to-one with Drupal's settings.php file.
@asanchez75
asanchez75 / workgroup
Created November 15, 2012 21:36
code
<?php
return $node->title !== '' ? $node->title : hash('md5', $node->field_subtitle[0]['value']);
?>
@asanchez75
asanchez75 / Vagrant
Created November 17, 2012 13:24
Vagrant things
troubleshooting
===========================================
http://vagrantup.com/v1/docs/troubleshooting.html
[default] -- v-root: /vagrant
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` v-root /vagrant
@asanchez75
asanchez75 / filler_constants.php
Created November 23, 2012 16:04
store constants list
<?php
/** APC-AA configuration file */
require_once "include/config.php3";
/** Main include file for using session management function on a page */
require_once AA_INC_PATH."locsess.php3";
/** Set of useful functions used on most pages */
require_once AA_INC_PATH."util.php3";
$AA_CP_Session = $_POST['AA_CP_Session'];
@asanchez75
asanchez75 / stringexpand.php
Created November 23, 2012 16:04
AA_Stringexpand_Selectbox
class AA_Stringexpand_Selectbox extends AA_Stringexpand {
function expand() {
$group_id = 'NIVELPROCESOS';
$fid = 'category.......7';
$categ = 1;
$return_url = "http://www.google.com";
$form .= '';
$form .= "<form action=\"\" method=\"post\" name=\"form-tipo-procesos\" id=\"form-tipo-procesos\">";
$form .= "<input type=hidden name=\"AA_CP_Session\" value=\"" . $AA_CP_Session . "\">";
@asanchez75
asanchez75 / tags.git
Created November 25, 2012 04:48
Git - how to tell which commit a tag points to
git show-ref --tags
============================================================================================
vagrant@lucid64:/webroot/desco/sites/all/modules/contrib/feeds_tamper$ git show-ref --tags
717152fc5766c2accbe4ace4325dfb7fa2243ac5 refs/tags/6.x-1.0-alpha1
62422f4ce4646c2e76b92e984f1ba9fe29424135 refs/tags/6.x-1.0-alpha2
6cc858d64300b9559fe54e24524d1e6ee3a9a3ab refs/tags/6.x-1.0-alpha3
36795b45ab937f7fd103b3f661bd11cb80f77312 refs/tags/6.x-1.0-alpha4
e53273634f890fc5eac9f27977d359395f3e90bd refs/tags/6.x-1.0-alpha5
@asanchez75
asanchez75 / php.inc
Created December 5, 2012 11:06
plugin for Feeds Tamper to write php code
<?php
/**
* @file
* Set field to default value.
*/
$plugin = array(
'form' => 'feeds_tamper_php_form',
'callback' => 'feeds_tamper_php_callback',
@asanchez75
asanchez75 / agrovocterm
Created December 15, 2012 13:46
agrovocterm structure
CREATE TABLE IF NOT EXISTS `agrovocterm` (
`termcode` int(11) NOT NULL DEFAULT '0',
`languagecode` varchar(2) NOT NULL,
`termspell` varchar(170) NOT NULL,
`statusid` tinyint(4) DEFAULT NULL,
`createdate` datetime DEFAULT NULL,
`frequencyiad` int(11) DEFAULT NULL,
`frequencycad` int(11) DEFAULT NULL,
`lastupdate` datetime DEFAULT NULL,
`scopeid` varchar(2) DEFAULT NULL,
@asanchez75
asanchez75 / agris_php_settings
Created December 18, 2012 16:41
agris php settings
'./configure' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '-