Skip to content

Instantly share code, notes, and snippets.

Scott Watermasysk scottwater

Block or report user

Report or block scottwater

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@scottwater
scottwater / tailwind.config.js
Created Sep 13, 2019
Nord color palette in Tailwind
View tailwind.config.js
module.exports = {
theme: {
extend: {
colors: {
nord: {
"0": "#2E3440",
"1": "#3B4252",
"2": "#434C5E",
"3": "#4C566A",
"4": "#D8DEE9",
@scottwater
scottwater / pageData.js
Created Oct 17, 2019
See what data is available on a page in Eleventy
View pageData.js
eleventyConfig.addNunjucksTag("pageData", function(nunjucksEngine) {
return new (function() {
this.tags = ["pageData"];
this.parse = function(parser, nodes, _) {
var tok = parser.nextToken();
var args = parser.parseSignature(null, true);
// fake it until you make it!
// https://github.com/mozilla/nunjucks/issues/158#issuecomment-34919343
@scottwater
scottwater / base_webhook.json
Last active Sep 19, 2019
KickoffLabs WebHooks
View base_webhook.json
{
"__event": "the_webhook_event",
"avatar": "https://d1ts43dypk8bqh.cloudfront.net/v1/avatars/310c4ac2-7026-4700-afde-496b1d217b03",
"counter": 252,
"contest_score": 300,
"contest_score_rank": 19588,
"custom_fields": {
},
"email": "scott@kickofflabs.com",
@scottwater
scottwater / kickoff.json
Last active Aug 6, 2019
KickoffLabs API Demo Response
View kickoff.json
{
"avatar": "https://d1ts43dypk8bqh.cloudfront.net/v1/avatars/310c4ac2-7026-4700-afde-496b1d217b03",
"counter": 252,
"contest_score": 300,
"contest_score_rank": 19588,
"custom_fields": {},
"email": "scott@kickofflabs.com",
"family_name": "Watermasysk",
"given_name": "Scott",
"id": 56999,
@scottwater
scottwater / lb.html
Last active Jun 12, 2019
Add this to the header of a KickoffLabs thank you page (until there is UI to make this setting)
View lb.html
<script>
window.kol_leader_board_options = {
board_settings: {
lead_description: 'full_name'
}
}
</script>
View lb.html
<script>
window.kol_leader_board_options = {
board_settings: {
lead_description: 'full_name'
}
}
</script>
@scottwater
scottwater / page.html
Created Apr 15, 2019
AnyForm Custom Callback
View page.html
<script>
var kol_widget_options = {
callback: function(data) {
if (data.counter == 1) {
window.location = `https://YOURSITE.com?kid=${data.social_id}`;
} else {
window.location = data.redirect_url;
}
}
};
@scottwater
scottwater / index.js
Created Mar 27, 2019
Heroku/Fly SSL Proxy
View index.js
import { proxy } from "@fly/cdn"
import { httpsUpgrader } from "@fly/cdn/lib/middleware"
const origin = proxy("https://YOURAPP.herokuapp.com", {
headers: { host: "YOURAPP.herokuapp.com" }
})
const router = httpsUpgrader(origin)
fly.http.respondWith(router)
@scottwater
scottwater / sample.html
Last active Jul 20, 2018
KickoffLabs Known Lead Event
View sample.html
<script>
$(document).ready(function() {
$(document).on('kol:knownlead', function(e, lead){
var social_id = lead.id;
});
});
</script>
@scottwater
scottwater / secure_resqueue_server_1.rb
Created Apr 13, 2011
Quick samples on securing Resque::Server
View secure_resqueue_server_1.rb
require 'resque/server'
class SecureResqueServer < Resque::Server
before do
redirect '/' unless some_condition_is_met!
end
end
You can’t perform that action at this time.