Skip to content

Instantly share code, notes, and snippets.

View ViniciusFXavier's full-sized avatar
👨‍💻
Coding...

Vinícius Francisco Xavier ViniciusFXavier

👨‍💻
Coding...
View GitHub Profile
@ViniciusFXavier
ViniciusFXavier / flow-field.html
Last active June 8, 2023 05:59
Gas Spread Simulation
<!DOCTYPE html>
<html>
<head>
<title>Flow Field Simulation</title>
<style>
canvas {
border: 1px solid black;
}
</style>
@ViniciusFXavier
ViniciusFXavier / increase-process-priority.txt
Created February 23, 2023 07:32
Increase the priority of a win10 application
1. Press WINDOWS KEY + R
2. Type in "RegEdit"
3.Navigate on to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options
Create a new Key:
"yourgame.exe"
Create another Key:
interface INode {
value: number;
right?: Node;
left?: Node;
}
class Node implements INode {
value: number;
right?: Node;
left?: Node;
@ViniciusFXavier
ViniciusFXavier / Dockerfile
Last active May 19, 2021 12:56
Clone private git repo with dockerfile
FROM ubuntu
MAINTAINER Vinícius Francisco Xavier "viniciusfranciscoxavier@gmail.com"
# Update aptitude with new repo
RUN apt-get update
# Install software
RUN apt-get install -y git
@ViniciusFXavier
ViniciusFXavier / example.js
Last active April 12, 2021 16:54
Detect on change
const object = {
foo: false,
a: {
b: [
{
c: false
}
]
}
};
@ViniciusFXavier
ViniciusFXavier / index.html
Last active March 21, 2021 19:19
Escape from Tarkov grid inventory on canvas
<script src="https://cdnjs.cloudflare.com/ajax/libs/konva/7.2.5/konva.min.js"></script>
<div id="container"></div>
<a href="https://jsfiddle.net/vfxloco/zvmt7rky/114/">Escape from tarkov grid inventory</a>
@ViniciusFXavier
ViniciusFXavier / dblkeypress.js
Last active March 21, 2021 06:01
Double Keypress Detection
document.addEventListener('dblkeypress', function (event) {
console.log('event: ', event);
console.log('----Works----');
}, false);
var dblkeypressConfig = {
lastKeyCode: null,
lastFiredTime: null,
interval: 500, // 500(slow) or 350(medium) or 100(fast) or 50(impossible)
clear: function () {
@ViniciusFXavier
ViniciusFXavier / remove-demos.js
Last active June 17, 2020 16:36
Remove demos from STEAM account
(function () {
if (!location.href.startsWith('https://store.steampowered.com/account/licenses')) {
alert('Please run this on Steam\'s account licenses page.');
return;
}
let toDelete = [];
[...document.querySelectorAll('tr td:nth-child(2)')].forEach((element) => {
const match = element.innerHTML.match(/( Demo)\W+/gi);
@ViniciusFXavier
ViniciusFXavier / ipAddressGenerator.js
Created June 3, 2020 19:36
IP Address Generator/Validator
function run() {
const listIp = []
for (let index = 0; index < 1000; index++) {
const ip = (Math.floor(Math.random() * 255) + 1)+"."+(Math.floor(Math.random() * 255))+"."+(Math.floor(Math.random() * 255))+"."+(Math.floor(Math.random() * 255));
listIp.push(ip);
}
console.log('listIp: ', JSON.stringify(listIp))
}
run()

Adding npm Command Autocompletion to Your Shell

If you want to get a quick improvement to your npm productivity, you can add autocompletion for npm to your shell with just one command.

For bash, you can add npm autocompletion with: npm completion >> ~/.bashrc

For zsh, you can add npm autocompletion with: npm completion >> ~/.zshrc

And now you’ll have tab autocomplete for npm commands.