One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"type": "object", | |
"title": "Components", | |
"description": "", | |
"components": { | |
"product-porfolio": { | |
"type": "object", | |
"title": "Product Portfolio", | |
"description": "", |
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"type": "object", | |
"title": "Product Portfolio", | |
"description": "", | |
"properties": { | |
"layout": { | |
"type": "object", | |
"title": "Layout & background", | |
"options": { |
<template> | |
<div> | |
<input type="file" multiple accept="image/jpeg" @change="detectFiles($event.target.files)"> | |
<div class="progress-bar" :style="{ width: progressUpload + '%'}">{{ progressUpload }}%</div> | |
</div> | |
</template> | |
<script> |
@app.route('/download/', methods=['GET']) | |
def download(): | |
url = request.args['url'] | |
filename = request.args.get('filename', 'image.png') | |
r = requests.get(url) | |
strIO = StringIO.StringIO(r.content) | |
return send_file(strIO, as_attachment=True, attachment_filename=filename) |
import os | |
import csv | |
import logging | |
import boto3 | |
from schematics.models import Model | |
from schematics.types import StringType, IntType | |
logging.getLogger() |
#!/usr/bin/env bash | |
# Clear out all previous attempts | |
rm -rf "/tmp/source-git/" | |
# Get the dependencies for git, then get openssl | |
sudo apt-get install build-essential fakeroot dpkg-dev -y | |
sudo apt-get build-dep git -y | |
sudo apt-get install libcurl4-openssl-dev -y | |
mkdir -p "/tmp/source-git/" |
<?php | |
#You have to write your own module. In your module you have to define your theme using hook_theme function. | |
function mymodule_theme($existing, $type, $theme, $path) { | |
return array( | |
'your_theme_key' => array( | |
'variables' => array( | |
'nid' => NULL, | |
'title' => NULL | |
), | |
'template' => 'your_template_filename', // do not include .tpl.php |
from flask import Flask, Response | |
import pprint | |
@app.route('/') | |
def index: | |
return dpm(response) | |
def dpm(variable): | |
pp = pprint.PrettyPrinter(indent=4, depth=6) | |
debug_message = pp.pprint(variable) |
// Tell Drupal to cancel this user. | |
// The third argument can be one of the following: | |
// - user_cancel_block: disable user, leave content | |
// - user_cancel_block_unpublish: disable user, unpublish content | |
// - user_cancel_reassign: delete user, reassign content to uid=0 | |
// - user_cancel_delete: delete user, delete content | |
user_cancel(array(), $uid, 'user_cancel_reassign'); | |
// user_cancel() initiates a batch process. Run it manually. | |
$batch =& batch_get(); |