Skip to content

Instantly share code, notes, and snippets.


Daniel Primo delineas

View GitHub Profile
delineas / sample.sol
Created Dec 10, 2018
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at
View sample.sol
pragma solidity >=0.4.22 <0.6.0;
contract SampleContract {
uint storageData;
function set(uint x) public {
storageData = x;
function get() public view returns (uint) {
return storageData;
delineas /
Created Nov 12, 2018
#desafíoPython Scraping data oneliners
for programs in resource.findAll("div", {"class": ["modulo-type-programa"]}):
'title': ["%s" % name.attrs['content'] for name in'meta[itemprop="name"]')][0],
'description': ["%s" % desc.attrs['content'] for desc in'meta[itemprop="description"]')][0],
'url': ["%s" % url.attrs['content'] for url in'meta[itemprop="url"]')][0],
'episodes': ["%s" % micro.getText().strip() for micro in'.microphone')][0]
View 2018_11_05_170704_add_hash_id_fields_users_table.php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddHashIdFieldsUsersTable extends Migration
* Run the migrations.
delineas / app.js
Created Oct 31, 2018
Vee-Validate Vue User
View app.js
import VeeValidate from "vee-validate";
import Axios from "axios";
VeeValidate.Validator.extend("unique", {
getMessage: field => "Ya existe un usuario con este e-mail",
validate: value => {
if (value) {
View react.html
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js">
<meta charset="utf-8">


Work is done within a feature branch created from master. You've incrementally gotten the feature branch working as expected; however, you'd prefer to re-organize your commits so that you can better reason about the changes.


Let's create a new repository in order to set the stage:

 % mkdir repo
 % cd repo
 % git init
delineas / drupal8-links.php
Created Jul 24, 2018 — forked from colorfield/drupal8-links.php
Drupal 8 links, or where is my l() function
View drupal8-links.php
delineas / TermBreadcrumbBuilder.php
Created Jul 16, 2018 — forked from eeeschwartz/TermBreadcrumbBuilder.php
Load breadcrumbs from a Drupal 8 node's taxonomy term
View TermBreadcrumbBuilder.php
* @file
* Contains \Drupal\taxonomy\TermBreadcrumbBuilder.
namespace Drupal\taxonomy;
use Drupal\Core\Breadcrumb\BreadcrumbBuilderInterface;
View Drupal 8 loop entity reference fields.twig
Twig coding standards
Filters - Modifying Variables In Twig Templates
{% for i, value in content.field_app_prod_toggle_products %}
{% if node.field_app_prod_toggle_products[i].entity %}
{% if i == 0 %}
You can’t perform that action at this time.