Skip to content

Instantly share code, notes, and snippets.

View GeorgeTaveras1231's full-sized avatar
🏠
Working from home

George GeorgeTaveras1231

🏠
Working from home
View GitHub Profile
@GeorgeTaveras1231
GeorgeTaveras1231 / cloudSettings
Created August 6, 2019 19:58
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-08-06T19:58:54.215Z","extensionVersion":"v3.4.1"}

Ways to use union styles

CSS Classes with composes

This approach requires that you compose a union class and extend your own class with custom styles.

Example

CSS:

@GeorgeTaveras1231
GeorgeTaveras1231 / UnionIcons.md
Last active May 16, 2019 17:00
Documentation for consuming union icons in a framework agnostic way

Steps

1. Install icon loader

You will need to add this block of HTML to your HTML document (can be the head or body)

<script>!function(n,t,e,o,a,i,r){var c,s=new r;function d(n){return e+n.name}function f(n,t){var e=o.createElement("div");e.innerHTML=t,e.id="Union__fragment__"+n.name,o.body.appendChild(e)}function u(n,t){"loading"!==o.readyState?f(n,t):o.addEventListener("DOMContentLoaded",function(){f(n,t)})}function h(e,o){var n=new XMLHttpRequest;n.addEventListener("load",function(){var n,t=this.responseText;if(200===this.status){try{n=t,a[d(e)]=i.stringify([s,n])}catch(n){return void console.warn("Error hydrating icon cache: ",n)}o&&o(t)}}),n.open("GET",e.url),n.send()}function m(t){h(t,function(n){u(t,n)})}t.forEach(function(n){var t,e,o=a[d(n)];o?(e=i.parse(o),t=new r(e[0]),s<t?m(n):(u(n,e[1]),setTimeout(function(){6e5<=s-t&&h(n)}))):m(n)}),c=t.map(d),Object.keys(a).forEach(function(n){n.startsWith(e)&&-1===c.indexOf(n)&&(a.removeItem(n),console.warn("Deleting fragment cache: ",n))})}(0
{"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36","lighthouseVersion":"2.9.1","generatedTime":"2018-04-24T00:24:25.462Z","initialUrl":"https://docs.union.theknot.com/examples/basic-app/","url":"https://docs.union.theknot.com/examples/basic-app/","runWarnings":[],"audits":{"first-meaningful-paint":{"score":49,"displayValue":"4,070 ms","rawValue":4072.3,"extendedInfo":{"value":{"timestamps":{"navStart":18721869646,"fCP":18722608945,"fMP":18725941901,"onLoad":18726410783,"endOfTrace":18731757510},"timings":{"navStart":0,"fCP":739.299,"fMP":4072.255,"onLoad":4541.137,"endOfTrace":9887.864},"fmpFellBack":false}},"scoringMode":"numeric","name":"first-meaningful-paint","description":"First meaningful paint","helpText":"First meaningful paint measures when the primary content of a page is visible. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/first-meaningful-paint)."},"speed-index-metric":{"score":88,"disp

Keybase proof

I hereby claim:

  • I am georgetaveras1231 on github.
  • I am georgetaveras12 (https://keybase.io/georgetaveras12) on keybase.
  • I have a public key whose fingerprint is D4F6 95BD EC57 6566 64E0 7D65 80AB E6A9 DDF5 3237

To claim this, I am signing this object:

@GeorgeTaveras1231
GeorgeTaveras1231 / form-fields-demo.js
Created October 20, 2016 20:12
Initialize field pattern
// in a 'window' context
XO.FormFields.init();
// in a commonjs context
require('@xogroup/tk-form-fields').init();
require 'benchmark'
module Fib
module_function
def fib(n)
if n <= 1
n
else
fib(n - 1) + fib(n - 2)
module Fibonacci
module_function
def fibonacci(n)
@cache ||= {}
@cache[n] ||= if n <= 1
n
else
fibonacci(n - 1) + fibonacci(n - 2)
@GeorgeTaveras1231
GeorgeTaveras1231 / module_function_vs_private_methods.rb
Last active January 21, 2016 03:14
module_function_vs_private_methods
module MyModule
module_function
def module_foo
'module_functions are singleton_methods on a module, which allow explicit receiver'
end
end
class MyClass
private
Your Name:
George Taveras
Github Username:
GeorgeTaveras1231
Blog Url:
http://georgielovesoup.tumblr.com/
Tagline:
"The code father"
Profile Picture (something normal, a headshot, of a good reusable size that can be easily cropped):
../img/students/george_profile.png