Skip to content

Instantly share code, notes, and snippets.

View donnielrt's full-sized avatar

Donnie Thomas donnielrt

View GitHub Profile
[ 2672.341469] usb 1-1: USB disconnect, device number 2
[ 2672.357536] sd 2:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
[ 2672.357539] sd 2:0:0:0: [sdb] tag#0 CDB: Write(10) 2a 00 06 62 1b c0 00 00 f0 00
[ 2672.357541] print_req_error: I/O error, dev sdb, sector 107092928
[ 2672.357581] EXT4-fs warning (device sdb1): ext4_end_bio:322: I/O error 10 writing to inode 3932539 (offset 50331648 size 4194304 starting block 13387008)
[ 2672.357583] Buffer I/O error on device sdb1, logical block 13386496
[ 2672.357587] Buffer I/O error on device sdb1, logical block 13386497
[ 2672.357588] Buffer I/O error on device sdb1, logical block 13386498
[ 2672.357589] Buffer I/O error on device sdb1, logical block 13386499
[ 2672.357591] Buffer I/O error on device sdb1, logical block 13386500
@donnielrt
donnielrt / jsdom
Last active August 29, 2015 14:20
// Using JSDOM 3.1.2 on node.js
var jsdom = require("jsdom").jsdom;
var generatorMarkup = '<html><head><title>Hola</title></head><body>Body</body></html>';
var doc = jsdom(generatorMarkup, {
loaded: function() {
console.log('Loaded');
},
done: function(errors, window) {
@donnielrt
donnielrt / view-ui.js
Created June 12, 2014 18:20
Lazy loading images
$(document).ready(function() {
$('.load-more').click(function() {
$('img.x-lazy').each(function() {
var $img = $(this);
$img.attr('src', $img.attr('data-original'));
});
});
});
Overall a fantastic product that keeps getting better with each update. Great job!
Some feature requests:
* Ability to export/backup on a schedule. It makes me very nervous that all my passwords live in LastPass, and if I get locked out tomorrow, there's a chance that I can get locked out. I realize that I can log in to my account when offline, but that's not the same. Let's say you guys freeze my account accidentally or something - I've lost access, and have nowhere to turn to.
However, if you linked to my Google Drive/Dropbox and uploaded a Truecrypt file of my passwords (just as an exmaple), I would feel much better about this! That way even if I'm locked out, I can access my files.
I used to use KeePass synced with Gdrive earlier, and this is the biggest feature I miss :(
* Generated passwords aren't merged after clicking 'save new sites' - there's an extra entry for the generated password
'use strict';
var chalk = require('chalk');
var table = require('text-table');
module.exports = {
reporter: function (result, config, options) {
var total = result.length;
var ret = '';
var headers = [];
var prevfile;
@donnielrt
donnielrt / ajaxComplete
Created September 10, 2013 17:23
So you basically monitor ajaxComplete to see if the elements you want have been created
jQuery(document).bind('ajaxComplete', function(e, xhr, settings) {
// Check to see if this AJAX call is the one you want
if($("#whatever").length) {
// Do something
}
// Or just check the URL to see if it's the AJAX call to the page we want:
if(settings.url.match(/my-url/)) {
// Do something
}