Skip to content

Instantly share code, notes, and snippets.

@dvas0004
dvas0004 / employeeHarvesting.js
Created Nov 22, 2018
Employee Harvesting from Linked In (companion code to blog post)
View employeeHarvesting.js
const linkedinEmail = '*******';
const linkedinPassword = '*******';
const companyName = 'CHANGE ME';
const extraFilter = 'change me (or set to null)';
const maxPages = 2;
////////
@dvas0004
dvas0004 / decompiler.py
Created Oct 26, 2018
grpc-web reverse engineer
View decompiler.py
import jsbeautifier
import requests
import pprint
enumerateMessagesSearchString = 'exportSymbol("proto.'
r = requests.get('http://localhost:8081/dist/main.js')
jsInput = r.text
pretty_js = jsbeautifier.beautify(jsInput).split('\n')
@dvas0004
dvas0004 / ExtensionAllInOneNotes.java
Created Oct 1, 2018
zap-extensions, all in one notes
View ExtensionAllInOneNotes.java
/*
* Zed Attack Proxy (ZAP) and its related class files.
*
* ZAP is an HTTP/HTTPS proxy for assessing web application security.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@dvas0004
dvas0004 / TLN_real_estate.py
Created Aug 13, 2018
Tallinn Real Estate - Scraping data using python and visualization
View TLN_real_estate.py
# only python 3.6 supported
# sudo pipenv --python=3.6 install requests requests_html numpy
import requests
import numpy as np
from requests_html import HTMLSession
class KVBuilder:
def __init__(self):
View ee_job_market_eval.py
import requests
import urllib
from datetime import datetime
queries = ['react', 'angular', 'java', 'python', 'linux', 'machine learning', 'nodeJS', 'sql', 'full stack', 'microsoft, active directory', 'aws', 'ethereum,bitcoin', 'blockchain', 'scrum,agile', 'android', 'ios,xcode', 'devops', 'php', 'laravel', 'elasticsearch', 'mongodb', 'golang', 'oscp,cissp', 'neural network', 'postgres,postresql', '.net', 'ruby', 'macos']
for query in queries:
filename = '/tmp/Estonia/Job Market Eval/{}.csv'.format(query.replace(',','_'))
View howto_python_flask_iis_wfastcgi.md

Assume IIS is installed. My machine already had IIs 8.5.

DV : Adding some notes when using MS IIS Express 10

Install Python

  1. Download web installer (Python 3.6.3).
  2. Run as Administrator.
  3. Select custom installation for all users.
  4. Choose install directory such that there are no white spaces in the path. Not sure if it needs to be done. Just being cautious.
View ServerSideEvents.kt
package io.cybersift.PcapParserWeb.services
import org.springframework.stereotype.Service
import reactor.core.publisher.Flux
import redis.clients.jedis.JedisPubSub
import reactor.core.publisher.FluxSink
import redis.clients.jedis.JedisPoolConfig
import redis.clients.jedis.JedisPool
internal class MyListener(fluxSink: FluxSink<String>) : JedisPubSub() {
View DefaultRouter.kt
package com.example.sse.routers
import com.example.sse.HomeHandler
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.http.MediaType
import org.springframework.web.reactive.function.server.HandlerFunction
import org.springframework.web.reactive.function.server.RequestPredicates
import org.springframework.web.reactive.function.server.RouterFunction
import org.springframework.web.reactive.function.server.RouterFunctions
@dvas0004
dvas0004 / DefaultRouter.kt
Last active Oct 7, 2020
A clear, simple example of multipart file upload using Reactive Spring (http://blog.davidvassallo.me/2018/07/09/reactive-spring-webflux-multipart-file-upload/)
View DefaultRouter.kt
package com.example.FileUploadExample
import com.example.FileUploadExample.HomeHandler
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.http.MediaType
import org.springframework.web.reactive.function.server.HandlerFunction
import org.springframework.web.reactive.function.server.RequestPredicates
import org.springframework.web.reactive.function.server.RouterFunction
import org.springframework.web.reactive.function.server.RouterFunctions
View spring_actuator_response_sample.json
GET http://localhost:8080/actuator/metrics/http.server.requests
{
"name":"http.server.requests",
"measurements":[
{
"statistic":"COUNT",
"value":1
},
{