Skip to content

Instantly share code, notes, and snippets.

View completableFutureSpringMVC.kt
package com.example.mvc
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RestController
import java.lang.Thread.sleep
import java.util.concurrent.CompletableFuture
import java.util.concurrent.ExecutorService
import java.util.concurrent.Executors
@RestController
@dvas0004
dvas0004 / recompile-and-run.sh
Created Oct 31, 2019 — forked from PuKoren/recompile-and-run.sh
Recompile APK + Sign with apktool
View recompile-and-run.sh
# You must first install apktool (https://github.com/iBotPeaches/Apktool) and android SDK
# and decompile apk using it
# apktool d -rf my-app.apk
# then generate a key for sign in:
# keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
rm signed-app.apk
apktool b -f -d com.myapp
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore com.myapp/dist/com.myapp.apk alias_name
zipalign -v 4 com.myapp/dist/com.myapp.apk signed-app.apk
View reverseCssSelector.js
var TopLevelObject = {}
TopLevelObject.DOMNodePathStep = function(value, optimized)
{
this.value = value;
this.optimized = optimized || false;
}
TopLevelObject.DOMNodePathStep.prototype = {
/**
* @override
* @return {string}
View SSL_Reverse_Proxy.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<template encoding-version="1.2">
<description></description>
<groupId>f83b243e-016a-1000-7ae4-d55879bd67a8</groupId>
<name>Beats (encrypted)</name>
<snippet>
<connections>
<id>5d08bc84-630a-3e17-0000-000000000000</id>
<parentGroupId>75fd9e98-7cb4-3d53-0000-000000000000</parentGroupId>
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>
View alerting.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<template encoding-version="1.2">
<description></description>
<groupId>d562c994-016b-1000-4d13-1985463f364a</groupId>
<name>Alerting</name>
<snippet>
<connections>
<id>2afde8dc-2bf8-33e4-0000-000000000000</id>
<parentGroupId>308545b5-bdca-3d2b-0000-000000000000</parentGroupId>
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>
View netflow_to_file.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<template encoding-version="1.2">
<description></description>
<groupId>0165328f-016a-1000-faa4-53a3512c51c5</groupId>
<name>NetFlow To File</name>
<snippet>
<connections>
<id>2b15b939-ffe5-342a-0000-000000000000</id>
<parentGroupId>ca04b9d6-b10c-33c7-0000-000000000000</parentGroupId>
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>
View Exploring Gaussian Process.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dvas0004
dvas0004 / eidVerifySignature.py
Created Feb 25, 2019
python script to verify ECDSA signatures generated from the newer Estonian eID cards. Signature and Certificate must be obtained from eID itself, eg by using: https://hwcrypto.github.io/demo/
View eidVerifySignature.py
# pip install ecdsa
# pip install cryptography
# https://github.com/warner/python-ecdsa
# https://cryptography.io/en/latest/
from ecdsa import VerifyingKey, BadSignatureError
from cryptography import x509
View InteractiveOzwave.py
import logging
import sys, os
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger('openzwave')
import openzwave
from openzwave.node import ZWaveNode
from openzwave.value import ZWaveValue
from openzwave.scene import ZWaveScene
@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;
////////
You can’t perform that action at this time.