Skip to content

Instantly share code, notes, and snippets.

View Terkea's full-sized avatar
🎯
Focusing

Marian Terchila Terkea

🎯
Focusing
View GitHub Profile
@Terkea
Terkea / Dockerfile
Created November 22, 2022 15:04
Dockerfile java 1.8 maven and chrome driver for selenium tests
FROM ubuntu:22.04
# Update OS
RUN apt update
# Install wget
RUN apt install -y wget
RUN apt-get install -y openjdk-18-jdk
@Terkea
Terkea / plugins.js
Created October 10, 2022 11:07
esbuild
const envPlugin = {
name: "env",
setup(build) {
// Intercept import paths called "env" so esbuild doesn't attempt
// to map them to a file system location. Tag them with the "env-ns"
// namespace to reserve them for this plugin.
build.onResolve({ filter: /^env$/ }, (args) => ({
path: args.path,
namespace: "env-ns",
}));
const fetch = (url) => import('node-fetch').then(({default: fetch}) => fetch(url));
let isRequesting = true
// this assumes the delay is always the same (miliseconds)
const delay = 10000
const requestsQueue = []
const whatever = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
let followers = document.querySelectorAll('div > div > div > div.css-1dbjc4n.r-1iusvr4.r-16y2uox > div.css-1dbjc4n.r-1awozwy.r-18u37iz.r-1wtj0ep > div.css-1dbjc4n.r-19u6a5r > div > div > span > span')
for (let i = 0; i < followers.length; i++){
followers[i].click()
document.querySelector('#layers > div:nth-child(2) > div > div > div > div > div > div.css-1dbjc4n.r-1awozwy.r-1kihuf0.r-18u37iz.r-1pi2tsx.r-1777fci.r-1pjcn9w.r-xr3zp9.r-1xcajam.r-ipm5af.r-9dcw1g > div.css-1dbjc4n.r-1awozwy.r-kemksi.r-1867qdf.r-1jgb5lz.r-pm9dpa.r-1ye8kvj.r-1rnoaur.r-d9fdf6.r-mfjstv.r-13qz1uu > div.css-1dbjc4n.r-18u37iz.r-pxynpr.r-11c0sde.r-13qz1uu > div.css-18t94o4.css-1dbjc4n.r-urgr8i.r-42olwf.r-sdzlij.r-1phboty.r-rs99b7.r-16y2uox.r-ero68b.r-vkv6oe.r-1ny4l3l.r-1udh08x.r-1fneopy.r-1udbk01.r-o7ynqc.r-6416eg.r-lrvibr.r-3s2u2q.r-1glkqn6 > div').click()
}
@Terkea
Terkea / docker-compose.yaml
Last active June 22, 2021 01:37
docker-compose file for plex qbittorrent and tunnels for both
version: "3.7"
services:
plex_server:
image: ghcr.io/linuxserver/plex
container_name: plex
environment:
- PUID=1000
- PGID=1000
@Terkea
Terkea / index.js
Created March 30, 2021 22:02
ECDH and AES 256 in NODE JS
const crypto = require('crypto');
const assert = require('assert')
// THIS SECTION COVERS THE KEY GENERATION
// AND PROOFS THAT THE SHARES KEYS ARE IDENTIAL
// SOURCE: https://asecuritysite.com/encryption/js_ecdh
// DOCS: https://nodejs.org/api/crypto.html#crypto_crypto_createecdh_curvename
type = 'secp256k1';
// a list with all the curves that can be used
@Terkea
Terkea / child.js
Created October 15, 2020 10:50
que system node js
module.exports = function (inp, callback) {
setTimeout(() => {
callback(null, inp);
}, 3000);
}
@Terkea
Terkea / disable dns resolve
Created October 2, 2020 23:46
disable dns resolve
Disable and stop the service
sudo systemctl disable systemd-resolved.service
sudo systemctl stop systemd-resolved
Then put the following line in the [main] section of your
/etc/NetworkManager/NetworkManager.conf
dns=default
Delete the symlink /etc/resolv.conf
rm /etc/resolv.conf
@Terkea
Terkea / firebase router
Last active September 26, 2020 16:58
firebase router
You need to make sure the rewrites are enabled in your Firebase hosting configuration to redirect all requests to your index.html file. This assumes you are using create-react-app:
```
{
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
@Terkea
Terkea / gist:f0b4efcb5163412d5147da7666bc6b9a
Created June 15, 2020 14:42
How to Fix the Error “VMware Workstation and Device/Credential Guard are not compatible”
run cmd as admin
```bash
bcdedit /create {0cb3b571-2f2e-4343-a879-d86a476d7215} /d "DebugTool" /application osloader
bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} path "\EFI\Microsoft\Boot\SecConfig.efi"
bcdedit /set {bootmgr} bootsequence {0cb3b571-2f2e-4343-a879-d86a476d7215}
bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} loadoptions DISABLE-LSA-ISO, DISABLE-VBS
bcdedit /set hypervisorlaunchtype off
```
After that, restart the computer and open the virtual machine. Now that the changes have been made, it should start without any errors.