Skip to content

Instantly share code, notes, and snippets.

View esteves67's full-sized avatar
🎯
Focusing

Vinícius esteves67

🎯
Focusing
View GitHub Profile
@vodolaz095
vodolaz095 / print.js
Last active September 21, 2024 09:00
Print for NodeJS using CUPS backend
var ipp = require('ipp'); //get it from there - https://npmjs.org/package/ipp - $npm install ipp
var request = require('request'); //get it from there - https://npmjs.org/package/request - $npm install request
var fs = require('fs');
function getPrinterUrls(callback) {
var CUPSurl = 'http://localhost:631/printers';//todo - change of you have CUPS running on other host
request(CUPSurl, function (error, response, body) {
if (!error && response.statusCode == 200) {
var printersMatches = body.match(/<TR><TD><A HREF="\/printers\/([a-zA-Z0-9-^"]+)">/gm);//i know, this is terrible, sorry(
var printersUrls = [];
@kennedy
kennedy / BF888S_default_01012019.csv
Last active January 18, 2025 00:35
Baofeng BF888S default frequencies
Location Name Frequency Duplex Offset Tone rToneFreq cToneFreq DtcsCode DtcsPolarity Mode TStep Skip Comment URCALL RPT1CALL RPT2CALL DVCODE
1 462.125000 0.000000 TSQL 88.5 69.3 023 NN FM 5.00 S
2 462.225000 0.000000 88.5 88.5 023 NN FM 5.00 S
3 462.325000 0.000000 88.5 88.5 023 NN FM 5.00 S
4 462.425000 0.000000 TSQL 88.5 103.5 023 NN FM 5.00 S
5 462.525000 0.000000 TSQL 88.5 114.8 023 NN FM 5.00 S
6 462.625000 0.000000 TSQL 88.5 127.3 023 NN FM 5.00 S
7 462.725000 0.000000 TSQL 88.5 136.5 023 NN FM 5.00 S
8 462.825000 0.000000 TSQL 88.5 162.2 023 NN FM 5.00 S
9 462.925000 0.000000 DTCS 88.5 88.5 023 NN FM 5.00 S
@soravux
soravux / dtmf_decode.py
Created May 25, 2014 01:14
DTMF decoding example for blog
from scipy.io.wavfile import read, write
from scipy.signal import find_peaks_cwt, firwin, lfilter, medfilt, resample, hamming
from scipy.optimize import fmin
import numpy as np
from matplotlib import pyplot as plt
import argparse
class Tone:
@corny
corny / dynv6.sh
Last active April 7, 2025 06:16
Update script for dynv6.com to set your IPv4 address and IPv6 prefix
#!/bin/sh -e
hostname=$1
device=$2
file=$HOME/.dynv6.addr6
[ -e $file ] && old=`cat $file`
if [ -z "$hostname" -o -z "$token" ]; then
echo "Usage: token=<your-authentication-token> [netmask=64] $0 your-name.dynv6.net [device]"
exit 1
fi
@mikedamoiseau
mikedamoiseau / Leaflet with Google, Bing and Openstreet Maps
Last active December 10, 2021 06:26
Leaflet with Google, Bing and Openstreet Maps
**Create a Bing API key**
https://www.bingmapsportal.com/application/create/1354301
**Download the plugins**
https://github.com/shramov/leaflet-plugins
```html
<!DOCTYPE html>
<html>
<head>
@tymarbut
tymarbut / README.md
Last active October 14, 2024 06:18
Baofeng (or other radio) data TX/RX for Raspberry Pi

This flow (and associated circuits/hardware) is designed to allow Node-RED to pass messages via radio waves in the same way as it passes messages via MQTT, using commonly-available, inexpensive handheld radios and the Raspberry Pi. The flow has been tested using Baofeng, Wouxun, and Quansheng handheld ham radios. In short, the goal is to allow packet-like transmissions between Node-RED systems over miles, while keeping the hardware costs down (or free for those hams who have surplus Baofengs hanging around). This could be used for a backup to MQTT when the Wifi is unreliable, or simply as a long-distance and network-agnostic message channel.

Prerequisites: Software

First, we need PulseAudio to make and receive sounds with our USB soundcard:

sudo apt-get install pulseaudio -y
@manugarri
manugarri / README.rst
Created May 11, 2016 12:25 — forked from livibetter/README.rst
Frequency spectrum of sound using PyAudio, NumPy, and Matplotlib

This Gist is about how I use PyAudio, NumPy, and Matplotlib to plot freqency spectrum of system sound or microphone.

You can read this blog post for more detail or watch this video:

https://i.ytimg.com/vi/hiGB_AP6iTo/maxresdefault.jpg
@Senorsen
Senorsen / csr-caps-lock-osd-mute.reg
Last active September 5, 2024 15:01
CSR Bluetooth 'Caps Lock' OSD notification mute
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Cambridge Silicon Radio\Harmony\Default]
"OSD"=dword:00000000
@patidardhaval
patidardhaval / README.md
Last active June 1, 2024 14:31
Node Rest api using hapi and mysql

NodeRestful

Create Node Restful APIs with MySQL Database

Install Node JS and MySQL Software, create a database and import SQL file.

Go to terminal or command line.

Execute following commands to run this application.

Start Project

@arjunv
arjunv / keyevents.json
Created December 2, 2018 00:01
All Android Key Events for usage with adb shell
{
"key_events": {
"key_unknown": "adb shell input keyevent 0",
"key_soft_left": "adb shell input keyevent 1",
"key_soft_right": "adb shell input keyevent 2",
"key_home": "adb shell input keyevent 3",
"key_back": "adb shell input keyevent 4",
"key_call": "adb shell input keyevent 5",
"key_endcall": "adb shell input keyevent 6",
"key_0": "adb shell input keyevent 7",