Behavior | inline | inline-block | block |
---|
This file contains hidden or 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
(defun merge-sort(lst) | |
(defun merge_(f s) | |
(cond | |
((= (list-length f) 0) s) | |
((= (list-length s) 0) f) | |
((< (car f) (car s)) (append (list (car f)) (merge_ (cdr f) s))) | |
((> (car f) (car s)) (append (list (car s)) (merge_ f (cdr s)))) | |
((= (car f) (car s)) (append (list (car f) (car s)) (merge_ (cdr f) (cdr s)))) | |
) | |
) |
This file contains hidden or 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
xmlstarlet sel -t -m '//port/state[@state="open"]/parent::port' -v 'ancestor::host/address/@addr' -o : -v './@portid' -n nmap-output.xml |
This file contains hidden or 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'; | |
const Fs = require('fs'); | |
const Https = require('https'); | |
const WebSocketServer = require('ws').Server; | |
const httpsServer = Https.createServer({ | |
key: Fs.readFileSync(process.env.KEY), | |
cert: Fs.readFileSync(process.env.CERT) | |
}); | |
const wss = new WebSocketServer({ |
This file contains hidden or 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
/* credits to http://blog.techorganic.com/2015/01/04/pegasus-hacking-challenge/ */ | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <netinet/in.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#define REMOTE_ADDR "XXX.XXX.XXX.XXX" | |
#define REMOTE_PORT XXX |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdlib.h> | |
static char * | |
read_stdin (void) | |
{ | |
size_t cap = 4096, /* Initial capacity for the char buffer */ | |
len = 0; /* Current offset of the buffer */ | |
char *buffer = malloc(cap * sizeof (char)); | |
int c; |