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
ERROR: apport (pid 23850) Tue Sep 1 21:07:32 2015: Unhandled exception: | |
Traceback (most recent call last): | |
File "/usr/share/apport/apport", line 54, in drop_privileges | |
stat = os.stat('/proc/' + pid) | |
FileNotFoundError: [Errno 2] No such file or directory: '/proc/43' | |
During handling of the above exception, another exception occurred: | |
Traceback (most recent call last): | |
File "/usr/share/apport/apport", line 276, in <module> |
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
#!/usr/bin/python3 | |
# Collect information about a crash and create a report in the directory | |
# specified by apport.fileutils.report_dir. | |
# See https://wiki.ubuntu.com/Apport for details. | |
# | |
# Copyright (c) 2006 - 2011 Canonical Ltd. | |
# Author: Martin Pitt <martin.pitt@ubuntu.com> | |
# | |
# This program is free software; you can redistribute it and/or modify it |
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
server { | |
listen 80; | |
server_name localhost; | |
root /swelly/static; | |
location / { | |
try_files index.html =404; | |
} | |
location /api { | |
proxy_pass http://127.0.0.1:3000/api; | |
} |
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
class Bunch(dict): | |
def __init__(self, *args, **kwds): | |
super(Bunch, self).__init__(*args, **kwds) | |
self.__dict__ = self |
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
// | |
// in AppDelegate | |
// | |
// Initialize RestKit Shared Client | |
RKObjectManager *objectManager = [RKObjectManager objectManagerWithBaseURLString:_baseURL]; | |
// Enable automatic network activity indicator management | |
objectManager.client.requestQueue.showsNetworkActivityIndicatorWhenBusy = YES; | |
// Initialize object store |
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 Domain = require('domain') | |
var d1 = Domain.create(); | |
var emitter; | |
d1.on('error', handleCreateErr) | |
d1.run(function () { | |
emitter = createEmitter() | |
}) | |
var d2 = Domain.create(); |
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 fn = function(one, two, three, callback) { | |
var args = Array.prototype.slice.apply(arguments); | |
var lastArg = args.pop() | |
if (callback !== lastArg && typeof lastArg == 'function') { | |
callback = lastArg; | |
arguments[args.length] = undefined; // not -1 bc of pop above | |
} | |
// Handle undefined values, by setting default value | |
// .. Rest of function .. | |
} |
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
#!/usr/bin/env node | |
# Usage: docker run [..opts] `publish-static <image>:<tag>` | |
'use strict' | |
const execSync = require('child_process').execSync | |
const image = process.argv[2] | |
const inspect = JSON.parse( | |
execSync('docker inspect ' + image).toString() |
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
{ | |
//... | |
// plugins | |
plugins: [ | |
'karma-*', | |
{ | |
'middleware:custom': ['factory', function (config) { | |
return function (req, res, next) { | |
console.log('HELLO!') | |
res.end('hello-world') |
OlderNewer