Skip to content

Instantly share code, notes, and snippets.

Steps:

  • Setup Facebook login within our Okta (both Preview and Production)
  • Convert all clients to use Okta FB login instead of existing FB login
    • Remove existing Facebook token generation from the Polymer backend
      • Remove existing Facebook access tokens from Polymer backend

Steps:

  • Setup Facebook login within our Okta (both Preview and Production)
  • Convert all clients to use Okta FB login instead of existing FB login
    • Remove existing Facebook token generation from the Polymer backend
      • Remove existing Facebook access tokens from Polymer backend

General

Types/Interfaces:

Note: While this one allows for freeform, I think we should err on the more is more approach. Explanations that explain what the object is in our domain would be more useful, especially for some of the cumbersome types. That said, some types are rather self descriptive, and in those cases, we should opt for the Represents format.

@BBonifield
BBonifield / kramdown.html.erb
Created September 29, 2015 17:37
Github flavored markdown template for compiled kramdown markdown
<!DOCTYPE html>
<html>
<head>
<title>Rendered Markdown</title>
<link rel="stylesheet" href="http://yandex.st/highlightjs/6.1/styles/default.min.css"/>
<link rel="stylesheet" href="http://sindresorhus.com/github-markdown-css/github-markdown.css"/>
</head>
<body>
<div class="markdown-body">
<%= body %>
<div class="staff form">
<?php echo $this->Session->flash('auth'); ?>
<?php echo $this->Form->create('Staff'); ?>
<fieldset>
<legend><?php echo __('Please enter your username and password'); ?></legend>
<?php
echo $this->Form->input('username');
echo $this->Form->input('password');
?>
</fieldset>
@BBonifield
BBonifield / make-selector.js
Created November 1, 2011 22:24 — forked from weaver/make-selector.js
Create an absolute jQuery selector for a DOM element.
// Create an absolute jQuery selector for a DOM element.
//
// + el - Element to select.
//
// Returns String selector.
function makeSelector(el) {
var tag, index, stack = [];
for (; el.parentNode; el = el.parentNode) {
tag = el.tagName;
@BBonifield
BBonifield / gist:1025815
Created June 14, 2011 20:38
Ben's deparam, stripped out from BBQ
(function($){
$.deparam = jq_deparam = function( params, coerce ) {
var obj = {},
coerce_types = { 'true': !0, 'false': !1, 'null': null };
// Iterate over all name=value pairs.
$.each( params.replace( /\+/g, ' ' ).split( '&' ), function(j,v){
var param = v.split( '=' ),
key = decodeURIComponent( param[0] ),
val,
<?php
if ( isset( $_REQUEST['delete_file'] ) ) {
Manager::factory()->delete_file( $_REQUEST['delete_file'] );
die;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<head>
<title>Manage Grabs</title>
<style type="text/css">
<?php
if ( isset( $_REQUEST['delete_file'] ) ) {
Manager::factory()->delete_file( $_REQUEST['delete_file'] );
die;
} elseif ( isset( $_REQUEST['as_text'] ) ) {
header('Content-Type: text/plain');
echo file_get_contents( __FILE__ );
die;
}
?>
<% if @item.item_images.any? %>
<% @item.item_images.each do |key, image| %>
<img src="<%= image.path %>" width="397" <% if key != 0 %>style="display:none"<% end %> />
<% end %>
<% end %>