Skip to content

Instantly share code, notes, and snippets.

✨ Kathryn Gonzalez ✨ ryngonzalez

  • DoorDash
  • San Francisco, CA
Block or report user

Report or block ryngonzalez

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ryngonzalez
ryngonzalez / _glitch.scss
Created Sep 14, 2014
A cool glitch effect created with the use of the `clip` CSS property, `text-shadows`, and randomized CSS keyframes. From @chriscoyier at CSS-Tricks: http://css-tricks.com/glitch-effect-text-images-svg/
View _glitch.scss
/*
(TEXT) PARAMS
=================
1. Namespace
2. Intensity
3. Text color
4. Background color (flat)
5. Highlight #1 color
6. Highlight #2 color
7. Width (px)
View StyleProtocols.jsx
// #########################################
// protocols/listlike.jsx
// #########################################
importRoot, Children, conforms, ProtocolStyle } from 'style-protocol'
import Listable from 'protocols/listable'
export default class Listlike extends HierarchyProtocol {
hierarchy() {
return (
<Root>
@ryngonzalez
ryngonzalez / InsertLayerFromFile.js
Last active Aug 29, 2015
Insert a Sketch layer from an absolute path'd file
View InsertLayerFromFile.js
// Name of layer to copy
var sourceLayerName = "Card",
url = NSURL.URLWithString("file:///Users/ryan/Downloads/Test.sketch")
if( true ) {
var sourceDoc = MSDocument.new()
if(sourceDoc.readFromURL_ofType_error(url, "com.bohemiancoding.sketch.drawing", nil)) {
var allChildren = sourceDoc.pages().valueForKeyPath("@distinctUnionOfArrays.children")
View import-csv.rake
namespace :db do
desc "load data from csv"
task :load_csv_data => :environment do
require 'fastercsv'
FasterCSV.foreach("importdata/tarife.csv", :headers => true, :col_sep => ',') do |row|
Anbieter.find_or_create_by_name(
:name => row['Anbieter_Name']
:hotline => row['Hotline'],
:email => row['Email']
@ryngonzalez
ryngonzalez / database.yml
Created Jul 18, 2011 — forked from amw/database.yml
Standard rails database.yml with additional definition of live database
View database.yml
development:
adapter: mysql2 # must =~ /mysql/
database: adamDb # required
username: your_user
password: keep_secret
live:
ssh_user: # optional, use if live system user differs from your dev user
host: example.com # required, can be IP
adapter: mysql2 # must =~ /mysql/
@ryngonzalez
ryngonzalez / functions.coffee
Created Mar 30, 2012
Functional Programming: simulating sine with an (approximate) infinite series…
View functions.coffee
apply = (f) ->
args = Array.prototype.slice.call(arguments, 1)
(x) ->
f.apply null, args.concat x
factorial = (n) ->
if n
factorial(n-1)*n
else
@ryngonzalez
ryngonzalez / gist:3806173
Created Sep 30, 2012
Foursquare ruby implementations
View gist:3806173
client = Foursquare.new(:oauthToken => "", :oauthSecret => "")
categories = client.categories()
goodCategories = []
categories.each do |category|
if category.name != "food" || category.name != "nightlife"
goodCategories.push(categoryId)
end
View dlist_test.cpp
#include "../unit-test-framework/unit_test_framework.h"
#include "../dlist.h"
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
using namespace std;
/********************************************************
@ryngonzalez
ryngonzalez / director.js
Created Dec 15, 2012
A small library for HTML5 Audio that executes a given function at particular time during playback.
View director.js
/**
* Copyright 2012 - Ryan Gonzalez - @ryngonzalez - ryan@ionizedmedia.com
*
* Director.js
*
* Takes an audio element and an
* object of functions and corresponding
* times to execute them during
* audio playback.
*
@ryngonzalez
ryngonzalez / toggleData.js
Created Jun 12, 2013
Toggle your data-attributes, yo.
View toggleData.js
(function(jQuery){
$.fn.toggleData = function(dataAttr, onState, offState) {
this.attr(dataAttr, this.attr(dataAttr) === onState ? offState : onState)
};
})($);
You can’t perform that action at this time.