Skip to content

Instantly share code, notes, and snippets.

View csirac2's full-sized avatar

Paul Harvey csirac2

View GitHub Profile
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index bc58078..5093ed5 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1021,6 +1021,15 @@ static void omap_hsmmc_do_irq(struct omap_hsmmc_host *host, int status)
struct mmc_data *data;
int end_cmd = 0, end_trans = 0;
+ if (!host->req_in_progress) {
+ do {
# `prepare_dir_tarball some_dir`
#
# Given a directory name in the pwd (with NO trailing slash), create or update
# `some_dir.tar.gz` only if the contents of the tarball would actually change.
#
# Although Dockerfiles allow you to ADD a directory, this isn't cacheable.
# Instead, maintain a tarball which allows you to ADD a host directory as a file
# which *is* cacheable. I.E.:
#
# Prior to running your container:
#!/bin/sh
#On Jessie this can now be:
. /lib/cryptsetup/cryptdisks.functions
FORCE_START=1 do_start
@csirac2
csirac2 / btrfs-unstable-atime-bug.sh
Last active August 29, 2015 14:16
a test to show that atimes are always updating on empty dirs in read-only snapshots which were subvol parents, unlike plain empty dirs, regardless of mounting with noatime
#!/bin/sh
set -e
get_atime() {
ls -lad --time=atime --time-style='+%Y-%m-%dT%H:%M:%S%z' "$1" | tail -n+1 \
| cut -d ' ' -f6 -
}
FAIL=0
test_atime_stable() {
#!/usr/bin/perl -wT
use warnings;
use strict;
sub _stashText {
my ($fragment, $map, $key) = @_;
my $id = $map->{index};
ASSERT(ref($map) eq 'HASH') if DEBUG;
@csirac2
csirac2 / ensureIndexOnDBs.js
Created April 26, 2011 06:25
MongoDB ensureIndex on all databases
var databases = db.adminCommand('listDatabases')['databases'];
for (var item in databases) {
db = db.getMongo().getDB(item['name']);
db.current.ensureIndex({_web: 1});
db.current.ensureIndex({_topic: 1});
db.current.ensureIndex({'TOPICINFO.author': 1});
db.current.ensureIndex({'TOPICINFO.date': 1});
db.current.ensureIndex({'CREATEINFO.author': 1});
db.current.ensureIndex({'CREATEINFO.date': 1});
@csirac2
csirac2 / mongodb_count_all_dbs.js
Created May 8, 2011 09:30
MongoDB count all documents in a collection across all databases
var databases = db.adminCommand('listDatabases')['databases'];
var count = 0;
for (var item in databases) {
print(databases[item]['name']);
count = count + db.getMongo().getDB(databases[item]['name']).current.count();
}
@csirac2
csirac2 / CharacterTests.pm
Created June 1, 2011 14:14
CharacterTests - beginning utf8 stress tests for foswiki
package CharacterTests;
use strict;
use warnings;
# Using utf8, so we can have interesting chars in the source code.
use utf8;
use FoswikiFnTestCase;
our @ISA = qw( FoswikiFnTestCase );
@csirac2
csirac2 / Addressable.pm
Created August 20, 2011 07:25
Foswiki::Addressable ?
# See bottom of attachment for default license and copyright information
package Foswiki::Contrib::MigrationScriptsContrib::Roles::FoswikiAddressable;
use Moose::Role;
use Assert;
use Foswiki::Func();
use Foswiki::Meta();
use Foswiki::Address();
@csirac2
csirac2 / UTF8Tests.pm
Created September 30, 2011 09:28
some test madness
package UTF8Tests;
use strict;
use warnings;
# TODO: Exercise
# $Foswiki::cfg{Site}{CharSet}
# $Foswiki::cfg{UseLocale}
# $Foswiki::cfg{Site}{Locale}
# $Foswiki::cfg{Site}{Lang}
# $Foswiki::cfg{Site}{FullLang}