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
--- | |
swagger: '2.0' | |
info: | |
version: 1.0.0 | |
title: Swager api sample | |
description: | | |
#### Swagger API description example | |
schemes: | |
- https |
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
--- | |
swagger: '2.0' | |
info: | |
version: 1.0.0 | |
title: Swager api sample | |
description: | | |
#### Swagger API description example | |
schemes: | |
- https |
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
definitions: | |
Monster: | |
type: object | |
properties: | |
name: | |
type: string | |
description: Pokemon name | |
hp: | |
type: number | |
description: Max health points |
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
/pokemon/list: | |
get: | |
responses: | |
200: | |
description: Return all as array | |
schema: | |
type: array | |
items: | |
$ref: '#/definitions/Monster' | |
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
/pokemon/add: | |
post: | |
description: Add new Pokemon | |
parameters: | |
- name: newMonster | |
in: body | |
required: true | |
schema: | |
$ref: '#/definitions/Monster' | |
responses: |
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
var cheerio = require('cheerio'); | |
var request = require('request') | |
var prettyjson = require('prettyjson') | |
function gotHTML(err, resp, html) { | |
if (err) return console.error(err) | |
var parser = cheerio.load(html) | |
topic = {} | |
topic.title = parser('h2').text() | |
topic.story = parser('.display-post-story', '.main-post').text() |
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
var parser = cheerio.load(html) | |
topic = {} | |
topic.title = parser('h2').text() | |
topic.story = parser('.display-post-story', '.main-post').text() |
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
#get base url from sinatra with nginx passenger app passenger_base_uri | |
base_url = "#{request.env['rack.url_scheme']}://#{request.env['HTTP_HOST']}#{request.env['SCRIPT_NAME']}"; |
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
// easy | |
console.time('sss'); | |
someFunction(); // run whatever needs to be timed in between the statements | |
console.timeEnd('ssss'); | |
// Standard | |
var t0 = performance.now(); | |
doSomething(); | |
var t1 = performance.now(); |
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
#!/usr/bin/python | |
from impacket import smb | |
from struct import pack | |
import os | |
import sys | |
import socket | |
''' | |
EternalBlue exploit by sleepya | |
The exploit might FAIL and CRASH a target system (depended on what is overwritten) |
OlderNewer