Skip to content

Instantly share code, notes, and snippets.

View r-k-b's full-sized avatar

Robert K. Bell r-k-b

View GitHub Profile
@r-k-b
r-k-b / bc-cookies-angular.js
Last active August 29, 2015 14:02
Quick demo of interacting with cookies on Adobe Business Catalyst
// Requires /CatalystScripts/Java_Cookies.js
(function(){
var cookieApp = angular.module('cookie-app', []);
cookieApp.$inject = ['$scope'];
cookieApp.controller('cookie-read-write', function($scope){
$scope.visitorDeviceClass = cookie('visitorDeviceClass');
$scope.customCookie = cookie('customCookie');
@r-k-b
r-k-b / gruntfile.js
Last active August 29, 2015 14:14 — forked from robkb/gruntfile.js
improving the base gruntfile for fb-flo + less
/*
gruntfile based on https://gist.github.com/billyvg/2a7321623b2d2a87381c
[grab the associated `package.json` from here](https://gist.github.com/robert-bosweb/6c0303c11839f063b854)
*/
module.exports = function (grunt) {
@r-k-b
r-k-b / bc-less-prefixed_package.json
Last active August 29, 2015 14:14 — forked from robkb/bc-less-prefixed_package.json
improving the base package.json for less & autoprefixer preprocessing on Business Catalyst sites
{
"//": [
"Packages used for less & autoprefixer preprocessing on Business Catalyst sites",
"Replace SITE-NAME-HERE with your site name if you feel like it; it's not used anywhere (yet)"
],
"name": "SITE-NAME-HERE",
"version": "0.0.1",
"description": "",
"main": "gruntfile.js",
"dependencies": {},
@r-k-b
r-k-b / gulpfile.js
Last active August 29, 2015 14:14
improving the base package.json for less & autoprefixer preprocessing on Business Catalyst sites
var gulp = require('gulp'),
path = require('path'),
sftp = require('gulp-sftp'),
less = require('gulp-less'),
sourcemaps = require('gulp-sourcemaps'),
autoprefixer = require('gulp-autoprefixer'),
rename = require('gulp-rename'),
browserSync = require('browser-sync');
var setup = {
@r-k-b
r-k-b / flatten-with-transducers-test.js
Last active May 22, 2016 05:54
a little closer to understanding Transducers and Transformers...
"use strict";
import R from 'ramda';
let userDays = [
{
days: {
day1: {
billable: {
1: 10,
@r-k-b
r-k-b / set-BC-paymentmethodtype-to-11.user.js
Last active May 26, 2016 08:48
Set Payment Method to 11
// ==UserScript==
// @name Set Payment Method to 11
// @namespace https://gist.github.com/r-k-b/
// @version 1.0.1
// @description DESCRIPTIONGOESHERE
// @author Robert K. Bell
// @homepage https://gist.github.com/673e9c53d0b0da4994b48d2d7423ff8d
// @downloadURL https://gist.github.com/robert-bosweb/673e9c53d0b0da4994b48d2d7423ff8d/raw/set-BC-paymentmethodtype-to-11.user.js
// @match *
// @grant none
@r-k-b
r-k-b / find-overwide-elements.user.js
Last active May 26, 2016 09:25
Find Over-Wide Elements :: What is pushing the page wider than the viewport, allowing that janky side scrolling?
// ==UserScript==
// @name Find Over-Wide Elements
// @namespace https://gist.github.com/r-k-b/
// @version 1.0.0
// @description What is pushing the page wider than the viewport, allowing that janky side scrolling?
// @author Robert K. Bell
// @homepage https://gist.github.com/r-k-b/83a411a2cf4be4de7cd0bb60321f66a7
// @downloadURL https://gist.github.com/r-k-b/83a411a2cf4be4de7cd0bb60321f66a7/raw/find-overwide-elements.user.js
// @include *://*/*
// @grant none
@r-k-b
r-k-b / show-list-IDs-in-BC-admin.user.js
Last active May 26, 2016 09:28
Show List IDs in BC Admin
// ==UserScript==
// @name Show List IDs in BC Admin
// @namespace https://gist.github.com/r-k-b/
// @version 1.0.0
// @description Show the ID of all visible list items. Works on most lists in BC.
// @author Robert K. Bell
// @homepage https://gist.github.com/r-k-b/1b89a057231055fb0f231b304df8a78e
// @downloadURL https://gist.github.com/r-k-b/1b89a057231055fb0f231b304df8a78e/raw/show-list-IDs-in-BC-admin.user.js
// @include *://*/*
// @grant none
@r-k-b
r-k-b / expand-all-tree-items.user.js
Last active May 26, 2016 09:38
Clicks all the visible [+] buttons in a list view. Useful in BC's Category / Classification view.
// ==UserScript==
// @name Expand all tree items
// @namespace https://gist.github.com/r-k-b/
// @version 1.0.0
// @description Clicks all the visible [+] buttons in a list view. Useful in BC's Category / Classification view.
// @author Robert K. Bell
// @homepage https://gist.github.com/r-k-b/2ae9376e03f26d7b6713c576a177f349
// @downloadURL https://gist.github.com/r-k-b/2ae9376e03f26d7b6713c576a177f349/raw/expand-all-tree-items.user.js
// @include *://*/*
// @grant none
@r-k-b
r-k-b / show-crm-custom-field-tag-values.user.js
Last active May 26, 2016 10:45
Show CRM Custom Field Tag Values
// ==UserScript==
// @name Show CRM Custom Field Tag Values
// @namespace https://gist.github.com/r-k-b/
// @version 1.0.0
// @description Show CRM Custom Field Tag Values
// @author Robert K. Bell
// @homepage https://gist.github.com/r-k-b/1ce961bd9b0f1effd8a4bb173325390b
// @downloadURL https://gist.github.com/r-k-b/1ce961bd9b0f1effd8a4bb173325390b/raw/show-crm-custom-field-tag-values.js
// @include *://*/*
// @grant none