This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
# rubytles.rb | |
class I | |
def self.love(s) | |
"I <3 #{s}" | |
end | |
end | |
def love(_, &block) | |
yield "you" |
function slugify(text) | |
{ | |
return text.toString().toLowerCase() | |
.replace(/\s+/g, '-') // Replace spaces with - | |
.replace(/[^\w\-]+/g, '') // Remove all non-word chars | |
.replace(/\-\-+/g, '-') // Replace multiple - with single - | |
.replace(/^-+/, '') // Trim - from start of text | |
.replace(/-+$/, ''); // Trim - from end of text | |
} |
#!/usr/bin/env ruby | |
# Ruby varnish purger | |
require 'net/http' | |
module Net | |
class HTTP::Purge < HTTPRequest | |
METHOD='PURGE' | |
REQUEST_HAS_BODY = false | |
RESPONSE_HAS_BODY = true |
// 1.- This mixin works when you add class retina by JavaScript to html tag or when you use media queries | |
// 2.- This solution works with the sprites of http://compass-style.org/ | |
// 3.- If your retina sprite have a diferente size with your regular sprite you can set the image with the folowing mixin: | |
$icons-retina: sprite-map("icons-retina/*.png"); | |
@mixin background-retina($file-name) { | |
background: $icons-retina; | |
$ypos: round(nth(sprite-position($icons-retina, $file-name), 2) / 2); | |
background-position: 0 $ypos; |
Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.
In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j