This file contains hidden or 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
class GAEHandler(logging.Handler): | |
""" | |
Logging handler for GAE DataStore | |
""" | |
def emit(self, record): | |
from google.appengine.ext import db | |
class Log(db.Model): | |
name = db.StringProperty() |
This file contains hidden or 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
<select name="timezone" > | |
<option disabled selected style='display:none;'>Time Zone...</option> | |
<optgroup label="US (Common)"> | |
<option value="America/Puerto_Rico">Puerto Rico (Atlantic)</option> | |
<option value="America/New_York">New York (Eastern)</option> | |
<option value="America/Chicago">Chicago (Central)</option> | |
<option value="America/Denver">Denver (Mountain)</option> | |
<option value="America/Phoenix">Phoenix (MST)</option> | |
<option value="America/Los_Angeles">Los Angeles (Pacific)</option> |
This file contains hidden or 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
[ | |
{"group":"US (Common)", | |
"zones":[ | |
{"value":"America/Puerto_Rico","name":"Puerto Rico (Atlantic)"}, | |
{"value":"America/New_York","name":"New York (Eastern)"}, | |
{"value":"America/Chicago","name":"Chicago (Central)"}, | |
{"value":"America/Denver","name":"Denver (Mountain)"}, | |
{"value":"America/Phoenix","name":"Phoenix (MST)"}, | |
{"value":"America/Los_Angeles","name":"Los Angeles (Pacific)"}, | |
{"value":"America/Anchorage","name":"Anchorage (Alaska)"}, |
This file contains hidden or 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
/* | |
==================================================================== | |
ATOMIC.CSS | |
-------------------------------------------------------------------- | |
(NOTE: Load this LAST- should be last word) | |
Inspired by Thierry Koblentz in "Challenging CSS Best Practices" | |
(http://www.smashingmagazine.com/2013/10/21/challenging-css-best-practices-atomic-approach/) | |
- Creates classes for individual styles, letting you position elements with classes in the HTML |
This file contains hidden or 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
<html> | |
<body> | |
<style> | |
/* ========= FIXED-V LAYOUT ========= | |
The fixed-v layout method is a pure-css solution to the problem of creating | |
sidebars and sub-headers that are fixed vertically relative to the screen | |
(i.e. they don't scroll up/down with the body content), yet move horizontally |
This file contains hidden or 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
javascript:var title=document.title;if(title){var re=/(\\|\/|:|\*|\?|\"|<|>|\|)/gi;title=title.replace(re,'');void(prompt('Page Title', title));} |
This file contains hidden or 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
data:text/html, <html contenteditable> |
This file contains hidden or 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
-- Examples of two types of syntax for postres arrays. | |
-- EXAMPLE 1 AND 2 ARE THE SAME: | |
-- EXAMPLE 1 - ARRAY SYNTAX: | |
INSERT INTO sample_table | |
VALUES ( | |
ARRAY[10000, 20000, 30000, 40000], | |
ARRAY['red', 'blue', 'green'], | |
ARRAY[['meeting', 'lunch'], ['training', 'presentation']] |
This file contains hidden or 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
app.post('/svg_to_png', async function (req, res) { | |
let params = req.body | |
let image_url = 'https://s3.amazonaws.com/' + params.s3_bucket + '/' + params.s3_key | |
// STEP 1: Convert SVG to PNG: | |
var outputBuffer = svg2png.sync(params.svg_data, {}); | |
// STEP 2: Upload to S3: | |
let s3_params = { |
This file contains hidden or 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 https://stackoverflow.com/a/9624997/165673 | |
javascript:if(!window.jQuery||confirm('Overwrite\x20current\x20version?\x20v'+jQuery.fn.jquery))(function(d,s){s=d.createElement('script');s.src='https://code.jquery.com/jquery.js';(d.head||d.documentElement).appendChild(s)})(document); |
OlderNewer