Skip to content

Instantly share code, notes, and snippets.

View aranajhonny's full-sized avatar
🏠
Working from home

Jhonny aranajhonny

🏠
Working from home
View GitHub Profile
HKEY_LOCAL_MACHINE -> SOFTWARE -> POLICIES -> MICROSOFT -> Windows Defender -> DisableAntiSpyware = 0
class WaveformData {
// [...]
List<int> data;
List<double> _scaledData;
// [...]
List<double> scaledData() {
if (!_isDataScaled()) {
_scaleData();
}
@aranajhonny
aranajhonny / vpn.js
Created February 5, 2020 17:36
detect if are using vpn
function detectVPN() {
var browserTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone
return fetch(`https://ipapi.co/json`)
.then(function(response) { return response.json() })
.then(function (data) {
var ipTimezone = data.timezone
console.log(`browser timezone: ${browserTimezone}`, `ip timezone: ${ipTimezone}`)
return {
browser: browserTimezone,
@aranajhonny
aranajhonny / file.js
Created January 7, 2020 16:26
wait (n) miliseconds in async / await js
// declaracion
function wait(ms) {
return new Promise(resolve => setTimeout(resolve, ms))
}
// uso
await wait(200);
@aranajhonny
aranajhonny / tor-openvpn.sh
Created January 6, 2020 21:54 — forked from kremalicious/tor-openvpn.sh
Install and configure Tor as proxy for all OpenVPN server traffic
# what we want:
# client -> OpenVPN -> Tor -> Internet
# Install & configure OpenVPN
# https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-ubuntu-16-04
# assumed OpenVPN configuration
# 10.8.0.1/24-Subnet
# tun0-Interface
for(i=0;A=$$("*")[i++];)A.style.outline="solid hsl("+parseInt(A.tagName,36)+",99%,50%)1px"
@aranajhonny
aranajhonny / script.sh
Created September 4, 2019 14:51
Download all repos from github organization
curl -s https://api.github.com/orgs/microlinkhq/repos\?per_page\=200 | jq '.[].ssh_url' | xargs -n 1 git clone
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/scroller/2.0.0/css/scroller.dataTables.min.css">
<script type="text/javascript" src="https://code.jquery.com/jquery-3.3.1.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/scroller/2.0.0/js/dataTables.scroller.min.js"></script>
</head>
streamer -f jpeg -o out.jpeg -q