This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var db = {} | |
var gf = _docs_flag_initialData['docs-seu'].replace('/edit','/formResponse'); | |
var labels = [...document.querySelectorAll('.freebirdFormviewerViewItemsItemItem')]; | |
var form = labels.forEach(function(elb,i){ | |
//find labelname | |
var labelname = elb.querySelector('.freebirdFormviewerViewItemsItemItemTitle'); | |
labelname = labelname.textContent; | |
db[labelname] = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask,render_template, render_template_string | |
from pprint import pprint | |
'''HTML JINJA TEMPLATE''' | |
# create a new test.html file with the jinjaTemplateString below to view the issue. | |
jinjaTemplateString = ''' | |
<html> <head></head> <body> <h1>Test template</h1> | |
{% push 'js' %} ABC {% endpush %} | |
{% push 'js' %} XYZ {% endpush %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function donationformToJSON(){ | |
var sections = $('td[class*="BBListingHeading"]'); | |
collection = []; | |
sections.each(function(id,elem){ | |
var section_name = $(elem).text(); | |
var labels = $(elem).parents('tbody').find('label'); | |
//compile dictionary for each form element | |
//separated by sections | |
jsonobject = {} | |
labels.each(function(id,lel){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table> | |
<thead> | |
<tr> | |
<th>Name</th> | |
<th>Hobby</th> | |
<th>Favorite Music</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr class="tabledata"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h3>header</h3> | |
<form method="POST" id="myform" action="echo/html"> | |
<label for="foo">First Name:</label> | |
<input type="input" id="foo"> | |
<br> | |
<label for="bar">Last Name:</label> | |
<input type="input" id="bar"> | |
<br> | |
<label for="baz">Email:</label> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#map').on('click', '.leaflet-popup-content-wrapper a', function(evt){ | |
evt.preventDefault(); | |
$("#djax").find("div[id^='childdiv']").each(function(el){$(el).empty();}); | |
$('#djax').load( $(this).attr('href')+" .djaxcontents"); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Set the timezone so filenames are correct | |
date_default_timezone_set('Europe/London'); | |
// Backup all files in public_html apart from the gz | |
$siteroot = "/path/to/backup"; | |
$dropbox_email='dropbox@email'; //Dropbox username | |
$dropbox_pass='pass'; // Dropbox password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Set the timezone so filenames are correct | |
date_default_timezone_set('Europe/London'); | |
// Backup all files in public_html apart from the gz | |
$siteroot = "/path/to/backup"; | |
$dropbox_email='dropbox@email'; //Dropbox username | |
$dropbox_pass='pass'; // Dropbox password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function jsonGenerator(){ | |
// Auto Generate Sitemaps after every new post | |
add_action("publish_post", "create_jsonfiles"); | |
add_action("publish_page", "create_jsonfiles"); | |
function create_jsonfiles() { | |
$postsForJson = get_posts(array( | |
'numberposts' => -1, | |
// 'orderby' => 'modified', | |
'post_type' => array('post','page'), | |
'order' => 'DESC' )); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import os | |
import pilkit.processors | |
import sys | |
import getopt | |
from PIL import Image | |
from PIL import ImageDraw, ImageOps | |
from pilkit.processors import Transpose, Adjust | |
from pilkit.utils import save_image |
NewerOlder