Skip to content

Instantly share code, notes, and snippets.

View abuvanth's full-sized avatar

Syed abuvanth

View GitHub Profile
@abuvanth
abuvanth / crypto_price_widget.js
Created February 8, 2024 12:01
scriptable ios widget for showing cyberfly price in ios home
const params = args.widgetParameter ? args.widgetParameter.split(",") : [];
const isDarkTheme = params?.[0] === 'dark';
const padding = 2;
const widget = new ListWidget();
if (isDarkTheme) {
widget.backgroundColor = new Color('#1C1C1E');;
}
widget.setPadding(padding, padding, padding, padding);
from machine import Pin, SPI
from sx127x import SX127x #https://github.com/abuvanth/micropython-sx127x/blob/master/sx127x.py
import time
import neopixel
# Define the pins (adjust based on your ESP32 board and wiring)
MOSI_PIN = 4
MISO_PIN = 0
SCK_PIN = 1
NSS_PIN = 5
DIO0_PIN = 10
from machine import Pin, SoftSPI
from sx127x import SX127x #https://github.com/abuvanth/micropython-sx127x/blob/master/sx127x.py
import neopixel
from time import sleep
# Define the pins (adjust based on your ESP32 board and wiring)
MOSI_PIN = 4
MISO_PIN = 0
SCK_PIN = 1
NSS_PIN = 5
@abuvanth
abuvanth / esp32-cyberfly.py
Created October 22, 2023 04:54
Control esp32 onboard LED using Cyberfly IoT platform
from data_shipper import CyberflyDataShipper
import machine
import time
key_pair = {"publicKey":"37a720dcf056387df1d9c85cda3cbff55aa9084b6eaee8bb9fde20c684fd9418","secretKey":"f18adeab3f38b5531f6fcd9ae05d3fb0ea42f0314ea5b93f0d7114d14ff3daac"}
device_id="0afcff85-5b57-4136-aa6c-2897cc5b6b88"
client = CyberflyDataShipper(device_id=device_id, key_pair=key_pair, ssid="Abu",wifi_password="abu12345678", network_id="testnet04")
@client.on_message()
{
"$schema": "http://json-schema.org/draft-06/schema#",
"$ref": "#/definitions/Welcome4",
"definitions": {
"Welcome4": {
"type": "object",
"additionalProperties": false,
"properties": {
"dht": {
"$ref": "#/definitions/Dht"
from time import sleep
from machine import UART
import time
import network
uart = UART(2, baudrate=115200, tx=17, rx=16)
uart.write("AT+CGDCONT=1,\"IP\",\"jionet\"\r\n")
sleep(1.5)
uart.write("ATD*99#\r\n")
[Unit]
Description=Cyberfly python Client
After=network.target
[Service]
ExecStart=/usr/bin/python3 /home/cyberfly/temp_test.py #replace your script localtion
Restart=always
StandardOutput=append:/home/cyberfly/cy.log # replace cyberfly with your raspberry pi username
StandardError=append:/home/cyberfly/cy.log # replace cyberfly with your raspberry pi username
User=cyberfly #replace cyberfly with your raspberry pi username
import re
fil=open('hhh','r')
fil2=open('splt.txt','a')
rgx=r'(https?:\/\/[a-zA-Z0-9._\-]+)(\/.+)'
for i in fil.readlines():
m=re.search(rgx,i)
print(m.group(2)) #change 2 to 1 if you want hostname
fil2.write(m.group(2)+'\n') #change 2 to 1 if you want hostname
123contactform
abacus
acquia
activecampaign
adobe
aerofs
airbnb
amazon
ancile
appcelerator
www.google.com
alt.aspmx.1.google.com
client.1.google.com
clients.1.google.com
gmail-smtp-mas.1.google.com
misc-anycast.1.google.com
104-cache-blicnet.google.com
119-cache-blicnet.google.com
216-239-45-10.google.com
31.google.com