Skip to content

Instantly share code, notes, and snippets.

View karlosgliberal's full-sized avatar

karlos g liberal karlosgliberal

View GitHub Profile
@karlosgliberal
karlosgliberal / echoHttpRequest.js
Last active August 29, 2015 14:08 — forked from Marak/echoHttpRequest.js
Echo HTTP requests
module['exports'] = function echoHttp (hook) {
hook.debug("Debug messages are sent to the debug console");
hook.debug(hook.params);
hook.debug(hook.req.path);
hook.debug(hook.req.method);
{
"info": {
"author": "meemoo",
"title": "pattern lab",
"description": "playing with layer tile",
"parents": [
"https://gist.github.com/5540121"
],
"url": "test-layers"
},
@karlosgliberal
karlosgliberal / .json
Created December 28, 2012 11:59 — forked from anonymous/.json
{
"info": {
"author": "meemoo",
"title": "Untitled",
"description": "Meemoo app description",
"parents": [],
"url": ""
},
"nodes": [
{
@karlosgliberal
karlosgliberal / vlcrc.js
Created October 8, 2011 20:10 — forked from garth/vlcrc.js
Remote control multiple VLC apps via the command line using nodejs
// To start vlc with telnet remote control:
// ./VLC --extraintf rc --rc-host 0.0.0.0:3000
//
// To connect to multiple vlc's
// node vlcrc.js host1:3000 host2:3000
var net = require('net');
var readline = require('readline');
//addresses of servers
@karlosgliberal
karlosgliberal / nodejs-rfid.js
Created June 16, 2011 07:16 — forked from basham/nodejs-rfid.js
Use NodeJS to read RFID ids through the USB serial stream.
/*
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
<?php if ($submitted): ?>
<span class="submitted"><?php echo format_date($node->created, 'custom', 'd M Y') ?></span>
<?php endif; ?>
<?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 ') {
grep "10/Dec/2009:12" access.www | awk '{print $7}'
<?
/**
* 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']){