Skip to content

Instantly share code, notes, and snippets.

View ryenbeatty's full-sized avatar
🐢

Ryen Beatty ryenbeatty

🐢
View GitHub Profile

Keybase proof

I hereby claim:

  • I am ryenbeatty on github.
  • I am ryen (https://keybase.io/ryen) on keybase.
  • I have a public key ASCEnLpszLA4w2LHfKpRxMZLHzEgU21lpdcqxoRBPAWMVwo

To claim this, I am signing this object:

@ryenbeatty
ryenbeatty / importFramework.js
Created December 14, 2016 16:24
Imporing Cocoa frameworks into Sketch
/* @flow */
const importFramework = (name: string, dir: string = 'System/Library/Frameworks') => {
const mocha = Mocha.sharedRuntime();
return mocha.loadFrameworkWithName_inDirectory(name, NSString.stringWithString(dir));
};
export default importFramework;
// range :: Number -> Number -> [Number]
function range(from, to) {
var result = [];
while (from < to) {
result.push(from);
from += 1;
}
return result;
}
@ryenbeatty
ryenbeatty / rdio.js
Last active November 17, 2015 05:22
import fs from 'fs'
import data from 'rdio_collection.json'
import { split, replace, compose, map, uniq, pick } from 'ramda'
import { Map } from 'immutable'
const d = data.collection;
const out = './artists_albums.json';
const log = (x) => { console.log(x); return x; }
// getArtists :: Object -> Map
46.51.216.186 www.facebook.com facebook.com
46.51.216.186 www.twitter.com twitter.com
46.51.216.186 www.instagram.com instagram.com
# path to oh-my-zsh
export ZSH=$HOME/.oh-my-zsh
# theme
# ~/.oh-my-zsh/themes/
ZSH_THEME="sorin"
# plugins to load
# custom plugins ~/.oh-my-zsh/custom/plugins/
# eg: plugins=(rails git textmate ruby lighthouse)
gulp = require 'gulp'
coffee = require 'gulp-coffee'
sass = require 'gulp-ruby-sass'
prefix = require 'gulp-autoprefixer'
minify = require 'gulp-cssmin'
uglify = require 'gulp-uglify'
watch = require 'gulp-watch'
rename = require 'gulp-rename'
coffee_files = './app/assets/coffee/*.coffee'
@ryenbeatty
ryenbeatty / gulpfile.js
Last active August 29, 2015 14:16
Gulpfile (bootstraps gulpfile.coffee)
require('coffee-script/register');
require('./gulpfile.coffee');
# An example with classes building components.
# This stuff is a little fiddly to get set up,
# but once it's working it's great - you can just
# add new instances of the components, and each
# components holds references to all of its
# children. You can set defaults & states for each
# component separately.
#
# (try clicking on the post author, and then on each
# of the comments on a post)
@ryenbeatty
ryenbeatty / anchorScroll.js
Last active August 29, 2015 14:11
Anchor Scroll plugin
$(".scroll").click(function(e) {
e.preventDefault();
var target = $(this).attr('href'),
position = $(target).length > 0 ? $(target).offset().top : 0;
$('body, html').animate({
scrollTop: position - 70
});
});