Skip to content

Instantly share code, notes, and snippets.

learn.hashicorp.com - potential sanity workflow

  • an author creates a new guide
  • an author spins up the local sanity studio
  • as a pre-step to sanity start we parse the tree and look for new files, check our sanity dataset to see if that file exists
    • if it doesn't exist in the dataset, we create a new entry in our sanity data studio
    • if it does exist in the dataset, we do nothing

requirements

  • ensure the CLI cmd is run in the right pwd - fileExists checks on a few "touchstone" files or directories. throw if all not found.

Keybase proof

I hereby claim:

  • I am kylemac on github.
  • I am kylemac (https://keybase.io/kylemac) on keybase.
  • I have a public key ASDJlniCsPSQiITMuWW_3pWQOLHD73D7TMWB8BZ_gVQgxgo

To claim this, I am signing this object:

it's popping the join form. it needs to pop this form:

https://actionnetwork.org/forms/take-action-to-see-the-last-2-2/manage

here's the embed code:

<link href='https://actionnetwork.org/css/style-embed.css' rel='stylesheet' type='text/css' /><script>window.yepnope || document.write('<script src="https://actionnetwork.org/includes/js/yepnope154-min.js"><\/script>');</script><script src='https://actionnetwork.org/widgets/v2/form/take-action-to-see-the-last-2-2?format=js&source=widget'></script><div id='can-form-area-take-action-to-see-the-last-2-2' style='width: 100%'><!-- this div is the target for our HTML insertion --></div>
@kylemac
kylemac / app.coffee
Last active August 29, 2015 14:17
how to configure charge in your app.coffee file
charge_config = require './config.json'
module.exports =
# the rest of your roots configuration stuff
# this reads your config.json and configures charge
server: charge_config
# alternately you could define your key/values inline
# server:

Keybase proof

I hereby claim:

  • I am kylemac on github.
  • I am kylemac (https://keybase.io/kylemac) on keybase.
  • I have a public key whose fingerprint is 05E2 48DC 3A55 6997 81B9 4E06 8FD9 DD36 E706 4E31

To claim this, I am signing this object:

@kylemac
kylemac / test.md
Last active January 2, 2016 05:29 — forked from adamjonas/gist:8257213
order question
3
How does it work?

There are two ways to participate:

DEVELOPMENT

Online submission of innovative, feasible concepts to the DEVELOPMENT track. Proposals will be judged on technical and business criteria (listed in the Judging section below). As participants advance to semi-final and final rounds, they will receive mentorship, education, and resources to help optimize the potential of their ideas. Winners will receive up to $500,000 in funding, gain business development support to launch their products, and attend the MAKE IT WEARABLE final presentation and gala event. If a winning submission is made by a team or organization, prizes will be awarded to the team or organization as a whole (not on an individual basis).

@kylemac
kylemac / auth.js
Last active December 18, 2015 21:18
What am I doing wrong? Whenever POST /login is hit, it just hangs...
// routes/auth.js
var passport = require('passport')
, LocalStrategy = require('passport-local').Strategy;
exports.member_auth = function(req, res) {
// console.log("Request Body == ", req.body);
var strategy = new LocalStrategy({
usernameField: 'email',
config.json
reading-image.png
require 'carrierwave/processing/mini_magick'
class ImageUploader < CarrierWave::Uploader::Base
include CarrierWave::MiniMagick
IMAGE_EXTENSIONS = %w(jpg jpeg gif png)
DOCUMENT_EXTENSIONS = %w(exe pdf doc docm xls)
def store_dir
"files/#{model.id}"
@kylemac
kylemac / fb_tab.rb
Created April 18, 2011 20:35
A quick helper method to accommodate FB iframe app's on Pages
require 'sinatra/base'
module Sinatra
module FBHelper
def fb_tab(path, opts={}, &block)
post(path, opts, &block)
get(path, opts, &block)
end
end
end