Skip to content

Instantly share code, notes, and snippets.

View salmanfarisvp's full-sized avatar
🛠️
Start where you are. Use what you have. Do what you can.

Salman Faris salmanfarisvp

🛠️
Start where you are. Use what you have. Do what you can.
View GitHub Profile
@salmanfarisvp
salmanfarisvp / list_mac_usb_device.sh
Created June 22, 2025 19:21
List USB Serial Devices on Linux
ls /dev/tty* | grep usb
@salmanfarisvp
salmanfarisvp / klipfolio-passcode.js
Created April 25, 2025 11:41
Screenly Kilpfolio Passcode JS Injection
function injectPasscode(passcode) {
const input = document.getElementById('passcode');
if (!input) return false;
input.value = passcode;
input.dispatchEvent(new Event('input', { bubbles: true }));
return true;
}
function pressSubmit() {
const button = document.getElementById('submit');
@salmanfarisvp
salmanfarisvp / gifx.sh
Created December 10, 2024 15:13
Generate gif from mp4
#!/bin/bash
# Usage function
usage() {
echo "Usage: $0 <input_video> [output_gif] [fps] [scale]"
echo ""
echo "Converts a video to a GIF with optional parameters for customization."
echo ""
echo "Arguments:"
echo " input_video Path to the input video file."
@salmanfarisvp
salmanfarisvp / gif.sh
Created December 10, 2024 13:58
Create High Quality gif using ffmpeg
# Create pallete
ffmpeg -i input.mp4 -vf "fps=15,scale=800:-1:flags=lanczos,palettegen" palette.png
# Create the gif using the pallete and save as output.gif
ffmpeg -i input.mp4 -i palette.png -lavfi "fps=15,scale=800:-1:flags=lanczos [x]; [x][1:v] paletteuse=dither=sierra2_4a" output.gif
(function () { const zoomLevel = 5; document.body.style.zoom = zoomLevel; })();
@salmanfarisvp
salmanfarisvp / screenly-cli.rb
Created August 2, 2024 10:19
Screenly CLI Formule
class ScreenlyCli < Formula
desc "Command line interface is intended for quick interaction with Screenly through terminal."
homepage "https://github.com/Screenly/cli"
url "https://github.com/Screenly/cli.git",
tag: "v0.2.7"
version "v0.2.7"
license "MIT"
depends_on "rust" => :build
/*
Originally from MQTT ESP8266 Example
Basic XIAO-ESP32 MQTTS example
Before starting , You should have
- MQTT Broker Name
- MQTT Broker Username
- MQTT Borker Password
@salmanfarisvp
salmanfarisvp / ReadSMS.ino
Created November 21, 2019 08:39
Read SMS using SIM800L and Print the message content in I2C LCD Display .
#include <SoftwareSerial.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
String Grsp;
SoftwareSerial mySerial(3, 2); //SIM800L Tx & Rx is connected to Arduino #3 & #2
@salmanfarisvp
salmanfarisvp / Guide.md
Created May 25, 2023 11:02
Balena CLI Installation on WSL

This guide will show how to Install balena CLI for WSL

  1. Download the latest zip file from the latest release page. Look for a file name that ends with "-standalone.zip", for example: balena-cli-vX.Y.Z-linux-x64-standalone.zip.

  2. Extract the zip file contents to any folder you choose, for example /home/balena. The extracted contents will include a balena-cli folder.

  3. Open the WSL terminal inside the balena-cli folder and make the file executable by entering the command sudo chmod +x balena

/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software< /span>