Skip to content

Instantly share code, notes, and snippets.

View ivanmarban's full-sized avatar
🤔
Use the force. Read the source.

Ivan Marban ivanmarban

🤔
Use the force. Read the source.
View GitHub Profile
@ivanmarban
ivanmarban / ParseRSAKeys.java
Created December 16, 2021 12:32 — forked from destan/ParseRSAKeys.java
Parse RSA public and private key pair from string in Java
import java.io.IOException;
import java.net.URISyntaxException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.security.KeyFactory;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.interfaces.RSAPublicKey;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.PKCS8EncodedKeySpec;
@ivanmarban
ivanmarban / dumb-ap-wired-link.sh
Created March 2, 2021 18:35 — forked from braian87b/dumb-ap-wired-link.sh
How to setup a Dumb AP, Wired backbone for OpenWRT / LEDE
@ivanmarban
ivanmarban / web-scraping-java-jsoup-htmlunit-jaunt-uij-selenium-phantomjs.md
Created June 8, 2017 08:43
Web Scraping with Java: JSoup - HtmlUnit - Jaunt - ui4j - Selenium - PhantomJS

JSoup

JSoup is a HTML parser, it can't control the web page, only parse the content. Supports only CSS Selectors. It gives you the possibility to select elements using jQuery-like CSS selectors and provides a slick API to traverse the HTML DOM tree to get the elements of interest. Particularly the traversing of the HTML DOM tree is the major strength of JSoup. Can be used in web applications.

HtmlUnit

HtmlUnit is a "GUI-Less browser for Java programs". The HtmlUnit browser can simulate Chrome, Firefox or Internet Explorer behaviour. It is a light weight solution that doesn't have too many dependencies. Generally, it supports JavaScript and Cookies, but in some cases it may fail. HtmlUnit is used for testing, web scraping, and is the basis for other tools. You can simulate pretty much anything a browser can do like click events, submit events etc. It's much more than alone a HTML parser, is ideal for web application automated unit testing. Supports XPath, but the problem starts when you try to extrac

@ivanmarban
ivanmarban / wireless-link-wds.sh
Created June 1, 2017 16:48 — forked from braian87b/wireless-link-wds.sh
How to setup Wireless Links to avoid Wired backbone using WDS on Atheros for OpenWRT / LEDE
#!/bin/sh
# Default Variable Declarations
DEFAULT="Default.txt"
FILEEXT=".ovpn"
CRT=".crt"
KEY=".3des.key"
NODES_KEY=".key"
CA="ca.crt"
TA="ta.key"
<?php
$GLOBALS["messages"] = array (
'en'=> array(
'Monday' => 'Monday',
'Tuesday' => 'Tuesday',
'Wednesday' => 'Wednesday',
'Thursday' => 'Thursday',
'Friday' => 'Friday',
'Saturday' => 'Saturday',
'Sunday' => 'Sunday'