Skip to content

Instantly share code, notes, and snippets.

Rob Levin roblevintennis

Block or report user

Report or block roblevintennis

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
@roblevintennis
roblevintennis / Snippet: Github PR Files List
Created Jun 14, 2019
chrome snippet to get a list of Github PR files. Useful for then listing the acceptance criteria for a PR.
View Snippet: Github PR Files List
var log = []
document.querySelectorAll('.file-info > a').forEach(node => log.push(node.text))
console.log(log.join('\n'));
View Spying-on-JavaScript-dependencies.js
// How will we move forward given ES6 module imports cannot be spied on e.g. you'll get error:
// Cannot set property of #<Object> which has only a getter
// Unless you transpile down to CommonJS (which works for now but probably not forever)
// Below are some ideas…
// ---- Dependency Injection ---- //
// Implementation
View stylesheets_icons_new-idea.diff
diff --git a/app/assets/stylesheets/basic.scss b/app/assets/stylesheets/basic.scss
index 153ae768ab4..9009d6d2d21 100644
--- a/app/assets/stylesheets/basic.scss
+++ b/app/assets/stylesheets/basic.scss
@@ -1,6 +1,5 @@
@import "app/assets/stylesheets/common/css_reset";
@import "app/assets/stylesheets/common/utilities";
@import "app/assets/stylesheets/basic/common";
-@import "mavenlink-js/src/stylesheets/styleguide/components/icons/icons-new";
@import "app/assets/stylesheets/basic/landing";
@roblevintennis
roblevintennis / example.erb
Last active Jul 17, 2018
String Interpolation Refactoring Examples
View example.erb
<% svgIconName = ''
case story.story_type
when 'deliverable'
svgIconName = 'icon-deliverable'
when 'milestone'
svgIconName = 'icon-milestone'
when 'task'
svgIconName = 'icon-task'
when 'issue'
svgIconName = 'icon-issue'
@roblevintennis
roblevintennis / stack_trace.coffee
Last active May 12, 2017
coffeescript stack trace
View stack_trace.coffee
getStackTrace = ->
stack = (new Error).stack or ''
stack = stack.split('\n').map((line) ->
line.trim()
)
stack.splice if stack[0] == 'Error' then 2 else 1
onRender: ->
console.log("Custom stack trace:")
console.log(getStackTrace().join('\n'))
View Gannon Cannons - SVG Splatter Blocks.markdown

Gannon Cannons - SVG Splatter Blocks

Chris Gannon rocks at SVG animation. This is just me studying his stuff and a total buffoonery not to be taken seriously! Go look at Chris's original here: http://codepen.io/chrisgannon/pen/wKReBX as this is just a decomposition for me to figure out what the dude's doing cuz "imitation is the sincerest form of flattery" and all dat jazz :-)

A Pen by Rob Levin on CodePen.

License.

View gist:69e68a5123d38e1f38af
user = User.find(ID_FOUND_IN_USERS_TABLE)
200.times { |n|
w = Workspace.new(:title => 'Workspace-' + n.to_s, :creator_team => 'buyer')
w.creator = user
w.save!
}
View gist:3683c480684f7c822f8a
require 'fixjour'
require File.expand_path("./spec/spec_helpers/builders.rb")
include Fixjour
w = Workspace.find( YOUR_WORKSPACE_ID_HERE )
60.times { |n| create_story(workspace: w, title: n) }
@roblevintennis
roblevintennis / gist:865de775fb988bfad9a1
Last active May 7, 2017
Responsive Inline SVGs Sass Mixin
View gist:865de775fb988bfad9a1
$svg-container-namespace: '.svg-container';
//Give 'em' 1:1 responsive container by default
#{$svg-container-namespace} {
display: inline-block;
position: relative;
height: 0;
width: 100%;
padding: 0;
//Default for 1:1 aspect ratio
@roblevintennis
roblevintennis / gist:7347791c906a72c2e166
Last active Aug 29, 2015
Inline SVG with Cacheable External File Mixin
View gist:7347791c906a72c2e166
// Example using multiple colors with SVG Sprites .. see it in an example with:
// $ git clone -b svg-inline-experiments --single-branch https://github.com/unicorn-ui/Buttons.git Buttons && cd Buttons && npm install && pushd svg-builder && npm install && grunt && popd && grunt dev
@mixin svgColors($fillColor: false, $color: false, $patchCurrentColorForIE: false) {
@if $fillColor {
fill: $fillColor;
}
@if $color {
You can’t perform that action at this time.