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
$ python xlogd.py sample.log | |
parsed: {'appname': 'test.app', 'timestamp': '2012-09-06 15:19:32', 'hostname': 'codezone.local', 'pid': '68898', 'priority': '132', 'message': 'bla bla bla warn'} | |
parsed: {'appname': 'test.app', 'timestamp': '2012-09-06 15:19:32', 'hostname': 'codezone.local', 'pid': '68902', 'priority': '131', 'message': 'bla bla bla error'} | |
parsed: {'appname': 'Dock', 'timestamp': '2012-09-06 15:19:32', 'hostname': 'codezone.local', 'pid': '154', 'priority': '11', 'message': 'CGSReleaseWindowList: called with 5 invalid window(s)'} | |
parsed: {'appname': 'WindowServer', 'timestamp': '2012-09-06 15:19:32', 'hostname': 'codezone.local', 'pid': '79', 'priority': '11', 'message': 'CGXSetWindowListAlpha: Invalid window 0'} |
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
================================= test session starts ================================= | |
platform linux -- Python 3.7.0, pytest-3.7.3, py-1.6.0, pluggy-0.7.1 | |
rootdir: /home/user/j/jade/newsrc/pyramid_res, inifile: | |
collected 0 items / 1 errors | |
======================================= ERRORS ======================================== | |
___________________ ERROR collecting tests/test_resourceManager.py ____________________ | |
ImportError while importing test module '/home/user/j/jade/newsrc/pyramid_res/tests/test_resourceManager.py'. | |
Hint: make sure your test modules/packages have valid Python names. | |
Traceback: |
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 python | |
## Tiny Syslog Server in Python. | |
## | |
## This is a tiny syslog server that is able to receive UDP based syslog | |
## entries on a specified port and save them to a file. | |
## That's it... it does nothing else... | |
## There are a few configuration parameters. | |
LOG_FILE = 'youlogfile.log' |
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/python | |
# xsend: command-line utility for sending jabber messages | |
# http://xmpppy.sourceforge.net/ | |
# | |
import sys,os,xmpp,time | |
if len(sys.argv) < 2: | |
print "Syntax: xsend JID msg" | |
sys.exit(0) |
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
LINODE_CLI=linode-cli | |
CREATE_CMD_CATEGORY=create | |
ROOT_PASS=XXXX | |
SS_ID=349134 | |
BOOTED=yes | |
STACKSCRIPT_DATA=stackscript-data.json | |
HOSTNAME=XXXX | |
PYTHON=python | |
LINODE_TOKEN=`cat .linode_token` | |
KERBEROS=yes |
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 | |
import shutil | |
import apt_pkg | |
import apt_inst | |
import apt | |
import apt.debfile | |
import apt.progress | |
import aptsources.distinfo | |
import os.path |
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
/* | |
* Host definitions with object attributes | |
* used for apply rules for Service, Notification, | |
* Dependency and ScheduledDowntime objects. | |
* | |
* Tip: Use `icinga2 object list --type Host` to | |
* list all host objects after running | |
* configuration validation (`icinga2 daemon -C`). | |
*/ |
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
[Unit] | |
Description=The PHP 7.3 FastCGI Process Manager | |
Documentation=man:php-fpm7.3(8) | |
After=network.target | |
[Service] | |
Type=simple | |
PIDFile=/opt/php-dev/var/run/php-fpm.pid | |
EnvironmentFile=/etc/default/php-dev-fpm | |
#ExecStart=/usr/bin/strace -o /tmp/out-trace -f /opt/php-dev/sbin/php-fpm --nodaemonize |
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 React from 'react' | |
import DocViewer from '../src/components/doc/Viewer' | |
import { setupSaxParser } from 'docutils-react/lib/getComponentForXmlSax' | |
import regeneratorRuntime from "regenerator-runtime"; | |
export default class Viewer extends React.Component { | |
constructor(props) { | |
super(props); | |
} | |
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 {visit,getFieldNames, getFieldValue, eachField, namedTypes, builders} from 'ast-types'; | |
import { NodePath } from 'ast-types/lib/node-path'; | |
import { Map, List, Set} from 'immutable'; | |
import { ValueKind } from './types'; | |
export type CopyTreeResult = Map<string, ValueKind>; | |
export function copyTree(node: namedTypes.Node, | |
report?: (arg: string) => void, | |
level: number = 0): CopyTreeResult { | |
let cache: List<Map<string, any>> = List<Map<string, any>>(); |
OlderNewer