Skip to content

Instantly share code, notes, and snippets.

View jeremyroman's full-sized avatar

Jeremy Roman jeremyroman

View GitHub Profile
@jeremyroman
jeremyroman / gist:8680763
Created January 29, 2014 02:35
taurine postmortem timeline
Timeline (all times EST):
unknown (est. 6:30 PM): mcchong begins running simulations ("java a1b") on taurine using many processes, each using a great deal
7:11:48 PM: taurine runs out of memory and swap (8+2 GB), and the OOM killer is invoked for the first time. Following this, the OOM killer is repeatedly invoked at intervals of between 15 and 120 seconds).
7:45:?? PM: users begin complaining in #csc that taurine is unresponsive
7:47:32 PM: final taurine syslog entry before reboot
7:48:?? PM: m4burns, responding to similar complaints in the office, reboots taurine via ILOM
7:50:11 PM: syslog resumes after reboot
7:50:23 PM: sshd begins listening after reboot
7:50:36 PM: syscom regains access to taurine via ssh (user jbroman authenticated)
8:09:?? PM: consensus built that mcchong's java processes (which have reappeared since reboot) were responsible for the outage
Thank you for sending me CSC's information for this term.
In case you are not already aware, due to your late submission, your budget will not be considered at the budget meeting on Wednesday. The reason for this is because of MathSoc's Policy 6.3.1, which reads:
"If a club fails to submit its complete budget package on time, its package shall not be considered at the budget meeting, even if submitted before the meeting, and the club's funding shall be withheld until its budget is approved by Council."
If you have any questions or concerns regarding the above, please let me know.
Thank you,
@jeremyroman
jeremyroman / setuid.c
Last active August 29, 2015 13:56
setuid by id
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char* argv[]) {
uid_t uid = (uid_t) atoi(argv[1]);
setuid(uid);
execl("/bin/sh", "sh", (char*) 0);
return 1;
}
@jeremyroman
jeremyroman / index.html
Created July 8, 2014 21:26
DAOListView + Array = wtf?
<!DOCTYPE html>
<script src="foam/core/bootFOAM.js"></script>
<link rel="stylesheet" href="foam/core/foam.css">
<script>
MODEL({
name: 'Widget',
properties: ['gizmo'],
});
@jeremyroman
jeremyroman / README.md
Created July 10, 2014 19:11
DAOListView + DAOListView = ???

Expected: can see three lists of detail views. Actual: can only see the first one; inspecting the DOM reveals that all three of the nested list views have the same ID (in my case, view3)

<!DOCTYPE html>
<script src="foam/core/bootFOAM.js"></script>
<link rel="stylesheet" href="foam/core/foam.css">
<script>
MODEL({
name: 'Gadget',
properties: ['id', 'inventor'],
});
@jeremyroman
jeremyroman / textblob-counter.diff
Created September 24, 2014 21:14
text blob counting patch
diff --git a/Source/core/rendering/TextPainter.cpp b/Source/core/rendering/TextPainter.cpp
index 3901813..4133ea0 100644
--- a/Source/core/rendering/TextPainter.cpp
+++ b/Source/core/rendering/TextPainter.cpp
@@ -178,6 +178,8 @@ static bool graphicsContextAllowsTextBlobs(GraphicsContext* context)
return !context->strokeGradient() && !context->strokePattern() && !context->fillGradient() && !context->fillPattern();
}
+static unsigned long g_totalBlobsPainted = 0;
+
@jeremyroman
jeremyroman / gist:255e8b820c7d64479af1
Created July 8, 2015 14:37
SimpleShaperTest excerpt
class TestFontSelector : public FontSelector {
public:
static PassRefPtr<TestFontSelector> create(const String& path)
{
WebUnitTestSupport* unitTestSupport = Platform::current()->unitTestSupport();
String filePath = unitTestSupport->webKitRootDir() + path;
RefPtr<SharedBuffer> fontBuffer = static_cast<PassRefPtr<SharedBuffer>>(unitTestSupport->readFromFile(filePath));
return adoptRef(new TestFontSelector(FontCustomPlatformData::create(fontBuffer.get())));
}
@jeremyroman
jeremyroman / pre-commit
Created January 15, 2016 16:58
pre-commit hook
#!/bin/sh
if [[ "$(git symbolic-ref HEAD)" = "refs/heads/master" ]]; then
echo "Refusing to commit on master." >&2
exit 1
fi
@jeremyroman
jeremyroman / api_signature.cc
Created December 22, 2016 19:59
WDYT of templating APISignature::ParseArgumentsImpl
namespace {
class V8ParsingBuffer {
public:
V8ParsingBuffer(std::vector<v8::Local<v8::Value>> values, v8::Isolate* isolate)
: values_(values), isolate_(isolate) {}
void AddNull() { values_.push_back(v8::Null(isolate)); }
std::nullptr_t GetParsedArgumentBuffer() { return nullptr; }
void AddParsedArgument(v8::Local<v8::Value> value) { values_->push_back(value); }
private: