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
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
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
<script src="jquery.min.js"></script> | |
<script src="jquery.github.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
$("#some-element").github({ | |
user: "joepettersson" | |
}); | |
}); |
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
#A better 'I should not see' for Capybara that lets jQuery determine visibility of the text you're looking for. | |
Then /^"([^\"]*)" should not be visible$/ do |text| | |
finder_script = %{ | |
function is_text_visible_on_page(text) { | |
var match = false; | |
$('*:visible') | |
.contents() | |
.filter(function() { | |
//collect text nodes |
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> | |
... | |
<link rel="stylesheet" href="prettygist.min.css"> | |
<script src="jquery.min.js"></script> | |
<script src="jquery.prettygist.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
$(".gist").prettyGist(); | |
}); | |
</script> |
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> | |
... | |
<link rel="stylesheet" href="prettygist.min.css"> | |
<script src="jquery.min.js"></script> | |
<script src="jquery.prettygist.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
$(".gist").prettyGist({ | |
extendedHeader: false | |
}); |
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> | |
... | |
<link rel="stylesheet" href="prettygist.min.css"> | |
<script src="jquery.min.js"></script> | |
<script src="jquery.prettygist.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
$(".gist").prettyGist({ | |
extendedHeader: false, | |
showFooter: false |
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 server () { | |
local port="${1:-8000}" | |
open "http://localhost:${port}/" | |
python -m SimpleHTTPServer "$port" | |
} |
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
#!/bin/bash | |
find . \( -iname '*.rb' -o -iname '*.css' -o -iname '*.js' -o -iname '*.erb' -o -iname '*.html' -o -iname '*.scss' \) -exec wc -l {} + | sort -n |
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
AL = function(type, url, callback) { | |
var el, doc = document; | |
switch(type) { | |
case 'js': | |
el = doc.createElement('script'); | |
el.src = url; | |
el.type = 'text/javascript'; | |
el.async = true; | |
break; |
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
source :rubygems | |
# We are not loading Active Record, nor Active Resources etc. | |
# We can do this in any app by simply replacing the rails gem | |
# by the parts we want to use. | |
gem "actionpack", "~> 3.2" | |
gem "railties", "~> 3.2" | |
gem "tzinfo" | |
# Let's use thin |
OlderNewer