Skip to content

Instantly share code, notes, and snippets.

View Quevin's full-sized avatar

Kevin Davison Quevin

View GitHub Profile
@Quevin
Quevin / ballot.sol
Created June 11, 2018 15:30
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity ^0.4.0;
contract Ballot {
struct Voter {
uint weight;
bool voted;
uint8 vote;
address delegate;
}
struct Proposal {
@Quevin
Quevin / ballot.sol
Created June 10, 2018 17:47
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity ^0.4.0;
contract Ballot {
struct Voter {
uint weight;
bool voted;
uint8 vote;
address delegate;
}
struct Proposal {
@Quevin
Quevin / ballot.sol
Created June 10, 2018 17:40
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity ^0.4.0;
contract Ballot {
struct Voter {
uint weight;
bool voted;
uint8 vote;
address delegate;
}
struct Proposal {
@Quevin
Quevin / yamlform-notices.txt
Created January 6, 2017 18:02
Notice on /admin/structure/yamlform/manage/advertising_webform/settings
Notice: Undefined index: default_form_disable_back in Drupal\yamlform\YamlFormEntitySettingsForm->form() (line 256 of modules/contrib/yamlform/src/YamlFormEntitySettingsForm.php).
Drupal\yamlform\YamlFormEntitySettingsForm->form(Array, Object) (Line: 115)
Drupal\Core\Entity\EntityForm->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 514)
Drupal\Core\Form\FormBuilder->retrieveForm('yamlform_settings_form', Object) (Line: 271)
Drupal\Core\Form\FormBuilder->buildForm('yamlform_settings_form', Object) (Line: 74)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 574)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
@Quevin
Quevin / yamlform-warnins.txt
Last active January 6, 2017 18:03
yamlform/settings warnings to patch
Warning: array_diff(): Argument #2 is not an array in Drupal\yamlform\Form\YamlFormAdminSettingsForm->buildForm() (line 393 of modules/contrib/yamlform/src/Form/YamlFormAdminSettingsForm.php).
Drupal\yamlform\Form\YamlFormAdminSettingsForm->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 514)
Drupal\Core\Form\FormBuilder->retrieveForm('yamlform_admin_settings_form', Object) (Line: 271)
Drupal\Core\Form\FormBuilder->buildForm('yamlform_admin_settings_form', Object) (Line: 74)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 574)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
@Quevin
Quevin / HtmlEscapedText-error.txt
Created January 6, 2017 16:55
AddToAny text field with ER token for image URL ERROR
The website encountered an unexpected error. Please try again later.
Recoverable fatal error: Object of class Drupal\Core\Url could not be converted to string in Drupal\Component\Render\HtmlEscapedText->__construct() (line 32 of core/lib/Drupal/Component/Render/HtmlEscapedText.php).
Drupal\Component\Render\HtmlEscapedText->__construct(Object) (Line: 204)
Drupal\Core\Utility\Token->replace('
<a class="a2a_button_facebook"></a>
<a class="a2a_button_twitter"></a>
<a class="a2a_button_google_plus"></a>
<a class="a2a_button_linkedin"></a>
<a class="a2a_button_pinterest" data-media="[node:field_media_image_collection_ref:0:entity:url]" data-description=""></a>
', Array) (Line: 250)

Keybase proof

I hereby claim:

  • I am Quevin on github.
  • I am quevin (https://keybase.io/quevin) on keybase.
  • I have a public key whose fingerprint is 9418 515C 7E3D 16ED 6EB7 DEB1 0C54 151E 1F12 F685

To claim this, I am signing this object:

div[about]:before {
content: '1st BEAN: ' attr(about);
color: lime;
}
div[about] div[about]:before {
content: '2nd BEAN: ' attr(about);
color: yellow;
}
@Quevin
Quevin / new_gist_file_0
Created October 8, 2015 20:47
Facebook campaigns
sunpower@web-8753:/mnt/log/sites/sunpower/logs/web-8753$ cut -f 2 -d '"' access.log|cut -f 2 -d ' '|sort|uniq -c|sort -nr|more
4669 /home-solar/residential-solar-power-system-cost/?cid=T_M_Facebook_072415__Q3-2015-Air-Cover___FBX-Solar-Savings-More-Powerful-Solar&ec_id=70134000001JeoO
3985 /home-solar/residential-solar-power-system-cost/?cid=T_M_Facebook_072415__Q3-2015-Air-Cover___FBX-Solar-Savings-Save-with-SunPower&ec_id=70134000001JeoO
1694 /
932 /home-solar/residential-solar-power-system-cost?cid=T_M_Facebook_072415__Q3-2015-Air-Cover___FBX-Solar-Savings-More-Powerful-Solar&ec_id=70134000001JeoO
816 /home-solar/residential-solar-power-system-cost?cid=T_M_Facebook_072415__Q3-2015-Air-Cover___FBX-Solar-Savings-Save-with-SunPower&ec_id=70134000001JeoO
301 /colorbox/home-solar/b2c-form-b/
212 /home-solar/residential-solar-power-system-cost/?cid=T_M_Facebook_072415__Q3-2015-Air-Cover___FB-Newfeed-Outperformance-4&ec_id=70134000001Jeos
161 /solar-panels-technology/x-series-solar-pa
@Quevin
Quevin / entity_translation_update_70xx.php
Last active August 29, 2015 14:25
hook_update_N() for entity_translation
/**
* First, manually disable translation on the title field.
* This script copies title from limbo back into the node.
* See https://www.drupal.org/node/2107829#comment-8132759.
*/
function entity_translation_update_7021() {
// Why aren't we using db_query/select here?
$nodes = array();