- Alfred
- OmniFocus
- 1Password
- Transmit
- Sublime Text
- MAMP
- ssh/cli/cPanel
- CodeKit
- Dropbox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NewPostNotification < Noticed::Base | |
# ... other deliver methods | |
deliver_by :web_push, data_method: :web_push_data | |
def web_push_data | |
{ | |
title: "New post: #{post.title}", | |
body: post.content.truncate(40), | |
url: post_url(post), | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<!-- other head content --> | |
<%= turbo_refreshes_with method: :morph, scroll: :preserve %> | |
<%= content_for :head %> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
workbook = RubyXL::Workbook.new | |
worksheet = workbook.worksheets[0] | |
# Style to highlight red | |
style = RubyXL::DXF.new | |
style.font = RubyXL::Font.new | |
style.font.color = RubyXL::Color.new("FF0000") | |
# Add style to workbook | |
workbook.stylesheet.dxfs ||= RubyXL::DXFs.new # This was my initial problem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def click_nav(label) | |
within "#desktop-nav" do | |
click_on label | |
end | |
end | |
scenario "navigate to projects page" do | |
click_nav "Projects" | |
expect(page).to have_content "Projects" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ApplicationHelper | |
def polymorphic_render(resource, suffix = nil, options = {}) | |
if resource.nil? | |
return | |
elsif resource.is_a? Array | |
capture do | |
resource.each { |res| concat polymorphic_render(res, suffix, options) } | |
end | |
elsif resource.respond_to? :to_partial_path | |
path = [resource.to_partial_path, *Array(suffix)].compact_blank.join('_') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*: | |
# Swift Protocol Generics | |
In reference to [Secret Projects Diary #2: Swift 2.0 Protocols](http://inessential.com/2015/07/19/secret_projects_diary_2_swift_2_0_prot): | |
An variable of type `[Feed]` means that it could have a `LocalFeed` and a `FeedlyFeed`, which may be intentional, but i think not in this case. I am assuming that the `FeedlyFolder` could be typed as `[FeedlyFeed]`. If that is the case, making the Folder protocol be generic with a constraint of Feed should do the trick. | |
*/ | |
import Cocoa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am jbennett on github. | |
* I am jbennett (https://keybase.io/jbennett) on keybase. | |
* I have a public key whose fingerprint is D348 CC45 ABAD D4FA 656D 65CC 5D35 198B 67D3 3F55 | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var autoprefixer = require('gulp-autoprefixer'), | |
concat = require('gulp-concat'), | |
filter = require('gulp-filter'), | |
gulpif = require('gulp-if'), | |
minify = require('gulp-minify-css'), | |
plumber = require('gulp-plumber'), | |
rename = require('gulp-rename'), | |
sass = require('gulp-sass') | |
uglify = require('gulp-uglify'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function debounce(func, wait, immediate) { | |
var timeout; | |
return function() { | |
var context = this, args = arguments; | |
clearTimeout(timeout); | |
timeout = setTimeout(function() { | |
timeout = null; | |
if (!immediate) func.apply(context, args); | |
}, wait); | |
if (immediate && !timeout) func.apply(context, args); |
NewerOlder