A stored procedure that saves (insert/update) a URL, then returns the id for the record.
Works in Go v1.11.6+
and MySQL 5.7+
.
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE SaveUrl(
IN p_url varchar(8200),
IN p_title text
<?xml version="1.0" encoding="UTF-8" ?> | |
<!DOCTYPE html> | |
<html xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'> | |
<head> | |
<meta charset='utf-8' /> | |
<meta content='IE=edge' http-equiv='X-UA-Compatible' /> | |
<meta content='width=device-width, initial-scale=1' name='viewport' /> | |
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> | |
<meta content='C. Bess - perfectGod.com' name='author' /> |
package uploader | |
import ( | |
"bytes" | |
"compress/gzip" | |
"myapp/internal/config" | |
"github.com/aws/aws-sdk-go/aws" | |
"github.com/aws/aws-sdk-go/aws/session" | |
"github.com/aws/aws-sdk-go/service/s3/s3manager" |
# the server provisioning module | |
# uses: python-digitalocean==1.16.0 | |
# ref: https://developers.digitalocean.com/documentation/v2/#droplets | |
import digitalocean | |
import os | |
class ProvisionServerException(Exception): | |
pass |
A stored procedure that saves (insert/update) a URL, then returns the id for the record.
Works in Go v1.11.6+
and MySQL 5.7+
.
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE SaveUrl(
IN p_url varchar(8200),
IN p_title text
// | |
// DispatchQueueDelay.swift | |
// | |
// Created by C. Bess on 9/17/19. | |
// MIT - Soli Deo gloria - perfectGod.com | |
// | |
// refs: | |
// - https://gist.github.com/fjcaetano/ff3e994c4edb4991ab8280f34994beb4 | |
// - https://www.craftappco.com/blog/2018/5/30/simple-throttling-in-swift |
# use LLVM defaults | |
# http://clang.llvm.org/docs/ClangFormatStyleOptions.html#configurable-format-style-options | |
# BasedOnStyle: LLVM | |
# Soli Deo gloria | |
Language: ObjC | |
AccessModifierOffset: -2 | |
AlignAfterOpenBracket: Align | |
AlignConsecutiveAssignments: false | |
AlignConsecutiveDeclarations: false | |
AlignEscapedNewlines: Left |
// ref: https://stackoverflow.com/a/22967912/344591 | |
@implementation NSView (Screenshot) | |
/// Returns an image that contains the entire window contents, including window background color and traffic lights. | |
/// Resembles the product of taking a screenshot using Preview.app | |
- (NSImage *)screenshotOfWindow { | |
CGWindowID winID = (CGWindowID) self.window.windowNumber; | |
CGImageRef ref = CGWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, winID, kCGWindowImageBoundsIgnoreFraming); | |
return [[NSImage alloc] initWithCGImage:ref size:self.bounds.size]; |
// ref: https://www.npmjs.com/package/pdf-parse | |
const pdf = require('pdf-parse'); // v1.0.8 | |
// ref: https://www.npmjs.com/package/axios | |
const axios = require('axios'); // v0.18.0 | |
const util = require('util'); | |
const url = 'http://www.trinitybaptistreformed.org/files/Download/Doctrine%20of%20Divine%20Providence.pdf'; | |
// const url = 'http://www.orrb.org/ourpages/theology_training/UNIT%201%20-%20THE%20ATTRIBUTES%20OF%20GOD/U1S18_gods_wrath.pdf'; | |
console.log('loading'); |
0414d7866d0a60e68d55f5271d9cf498468f55a811efecbaf9324023678a22ab74a12d58849eb76eb52071a42589bf9ab883d9b7d441b14f6d444522771bb99b16;andrewallaway |