This accepts views arguments as well:
{{ drupal_view('who_s_new', 'block_1') }}
{{ drupal_view('who_s_new', 'block_1' 'contextarg1', 'contextarg2', '...') }}
pragma solidity 0.5.11; | |
contract Deposits { | |
event Deposited(address indexed payee, uint256 weiAmount); | |
event Withdrawn(address indexed payee, uint256 weiAmount); | |
function deposit() public payable { | |
emit Deposited(msg.sender, msg.value); | |
} |
/* | |
This exercise has been updated to use Solidity version 0.5 | |
Breaking changes from 0.4 to 0.5 can be found here: | |
https://solidity.readthedocs.io/en/v0.5.0/050-breaking-changes.html | |
*/ | |
pragma solidity ^0.5.0; | |
contract SimpleBank { |
//Files should be `644` I think | |
find . -type f -exec chmod u=rw,g=r,o=r {} \; | |
// Folders should be `executable | |
find . -type d -exec chmod u=rwx,g=rx,o=rx {} \; |
<?php | |
/** | |
* @file | |
* Add entities from Content Hub to the Import Queue. | |
* | |
* Please locate this field in the 'scripts' directory as a sibling of docroot: | |
* <DOCROOT>/../scripts/ach-bulk-import.php | |
* | |
* To run the script, execute the drush command: | |
* $drush scr ../scripts/ach-bulk-import.php |
# Lando version is at least +3.0 | |
name: drupal-nine | |
recipe: drupal9 | |
services: | |
appserver: | |
webroot: web | |
xdebug: debug | |
config: | |
php: .vscode/php.ini |
Solidity lets you program on Ethereum, a blockchain-based virtual machine that allows the creation and execution of smart contracts, without needing centralized or trusted parties. | |
Solidity is a statically typed, contract programming language that has similarities to Javascript and C. Like objects in OOP, each contract contains state variables, functions, and common data types. Contract-specific features include modifier (guard) clauses, event notifiers for listeners, and custom global variables. | |
Some Ethereum contract examples include crowdfunding, voting, and blind auctions. | |
As Solidity and Ethereum are under active development, experimental or beta features are explicitly marked, and subject to change. Pull requests welcome. | |
// First, a simple Bank contract | |
// Allows deposits, withdrawals, and balance checks | |
// simple_bank.sol (note .sol extension) | |
/* **** START EXAMPLE **** */ |
<?php | |
/** | |
* This file should live at my_module/src/EventSubscriber/ResponseSubscriber.php | |
*/ | |
namespace Drupal\my_module\EventSubscriber; | |
use Symfony\Component\EventDispatcher\EventSubscriberInterface; | |
use Symfony\Component\EventDispatcher\Event; |
This pre-commit hook is designed to be used for Drupal 7 and 8 sites.
Download the pre-commit file. Save it as .git/hook/pre-commit in your git repo. You need to ensure that the file is executable.
If you want this to be added to all new projects automatically, add it to your git init templates.
To install and PHP CodeSniffer for Drupal, please read the official documentation.
To see this working checking out this short YouTube video.
// Get element offset from top of page | |
function getOffset(el) { | |
el = el.getBoundingClientRect(); | |
return { | |
left: el.left + window.scrollX, | |
top: el.top + window.scrollY | |
}; | |
}; |