Skip to content

Instantly share code, notes, and snippets.

View hernandez87v's full-sized avatar
🎯
Focusing

Vlad H hernandez87v

🎯
Focusing
View GitHub Profile
@hernandez87v
hernandez87v / raincouver.js
Created September 14, 2024 21:47
Flipper Zero Bad USB Script
// Flipper Zero Bad USB Script
let badusb = require('badusb');
let notify = require('notification');
let dialog = require('dialog');
// Setup BadUSB
badusb.setup({
vid: 0xaaaa,
pid: 0xbbbb,
mfr_name: 'Flipper',
@hernandez87v
hernandez87v / psql
Created May 27, 2022 21:51
PostgresSQL - createuser: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory Is the server running locally and accepting connections on that socket?
# createuser: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
# Is the server running locally and accepting connections on that socket?
# List clusters running on device
pg_lsclusters
# It will likely show Status down
# Restart pg_ctlclusters
#format is pg_ctlcluster <version> <cluster> <action>
sudo pg_ctlcluster <version> main start
var a = ['c', 'a', 'd', 'b', 'aa'];
var b = [9, 2, 13, 7, 1, 12, 123];
// Sort in ascending lexicographical order using a built-in
a.sort();
b.sort();
console.log('a:', a);
console.log('b:', b);
//-----------------------------------------------------
@hernandez87v
hernandez87v / index.html
Created October 6, 2020 02:56
three-font-outliner
<a href="//github.com/ycw/three-font-outliner/" target="_blank">three-font-outliner</a>