Skip to content

Instantly share code, notes, and snippets.

View saikat's full-sized avatar

Saikat Chakrabarti saikat

View GitHub Profile
/*
* AppController.j
* TestScrollBug
*
* Created by You on March 10, 2014.
* Copyright 2014, Your Company All rights reserved.
*/
@import <Foundation/Foundation.j>
@import <AppKit/AppKit.j>
def remote_log_tailer(host, log_file=''):
line_number = 1
inventory_file = "ansible/%s" % env['environment']
while True:
output = check_output(["/usr/local/bin/ansible", host, "-i", inventory_file, "-a", "tail -n +%s %s" % (str(line_number), log_file)], env={'ANSIBLE_HOST_KEY_CHECKING' : str(env['check_host_key'])}, stderr=STDOUT)
output_lines = output.strip().splitlines()
output_lines.pop(0)
if len(output_lines) > 0:
line_number = line_number + len(output_lines)
print bcolors.OKGREEN + '\n'.join(output_lines) + bcolors.ENDC
location = / {
alias /mockingbird/frontend/static/;
}
location / {
proxy_pass http://backend;
}
[11:05:24] <saikat> what is exit code 128 in the context of a docker container? I just had a very strange situation where my docker daemon was tking up tons of memory. I tried killing one container, and that caused all my containers to die with exit code 128
[11:05:27] <exarkun> You expect people to know your private definition of "really"? :)
[11:05:28] <cpuguy83> exarkun: DB process crashed, db is corrupted, db process won't start.
[11:05:53] intellix (~intellix@c2-208.i07-1.onvol.net) joined the channel.
[11:06:00] liranp (~liranp@46.117.212.98) joined the channel.
[11:06:54] plucas (~plucas@rrcs-24-199-133-109.midsouth.biz.rr.com) left IRC. (Ping timeout: 245 seconds)
[11:06:55] <saikat> and now removing the dead containers is complaining about "Error response from daemon: Cannot destroy container 484eb73e02f9: Driver devicemapper failed to remove root filesystem 484eb73e02f92f31f323a568b4e4f699ebf119e238abb5faa14b2b04a6b9ba50: Device is Busy"
[11:07:05] ostera (~ostera@host219.190-139-126.telec
@implementation BorderlessWindow
- (id)initWithContentRect:(NSRect)contentRect
styleMask:(unsigned int)aStyle
backing:(NSBackingStoreType)bufferingType
defer:(BOOL)flag {
self = [super initWithContentRect:contentRect
styleMask:CPBorderlessBridgeWindowMask];
return self;
- (void)performDragOperation:(CPDraggingInfo)aSender
{
var data = [[aSender draggingPasteboard] dataForType:WidgetDragType];
var widget = [CPKeyedUnarchiver unarchiveObjectWithData:data];
var dropLocationX = [aSender draggedViewLocation].x - [[aSender draggingSource] frame].size.width;
var dropLocationY = [aSender draggedViewLocation].y - [[aSender draggedView] frame].size.height;
[widget setFrameOrigin:CGPointMake (dropLocationX, dropLocationY)];
[self addSubview:widget];
}
@implementation WidgetView : CPView
{
Widget _widget;
}
- (void)setSelected:(BOOL)isSelected
{
[self setBackgroundColor:isSelected ? [CPColor grayColor] : nil];
}
widgetsCollection = [[CPCollectionView alloc] initWithFrame:bounds];
[widgetsCollection setMinItemSize:CGSizeMake(100, 100)];
[widgetsCollection setMaxItemSize:CGSizeMake(100, 100)];
[widgetsCollection setAutoresizingMask:CPViewWidthSizable];
[widgetsCollection setDelegate:self];
var itemPrototype = [[CPCollectionViewItem alloc] init];
[itemPrototype setView:[[WidgetView alloc] initWithFrame:CGRectMakeZero()]];
@implementation WidgetView : CPView
{
Widget _widget;
}
- (void)setSelected:(BOOL)isSelected
{
[self setBackgroundColor:isSelected ? [CPColor grayColor] : nil];
}
@implementation WidgetView : CPView
{
Widget _widget;
}
- (void)setSelected:(BOOL)isSelected
{
[self setBackgroundColor:isSelected ? [CPColor grayColor] : nil];
}