Skip to content

Instantly share code, notes, and snippets.

View zroger's full-sized avatar
💾
compiling...

Roger López zroger

💾
compiling...
View GitHub Profile
@zroger
zroger / index.html
Last active May 11, 2019 20:57
Log tailing w/ React + IntersectionObserver
<div id="root"></div>

Keybase proof

I hereby claim:

  • I am zroger on github.
  • I am zroger (https://keybase.io/zroger) on keybase.
  • I have a public key whose fingerprint is BBC5 8877 B916 815B F368 30CE B29A 13ED C0C8 3B96

To claim this, I am signing this object:

import time
import tornado.gen
import tornado.ioloop
@tornado.gen.coroutine
def coify(fn, *args):
raise tornado.gen.Return(fn(*args))
@zroger
zroger / httpd.conf
Created July 13, 2013 14:58
Minimal httpd.conf for running apache in the foreground for local php development.
#
# Minimal httpd.conf for running apache in the foreground for local php
# development.
#
# Setup:
# 1. Place this file in the root of your project.
# 2. Make sure the ./tmp directory exists (for the pid and lock files).
# 3. Update the DocumentRoot and Directory directives with the relative path to
# your project's document root.
#
@zroger
zroger / faker.php
Last active December 15, 2015 07:09
Gist for use on Phase2 blog.
<?php
/**
* @file example.faker.inc
*/
/**
* Implements hook_faker_node_generate().
*/
function example_faker_node_generate($node, $faker) {
### Generated by rprotoc. DO NOT EDIT!
### <proto file: test/proto/addressbook_ext.proto>
# import "test/proto/addressbook_base.proto";
# package tutorial_ext;
#
# extend Person {
# optional int32 age = 100;
# }
require 'protobuf/message/message'
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_common/includes/templates.inc b/drupal-7.9/sites/lamer/modules/custom/lm_common/includes/templates.inc
index bcecff4..12aff64 100644
--- a/drupal-7.9/sites/lamer/modules/custom/lm_common/includes/templates.inc
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_common/includes/templates.inc
@@ -129,7 +129,7 @@ function lm_common_get_templates($path) {
'content' => $path . '/hp_basic_mobile_v1/hp_basic_mobile_v1.html',
'tags' => array('contenttype-page', 'device-mobile'),
'inputs' => array(
- 'image' => array(
+ 'background_image' => array(
When I go to "/node/add"
And follow "Campaign"
And should see "Create Campaign"
And fill in "Campaign Name" with "Test campaign [autotest]"
And fill in "field_layout[und][0][template_fields][inputs][content_fields][vertical_tabs][0][fieldset][top][textarea][value]" with "Campaign banner text here"
And attach the file "misc/arrow-asc.png" to "files[field_image_und_0]"
And select "autotest_donation_basic: Test donation product [autotest]" from "field_donation_product[und]"
And uncheck "path[pathauto]"
And fill in "path[alias]" with "autotest-campaign"
And press "Save"
And there is a node with the following settings
| node setting | value |
| title | Foobar - Test page for keyword search |
| type | page |
| language | en-ECOM |
c01dcbc1 (Neil Hastings 2012-07-10 13:10:09 -0400 221) function _elc_common_get_cached_value($type, $key, $default_value = '', $new_value = NULL) {
c01dcbc1 (Neil Hastings 2012-07-10 13:10:09 -0400 222) $data = &drupal_static(__FUNCTION__, array());
c01dcbc1 (Neil Hastings 2012-07-10 13:10:09 -0400 223)
f9c69b8e (Neil Hastings 2012-07-10 18:28:09 -0400 224) $type = str_replace("/", "-", $type);
f9c69b8e (Neil Hastings 2012-07-10 18:28:09 -0400 225) $key = str_replace("/", "-", $key);
a2ff580f (Tim Cosgrove 2012-07-26 15:10:32 -0700 226) global $theme;
19474c32 (Tim Cosgrove 2012-07-30 12:16:28 -0700 227) $request_context = elc_domain_get_request_context();
19474c32 (Tim Cosgrove 2012-07-30 12:16:28 -0700 228) $host = $request_context->host;
f9c69b8e (Neil Hastings 2012-07-10 18:28:09 -0400 229)
c01dcbc1 (Neil Hastings 2012-07-10 13:10:09 -0400 230) if (isset($new_value)) {