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
'use strict'; | |
var crypto = require('crypto'); | |
var path = require('path'); | |
var Promise = require('bluebird'); | |
var Invalidation = function (config, s3EventRecord) { | |
this.record = s3EventRecord; | |
this.config = config; |
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 Base62 | |
CHARS = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" | |
SIZE = CHARS.size | |
def self.short(number) | |
return 0 if number == 0 | |
chars = '' | |
while number != 0 do | |
number, mod = number.divmod(SIZE) |
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
Router ADSL Thomson TG585 v7 | |
Router ADSL fornito con la connessione Tiscali OfficeOne. | |
Portscan e telnet remoto | |
Per impostazione predefinita ha la porta telnet aperta sulla wan. La connessione come admin viene rifiutata dalla wan, ma nei log ho trovato questo strano messaggio: | |
Info 00:16:54 LOGOUT User logged out on TELNET (85.190.0.3) | |
Avvertenza 00:16:42 IDS scan parser : tcp syn scan: 85.190.0.3 scanned at least 20 ports at 94.33.x.x. (1 of 1) : 85.190.0.3 94.33.x.x 0060 TCP 51175→1027 [S…..] seq 2901216082 win 5840 |
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
Client.prototype.rawLog = function(severity, message, callback) { | |
var buffer = new Buffer(message(severity, this.facility, message)); | |
this.socket.send(buffer, 0, buffer.length, this.port, this.host, callback); | |
}; | |
Client.prototype.emerg = function(message, callback) { | |
this.rawLog(facilities.LOG_EMERG, message, callback); | |
}; | |
Client.prototype.alert = function(message, callback) { |
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
require 'rubygems' | |
require 'nokogiri' | |
class RRow | |
attr_reader :exponent, :coefficient, :xml, :value | |
def initialize(xml) | |
@xml = xml | |
@value_xml = xml.children.first |
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
[Fri, 14 Oct 2011 01:46:37 GMT] [error] [<0.4090.13>] Uncaught error in HTTP request: {exit, | |
{{timeout, | |
{gen_server,call, | |
[<0.21934.9>, | |
{open_ref_count, | |
<0.4090.13>}]}}, | |
{gen_server,call, | |
[couch_server, | |
{open,<<"backup">>, | |
[{user_ctx, |
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
%%%------------------------------------------------------------------- | |
%%% File : hmac256.erl | |
%%% Author : Sriram Krishnan<mail@sriramkrishnan.com> | |
%%% Description : HMAC-SHA256 implementation. Implementation based on Wikipedia's | |
%% pseudocode description of HMAC. Relies on Steve Vinoski's SHA256 implementation | |
%%% from http://steve.vinoski.net/code/sha2.erl | |
%%% | |
%%% Created : 30 Dec 2008 | |
%%%------------------------------------------------------------------- | |
%% @private |
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
handle_call(Request, From, State) -> | |
NewState = mylib:myfun(State), | |
{reply, ok, NewState}; |
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
# to be used with the sync version | |
require './request_handler_sync' | |
run Sinatra::Application |
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
1> crypto:sha_mac("my_key","GET\n\n\nThu, 02 Dec 2010 10:05:01 GMT\n/"). | |
** exception error: bad argument | |
in function port_control/3 | |
called as port_control(crypto_drv02,11, | |
[<<0,0,0,6>>, | |
"my_key","GET\n\n\nThu, 02 Dec 2010 10:05:01 GMT\n/"]) | |
in call from crypto:control/2 |
NewerOlder