Skip to content

Instantly share code, notes, and snippets.

View ryngonzalez's full-sized avatar

✨ Kathryn Gonzalez ✨ ryngonzalez

View GitHub Profile
@ryngonzalez
ryngonzalez / angular-textarea-autoresize.js
Created July 22, 2013 21:34
A small, performant way of automatically expanding a textarea in Angular.
// Ryan Gonzalez 7/2013
// Adapted from the blog post
// http://phaistonian.pblogs.gr/expanding-textareas-the-easy-and-clean-way.html
angular.module('autoresize', []);
angular.module('autoresize')
.directive('autoresize', function($window){
'use strict';
return {
angular.module('$app.directives')
.directive 'showAfterEvent', ['$timeout', ($timeout)->
return {
link: (scope, element, attrs) ->
eventName = attrs.showAfterEvent
element.css 'opacity', 0
element.bind eventName, (e) ->
@ryngonzalez
ryngonzalez / spring.scss
Created November 19, 2013 23:25
spring.scss: an attempt at making spring animations using only SASS. Still a work in progress.
@mixin spring($selector, $name, $duration, $delay, $location, $spring) {
// Set Defaults
$selector: ".spring" !default;
$location: 0,0,0 !default;
$name: "spring" !default;
$duration: 1s !default;
$delay: 0s !default;
$spring: 0.1 !default;
// Set selector to use animation
@ryngonzalez
ryngonzalez / notes.md
Created March 23, 2017 04:09
Real-time Insights powered by Reactive Programming

Real-time Insights powered by Reactive Programming

Presenter: Jay Phelps (@_jayphelps)

  • Jay Phelps
    • Senior Software Engineer
  • InfoSec
    • Preventing unauthorized access
    • Stopping hackers
    • Can block exploits using their gateway proxy
  • They need to know if it's working
var createFocusTrap = require('../../');
var containerOne = document.getElementById('demo-one');
var focusTrapOne = createFocusTrap('#demo-one', {
onDeactivate: function () {
containerOne.className = 'trap';
},
});
document.getElementById('activate-one').addEventListener('click', function () {
@ryngonzalez
ryngonzalez / divider.scss
Created November 19, 2013 23:21
CSS divider using :after and :before pseudo elements.
%divider {
&:after, &:before {
display: block;
position: absolute;
}
&:after {
text-transform: none;
text-shadow: none;
@include rem(font-size, 12px);
text-align: center;
@ryngonzalez
ryngonzalez / copy-link.js
Last active January 22, 2023 01:49
A Scriptable widget setup to easily copy and paste links!