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 nessus.gmi.oeaw.ac.at; | |
rewrite ^ https://$server_name$request_uri? permanent; | |
} | |
server { | |
listen 443; | |
server_name nessus.gmi.oeaw.ac.at; | |
client_max_body_size 100m; |
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
{ | |
"requests": [ | |
{ | |
"method": "invoke", | |
"path": "/conns/etsdb/db/stats/%2Fconns%2FSystem%2FMemory_Usage/getHistory", | |
"params": { | |
"Timerange": "2015-07-19T17:27:00.000/2015-07-19T17:56:59.999", | |
"Interval": "2m", | |
"Rollup": "avg" | |
}, |
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
!/bin/bash | |
# travis_ssh_key_encrypt_for_mac.ssh | |
# Encrypts private SSH keys for use in .travis.yml. | |
# Based on the excellent linux version: | |
# https://gist.github.com/lukewpatterson/4242707 | |
# Also see the travis documentation: | |
# http://docs.travis-ci.com/user/build-configuration/#Secure-environment-variables | |
# Usage: | |
# Go to your git project: |
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
// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
// Javascript preamble, that lets the output of dart2js run on V8's d8 shell. | |
// Node wraps files and provides them with a different `this`. The global | |
// `this` can be accessed through `global`. | |
var self = this; |
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 "dart:async"; | |
import "dart:io"; | |
import "dart:math"; | |
String generateToken(int length) { | |
var r = new Random(); | |
var buffer = new StringBuffer(); | |
for (int i = 1; i <= length; i++) { | |
if (r.nextBool()) { | |
String letter = alphabet[r.nextInt(alphabet.length)]; |
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
library manager; | |
import "dart:io"; | |
import "package:irc/irc.dart" show Color; | |
import 'package:polymorphic_bot/api.dart'; | |
BotConnector bot; | |
EventManager eventManager; |
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 numpy as np | |
from scipy.sparse import csc_matrix | |
def pageRank(G, s = .85, maxerr = .001): | |
""" | |
Computes the pagerank for each of the n states. | |
Used in webpage ranking and text summarization using unweighted | |
or weighted transitions respectively. |
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
Future<String> getString(Uri uri) { | |
return new HttpClient().getUrl(uri) | |
.then((HttpClientRequest request) => request.close()) | |
.then((HttpClientResponse response) => response.transform(UTF8.decoder).join()); | |
} |
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
part of dartboard; | |
class FutureGroup<E> { | |
Completer<E> _completer = new Completer<E>(); | |
Set<Future<E>> _futures = new Set<Future<E>>(); | |
bool add(Future<E> future) => _futures.add(future); | |
Future<List<E>> wait() { | |
Future.wait(_futures).then((result) => _completer.complete(result)) |
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 FutureGroup { | |
Completer _completer = new Completer(); | |
List<Future> _futures = new List<Future>(); | |
FutureGroup(); | |
bool add(Future future) { | |
if(!_futures.contains(future)) { | |
_futures.add(future); | |
return true; |
NewerOlder