Create a shallow clone with the last fifty commits.
git clone --depth 50 some-repository
Open the current diff in the editor.
git add -e
View ALL branches:
git branch -a master
Fetch changes from all remote repositories.
def view_css | |
path = "views/#{params[:controller]}/#{params[:action]}" | |
stylesheet_link_tag(path) unless Rails.application.assets.find_asset(path).nil? | |
end |
config.assets.precompile += [ | |
# precompile any CSS or JS file that doesn't start with _ | |
/(^inline[^_\/]|\/[^_])[^\/]*.(js|css)$/, | |
... |
Create a shallow clone with the last fifty commits.
git clone --depth 50 some-repository
Open the current diff in the editor.
git add -e
View ALL branches:
git branch -a master
Fetch changes from all remote repositories.
# just add these lines to development.rb | |
config.assets.debug = false | |
config.serve_static_assets = true | |
config.assets.js_compressor = :uglifier | |
config.assets.digest = true | |
# then on the command line | |
rake assets:precompile && rails s |
// Macro: "data-track-gtm - get from element" | |
// Returns: Boolean - does this element, or one of its parents, have a data-track-gtm attribute? | |
function() { | |
var isSet = function(val) { | |
return val !== null && val !== ''; | |
}; | |
var el = {{element}}; | |
var val = el.getAttribute('data-track-gtm'); | |
while (el && el !== document.body && !isSet(val)) { |
require 'rmagick' | |
source = ARGV[0] | |
Dir.glob('images/' + source + '/*.*').each do |retina_path| | |
mobile_path = retina_path.sub(/retina/, 'normal') | |
retina_file = File.new(retina_path) | |
mobile_file = File.new(mobile_path) if File.exist?(mobile_path) |
.shureicons-font { | |
font-family: 'shureicons'; | |
-webkit-font-smoothing: subpixel-antialiased; | |
} | |
@mixin logo($height) { | |
@include box-sizing(border-box); | |
display: block; | |
height: $height; | |
padding-top: $height; |
<!doctype html> | |
<html> | |
<head> | |
<title>Easy GA debugging - to test, add ?ga_debug to the URL</title> | |
<script> | |
var _gaq = _gaq || []; | |
var _ga_debug = window.location.href.indexOf('ga_debug') !== -1; | |
_gaq.push(['_setAccount', 'UA-00000000-1']); | |
_gaq.push(['_trackPageview']); |