This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var {nodeInterface, nodeField} = nodeDefinitions( | |
(globalId) => { | |
var {type, id} = fromGlobalId(globalId); | |
if (type === 'Person') | |
return Person.get(id); | |
if (type === 'Group') | |
return Group.get(id); | |
if (type === 'CallAssignment') | |
return CallAssignment.get(id); | |
if (type === 'Call') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, json | |
from bsdapi.BsdApi import Factory | |
from bsdapi.RequestGenerator import RequestGenerator | |
from bsdapi.URL import URL | |
from django.conf import settings | |
from time import time | |
api = Factory().create( | |
id=settings.BSD_ID, secret=settings.BSD_SECRET, | |
host=settings.BSD_HOST, port='80', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0.3.2 request payload: {"query":"query AppHomeRoute{widget(id:\"hi\"){id,...__RelayQueryFragment024i1nd}} fragment __RelayQueryFragment024i1nd on Widget{name,id}","variables":{}} | |
0.4.0 request payload: {"query":"query AppHomeRoute{widget{id,...__RelayQueryFragment024i1nd}} fragment __RelayQueryFragment024i1nd on Widget{name,id}","variables":{}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 ([email protected]) joined the channel. | |
[11:06:00] liranp ([email protected]) joined the channel. | |
[11:06:54] plucas ([email protected]) 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 ([email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location = / { | |
alias /mockingbird/frontend/static/; | |
} | |
location / { | |
proxy_pass http://backend; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
found_previously_successful_charge = false | |
Card.load_all({:number => card.number, :merchant => card.merchant}, {:limit => 10, :sort => [[:created, :desc]]}) do |c| | |
Charge.load_all({:merchant => card.merchant, :livemode => card.livemode, :authorized => true, :card => card.token}, {:limit => 2}) do |ch| | |
if ch.token != charge.token | |
found_previously_successful_charge = true | |
break | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="javascript:(function() { eles = $('*[id]'); eles.each(function(index, element) { var linkName = $(this).attr('id'); var link = $('<a></a>'); link.attr('href', '#' + linkName); link.text('# '); $(this).prepend(link); }); })()">Linkify</a> |