Skip to content

Instantly share code, notes, and snippets.

View gwing33's full-sized avatar

Gerald Leenerts gwing33

  • Follow Up Boss
  • Scottsdale, AZ
View GitHub Profile
@gwing33
gwing33 / bootstrap_btn_color_mixin.sass
Created April 9, 2013 18:27
Sass + Compass Twitter bootstrap custom button color mixin
=btn_color($primary)
$secondary: adjust-saturation(adjust-lightness($primary, 9), 37)
$tertiary: adjust-saturation(adjust-lightness($primary, 22), 5)
color: #ffffff
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25)
background-color: $primary
*background-color: $tertiary
+background-image(linear-gradient(top, $secondary, $primary))
background-repeat: repeat-x
@gwing33
gwing33 / ReverseSpeeds.js
Last active January 1, 2016 00:09
Testing which Reverse String methods are faster... run it here: http://jsperf.com/reverse-speeds/2
// Run tests
function run_test(func) {
var j, s = 'asdfasdfasdf', name = func.name;
console.time(name);
for(j = 0; j <= 10000; j++) {
func(s);
}
console.timeEnd(name);
}
@gwing33
gwing33 / connectStream.js
Last active May 11, 2017 17:31
Higher Order Function to connect React to Rx Streams.
import _ from 'lodash';
import { Observable } from 'rx';
import React, { PropTypes } from 'react';
/* Connect Rx Stream to React Component
* - - - - - - - - - - - - - - - - - - -
* @param {func}
*
* @return {func}
* - @param {ReactComponent}
@gwing33
gwing33 / customMatcher.js
Created January 19, 2016 03:48
RxJS JestJS / Jasmine2 Custom Matcher
/* * *
* Just a quick tester to help with Rx testing...
* - - -
* Be sure to include in the jest config...
* "setupTestFrameworkScriptFile": "<rootDir>/{pathTo}/customMatchers.js",
* "testRunner": "<rootDir>/../node_modules/jest-cli/src/testRunners/jasmine/jasmine2.js"
* - - -
* Usage...should be something similar to what is below (untested)
*
* const subject = new Rx.Subject();
uploadFile () {
// CSV File
const csv = this.get("csv");
// Data to pass to the server
let data;
// Option 1) Use FormData (preferred)
data = new FormData();
data.append("csv", csv, "csv");
@gwing33
gwing33 / GeraldZip.php
Last active May 10, 2022 17:26
Zip Lists, FUB Code Golf
<?php
/**
* FollowUpBoss: Real Estate Lead Management Software.
*
* @author Gerald Leenerts
* @copyright Copyright (c) 2022, Enchant LLC.
* @license Property of Enchant LLC. All rights reserved.
* @prettier
*/
@gwing33
gwing33 / forge-layout.jsx
Created March 1, 2023 21:13
Pseudo code for thoughts on new design system usage
/**
* Forge Layout
* - - - - - - -
* First, let's explore some names:
* - Layout: This would be good for a top level, but not for lower level components
* - Container: Feels heavy handed
* - Box: Short and sweet.
* - Grid: Sounds like CSS Grid
* - Flex: Sounds like CSS Flex
* - Flow: I do like this option, but is it confused with `flex`?