This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//tiene mas peligro que una escopeta de feria pero yo que se por guardarlo todo como las urracas | |
global $user; | |
$type = 'garden'; | |
$node = array('uid' => $user->uid, 'name' => $user->name, | |
'type' => $type); | |
module_load_include('inc', 'node', 'node.pages'); | |
$form = drupal_get_form($type .'_node_form', $node); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// sacado de este snipsets y cambiado las | |
//rutas de osc para que pille | |
//el programa andorid osc. | |
import processing.opengl.*; | |
import oscP5.*; | |
OscP5 oscP5; | |
float xrot = 0; | |
float zrot = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select channel.title, channel.link, channel.item.title, channel.item.link, channel.item.description, channel.item.guid | |
from xml where url in( 'http://karlosgliberal.investic.net/blog/feed', 'http://miren.investic.net/blog/feed') and channel.item.title like "%post%" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#wget para hacer cron con user agent definido | |
wget --user-agent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6" http://devinvestic.com/cron.php > /dev/null 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
/** | |
* Implementation of hook_nodeapi(). | |
* Drupal Crear dos nodos con un campo en comun | |
*/ | |
function sorteo_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) { | |
switch ($op) { | |
case 'insert': | |
//crear dos nodos de quiz relacionados por su campo de nid | |
if($node->type == 'quiz' && !$node->field_identificador[0]['value']){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep "Dec 10 10:" error.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep "10/Dec/2009:12" access.www | awk '{print $7}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implementation of hook_views_query_alter(). | |
*/ | |
function modulename_views_query_alter(&$view, &$query) { | |
if ($view->name == 'viewname') { | |
$type_clause = FALSE; | |
// check to see if we already have a node.type clause | |
foreach ($query->where[0]['clauses'] as $clause) { | |
if (substr(0, 10, $clause) == 'node.type ') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ($submitted): ?> | |
<span class="submitted"><?php echo format_date($node->created, 'custom', 'd M Y') ?></span> | |
<?php endif; ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
DESCRIPTION | |
----------- | |
Use NodeJS to read RFID ids through the USB serial stream. Code derived from this forum: | |
http://groups.google.com/group/nodejs/browse_thread/thread/e2b071b6a70a6eb1/086ec7fcb5036699 | |
CODE REPOSITORY | |
--------------- | |
https://gist.github.com/806605 |
OlderNewer