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
/*Package wherecomposer builds potentially deeply nested WHERE statements. | |
Supplements GORM's .Where() method to address the following: | |
https://stackoverflow.com/questions/53213551/how-to-build-where-query-with-grouped-ors | |
https://github.com/jinzhu/gorm/issues/2059 | |
Quick example, and how to build nested WHERE clauses and apply to a GORM query: | |
where := build(constraints{ | |
{col:"user_id", val:1}, | |
{ |
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
package queue | |
import ( | |
"fmt" | |
"log" | |
"sync" | |
"time" | |
"github.com/jhartman86/conduit/pkg/system/database" | |
) |
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
/* | |
Global config parser. Please actually read this to understand how it works. | |
There are three ways to set runtime configurations: | |
- Environment variables | |
- env.json files (one only) | |
- CLI flags | |
Order matters. Environment variables are parsed first. Then the env.json | |
file. If the env.json file contains the same key as an environment variable | |
name, the value in env.json takes precedence. Lastly, CLI flags are parsed. |
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
var request = require("superagent"); | |
module.exports = function spamCheck(data, callback) { | |
request | |
.post("http://spamcheck.postmarkapp.com/filter") | |
.type("json") | |
.send(data) | |
.end(function (res) { | |
if (res.error) { | |
return callback(new Error("SpamCheck service failed with: " + res.text)); |
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 xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /><title>Code of Federal Regulations</title><style type="text/css"> | |
.FDSYSLINE {display:block;width:100%;margin-bottom:10px;text-align:left;border-bottom-style:solid;border-width:1px;} | |
.CFRFDSYS {display:block;width:100%;margin-top:5px;margin-bottom:5px;text-align:left;} | |
.FDSYSANCESTORS, .FDSYSHEADINGTITLE2, .FDSYSORIGDATE, .FDSYSDATE, .FDSYSVOLUME {display:block;} | |
.FDSYSNUMTITLE1 {display:block;font-weight:bolder;font-size:12pt;} | |
.CFRDOC-AMDDATE {display:block;width:90%;margin-top:5px;margin-bottom:5px;text-align:right;} | |
.TITLEPG-PUB, .FMTR-TITLEPG {display:block;width:90%;margin-top:5px;margin-bottom:5px;text-align:left;} | |
.TITLEPG-SPECED, .TITLEPG-TITLENUM, .TITLEPG-ANCIL, .TITLEPG-CONTAINS, .TITLEPG-SUBJECT, .TITLEPG-REVISED, .TITLEPG-PARTS, .TITLEPG-CODE {display:block;} | |
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
<div id="browse-layout-mask"> | |
<div> </div> | |
<h3 class="page-title">Electronic Code of Federal Regulations</h3> | |
<p></p> | |
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> | |
<head> | |
<title>Configure</title> | |
<link rel="stylesheet" type="text/css" href="https://code.fluidretail.net/configure-ui/stable/css/configure-app.css"> | |
<style> | |
* {box-sizing:border-box;} | |
html, body {width:100%;height:100%;} | |
body {margin:0;padding:1rem;min-height:100%;background:#eaeaea;} | |
[configure] {width:920px;max-width:95%;margin:0 auto;background:#fff;padding:1rem;} | |
[carousel] {margin-bottom:3rem;max-width:400px;margin:0 auto 3rem;} |
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> | |
<head> | |
<title>Configure</title> | |
<link rel="stylesheet" type="text/css" href="https://code.fluidretail.net/configure-ui/stable/css/configure-app.css"> | |
<style> | |
* {box-sizing:border-box;} | |
html, body {width:100%;height:100%;} | |
body {margin:0;padding:1rem;min-height:100%;background:#eaeaea;} | |
[configure] {width:920px;max-width:95%;margin:0 auto;background:#fff;padding:1rem;} | |
[carousel] {margin-bottom:3rem;max-width:400px;margin:0 auto 3rem;} |
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
/** | |
* Angular-ish style dependency injection for node; relies on (but does not | |
* override) node's require() mechanisms; merely compliments the loading process | |
* and allows you to structure your app so that you *know* what you'll get back | |
* from a dependency. Otherwise known as an inversion of control container. | |
* @usage: require('node-injector').using(module).factory('thing', ['dep1', 'dep2', function( dep1, dep2 ){ }]) | |
* @returns {Injector} | |
* @constructor | |
*/ | |
function InversionController(){ |
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
angular.module('sstt.common'). | |
/** | |
* http://blog.thoughtram.io/angularjs/2015/01/02/exploring-angular-1.3-bindToController.html | |
* https://leanpub.com/recipes-with-angular-js/read#leanpub-auto-editing-text-in-place-using-html5-contenteditable | |
* http://jonathancreamer.com/working-with-all-the-different-kinds-of-scopes-in-angular/ | |
* http://radify.io/blog/understanding-ngmodelcontroller-by-example-part-1/ | |
* @todo: clean up key binding code; make configurable | |
* @todo: clean up/make more efficient the overlay list positioning code, and test | |
* across more browsers |
NewerOlder