I hereby claim:
- I am andersdjohnson on github.
- I am andersdjohnson (https://keybase.io/andersdjohnson) on keybase.
- I have a public key ASBoMNJKbZ96SGvQXpSqFIq-41CVixOc-1JBgignRZ3BHwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
/** | |
* Hacks to detect Bootstrap version (2 vs. 3) from JavaScript. | |
* Does some detection of stringified functions - should be safe against most minification, but please test! | |
* | |
* Example: | |
* ```js | |
* bootstrapVersionDetect.isVersion('2', $); | |
* ``` | |
* | |
* May not be necessary soon for Bootstrap 3+, @see https://github.com/twbs/bootstrap/pull/13578 |
var until = function (selector, time, callback) { | |
var $match = $(selector); | |
if ($match.length) { | |
return callback($match); | |
} | |
setTimeout(function () { | |
until(selector, time, callback); | |
}, time); | |
}; |
class ConditionalSpec extends GebReportingSpec { | |
/** | |
* This should get us to SomePage, handling any interim pages. | |
*/ | |
def getToSomePage () { | |
waitFor { | |
if (isAt(SomePage)) { | |
println "at some page" | |
return true |
var Q = require('q'); | |
var xml2js = require('xml2js'); | |
module.exports = function (input) { | |
var deferred = Q.defer(); | |
var parser = new xml2js.Parser(); | |
parser.parseString(input, function (err, stdout, stderr) { | |
if (err) { | |
return deferred.reject(err); | |
} |
var csv = require('csv'); | |
csv() | |
.from.path(__dirname+'/export.csv', { delimiter: ',', escape: '"' }) | |
.to.array( function(data){ | |
var labels = data.shift(); | |
var items = []; | |
data.forEach(function (row) { | |
var item = {}; | |
row.forEach(function (value, index) { |
var https = require('https'), | |
user = process.argv[2], | |
opts = parseOpts(process.argv.slice(3)) | |
request('/users/' + user, function (res) { | |
if (!res.public_repos) { | |
console.log(res.message) | |
return | |
} | |
var pages = Math.ceil(res.public_repos / 100), |
/** | |
* http://blakepetersen.io/how-to-clean-up-chrome-and-safaris-webfont-rendering/ | |
*/ | |
.smooth-stroke { | |
-webkit-font-smoothing: antialiased; | |
-webkit-text-stroke-width: .5px; | |
-webkit-text-stroke-color: rgba(0,0,0,0.5); | |
} |
wget --recursive --domains gnupg.org --no-parent --page-requisites --html-extension --convert-links --restrict-file-names=windows --no-clobber |
# See: http://www.houseofding.com/2008/11/generate-a-self-signed-ssl-certificate-for-local-development-on-a-mac/ | |
# Generate a host key | |
ssh-keygen -f host.key | |
# Generate a certificate request file | |
openssl req -new -key host.key -out request.csr | |
# Create a self-signed SSL certificate using the request file. | |
openssl x509 -req -days 365 -in request.csr -signkey host.key -out server.crt |