From: https://www.sensorsiot.org/install-rtl_433-for-a-sdr-rtl-dongle-on-a-raspberry-pi/
sudo apt-get install git git-core cmake libusb-1.0-0-dev
build-essential
git clone git://git.osmocom.org/rtl-sdr.git| // This function returns true if the device has a notch, false otherwise | |
| function device_has_notch() | |
| { | |
| // Get the device model name | |
| var device_model = device_get_model(); | |
| // Check if the device model is one of the known notched iPhones | |
| var notched_iphones = ["iPhone X", "iPhone XS", "iPhone XS Max", "iPhone XR", "iPhone 11", "iPhone 11 Pro", "iPhone 11 Pro Max", "iPhone 12", "iPhone 12 Mini", "iPhone 12 Pro", "iPhone 12 Pro Max"]; | |
| return array_find_index(notched_iphones, device_model) != -1; | |
| } |
| import gitlab | |
| from git import Repo | |
| import subprocess | |
| # Source GitLab instance | |
| source_url = 'https://source.gitlab.com' | |
| source_token = 'your-source-token' | |
| source_group_id = 1234 | |
| # Destination GitLab instance |
| import glob | |
| import time | |
| import paho.mqtt.publish as mqtt | |
| base_dir = '/sys/bus/w1/devices/' | |
| device_folder = glob.glob(base_dir + '28*')[0] | |
| device_file = device_folder + '/w1_slave' | |
| def read_temp_raw(): |
| #!/bin/bash | |
| git pull | |
| git add --all | |
| git commit -asm "`date +'%a %d %b %Y %H:%M:%S'`" | |
| git push |
| import requests | |
| from requests.exceptions import RequestException | |
| from lxml import etree | |
| from io import BytesIO | |
| BING_URL = "https://www.bing.com/" | |
| def bing_get_wallpaper_url(debug = True): |
| // Reference: https://gamemaker.io/en/blog/the-basics-of-scaling-the-game-view | |
| function display_scale_all_rooms() { | |
| var base_w = 1024; | |
| var base_h = 768; | |
| var max_w = display_get_width(); | |
| var max_h = display_get_height(); | |
| var aspect = display_get_width() / display_get_height(); | |
| if (max_w < max_h) { | |
| // portait | |
| var VIEW_WIDTH = min(base_w, max_w); |
From: https://www.sensorsiot.org/install-rtl_433-for-a-sdr-rtl-dongle-on-a-raspberry-pi/
sudo apt-get install git git-core cmake libusb-1.0-0-dev
build-essential
git clone git://git.osmocom.org/rtl-sdr.git| # Windows image file caches | |
| Thumbs.db | |
| ehthumbs.db | |
| # Folder config file | |
| Desktop.ini | |
| # Recycle Bin used on file shares | |
| $RECYCLE.BIN/ |
| ///ds_grid_import_array(ds_grid, array) | |
| var grid = argument[0]; | |
| var arr = argument[1]; | |
| // Calculate array Size | |
| var height = array_height_2d(arr); | |
| var width = 0; | |
| for (var i = 0; i < height; i++) { | |
| if (array_length_2d(arr, i) > width) | |
| width = array_length_2d(arr, i); |
| // Built on http://bravenewmethod.com/2014/09/13/lightweight-csv-reader-for-unity/ | |
| using UnityEngine; | |
| using System; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.Text.RegularExpressions; | |
| public class CSVReader | |
| { | |
| static string SPLIT_RE = @",(?=(?:[^""]*""[^""]*"")*(?![^""]*""))"; |