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 | |
* Class representing an Item in a Queue | |
* | |
* @author [email protected] | |
*/ | |
class Item { | |
constructor(v) { | |
this.v = v; | |
this.n = null; |
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
/** | |
* This is based off of another gist I found but I honestly don't recall where. That script was old | |
* and didn't work with updates to the API. I'm confident that will happen to this script in the future. | |
* This script will populate a spreadsheet with your meetings. Start by opening a Google spreadsheet and | |
* then go into App Scripts. You can copy paste this into there and then start making edits. The primary | |
* function to run is ProcessThisWeek. Have fun. | |
* | |
* BEGIN CONFIGS | |
*/ | |
// Calendar to Search access. You can get this from "Settings & Sharing" page in calendar. |
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
#!/bin/bash | |
# pw | |
# author: "Russell Simpkins"<[email protected]> | |
# this function executes the following: | |
# 1: copies the encrypted file from the Cloud drive | |
# 2: decrypts the file | |
# 3: opens the file in emacs | |
# 4: cleans up the ~ file emacs creates when you edit | |
# 5: calls pwc to encrypt the file | |
function pw() { |
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
modified: gorm/converter.go | |
modified: gorm/fields.go | |
modified: gorm/utilities.go | |
--- a/gorm/converter.go | |
+++ b/gorm/converter.go | |
@@ -8,7 +8,7 @@ import ( | |
"github.com/golang/protobuf/jsonpb" | |
"github.com/golang/protobuf/proto" |
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
index 21c5b4a..18ad64b 100644 | |
--- a/plugin/plugin.go | |
+++ b/plugin/plugin.go | |
@@ -662,12 +662,12 @@ func (p *OrmPlugin) generateConvertFunctions(message *generator.Descriptor) { | |
///// To Pb | |
p.P(`// ToPB runs the BeforeToPB hook if present, converts the fields of this`) | |
p.P(`// object to PB format, runs the AfterToPB hook, then returns the PB object`) | |
- p.P(`func (m *`, typeName, `ORM) ToPB (ctx context.Context) (`, | |
+ p.P(`func (m *`, typeName, `ORM) ToPB (ctx context.Context) (*`, | |
typeName, `, error) {`) |
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
$> /usr/bin/varnishtest –Dvmod_topbuild=/usr/local/builds/mmdb-vmod /usr/local/builds/mmdb-vmod/src/tests/test01.vtc | |
$> cat test02.vtc | |
varnishtest "Test example vmod" | |
server s1 { | |
rxreq | |
txresp | |
} -start | |
varnish v1 -vcl+backend { | |
import geo from "${vmod_topbuild}/src/.libs/libvmod_geo.so"; | |
import std; |
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
$>/usr/bin/varnishtest –Dvarnishd=/usr/local/builds/Varnish-Cache/bin/varnishd /path/to/test01.vtc | |
# top TEST test01.vtc passed (0.747) |
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
$> /usr/bin/varnishtest /path/to/test01.vtc | |
# top TEST test01.vtc passed (0.747) |
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
sub vcl_recv { | |
// remove jquery cache buster query parameter if it exists | |
if (req.url ~ "_=[0-9]+") { | |
set req.http.clean = regsuball(req.url, "(_=[0-9]+)", ""); | |
set req.http.clean = regsub(req.http.clean, "\?&", "?"); | |
set req.http.clean = regsub(req.http.clean, "&&", "&"); | |
set req.http.clean = regsub(req.http.clean, "&$", ""); | |
set req.http.clean = regsub(req.http.clean, "\?$", ""); | |
// modify the url with the clean version | |
set req.url = req.http.clean; |
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
varnishtest "Cache busting test" | |
server s1 { | |
rxreq | |
expect req.url == "/foo/svc.json?api-key=abc%20qwer1234&another=value&name=value" | |
txresp | |
} -start | |
varnish v1 -vcl+backend { | |
import std; | |
sub vcl_recv { | |
if (req.url ~ "_=[0-9]+") { |