This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# example smsd config file | |
devices = GSM1 | |
outgoing = /var/spool/sms/outgoing | |
checked = /var/spool/sms/checked | |
incoming = /var/spool/sms/incoming | |
logfile = /var/log/smstools/smsd.log | |
infofile = /var/run/smstools/smsd.working | |
pidfile = /var/run/smstools/smsd.pid | |
outgoing = /var/spool/sms/outgoing | |
checked = /var/spool/sms/checked |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# this is an example python code to be used as an eventhandler for smstools (smsd) under linux | |
# script output will be logged along with smsd enteries under smsd.log | |
import sys | |
def extract_number(file_path): | |
phone_number = None | |
with open(file_path, 'r', errors='ignore', encoding='iso-8859-1') as file: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#switch to root | |
sudo -i | |
#install | |
apt-get install libglib2.0-dev libnfc-dev autoconf libtool libusb-dev libpcsclite-dev build-essential unzip -y | |
#download and compile | |
wget https://github.com/nfc-tools/libnfc/releases/download/libnfc-1.7.1/libnfc-1.7.1.tar.bz2 | |
tar -jxvf libnfc-1.7.1.tar.bz2 | |
cd libnfc-1.7.1 | |
autoreconf -vis | |
./configure --with-drivers=all --sysconfdir=/etc --prefix=/usr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# hey there! this is an easy and smiple API server to provide the weight of a buskool. | |
# You'll need an ESP micro controller running JEELABS's esp-link connected to the buskool monitor's RS232 with RS232 <-> TTL converter | |
# سرور ای پی آی جهت استفاده با نمایشگر و تبدیل آر اس 232 به شبکه | |
# Coded by Morsine (https://github.com/morsine) | |
from flask import Flask, jsonify, request | |
import socket | |
from threading import Thread | |
import re | |
s = socket .socket( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run the following | |
apt-get install -y make build-essential software-properties-common curl wget git g++ binutils file zlib1g-dev libedit-dev automake autoconf dh-autoreconf opencl-headers libcurl4-openssl-dev pkg-config libtool libncurses5-dev ocl-icd-dev ocl-icd-opencl-dev ocl-icd-libopencl1 libpci-dev libvdpau1 libjansson* -y | |
apt-get install automake autoconf pkg-config libcurl4-openssl-dev libjansson-dev libssl-dev libgmp-dev make g++ libgmp-dev libncurses5-dev libtool opencl-headers mali-fbdev -y | |
# I know some of them are duplicates, i'm lazy | |
git clone https://github.com/hominoids/sgminer-arm | |
cd sgminer-arm | |
git submodule init | |
git submodule update | |
autoreconf -fi | |
CFLAGS="-Os -Wall -march=native -std=gnu99 -mfpu=neon" LDFLAGS="-L/usr/lib/arm_compute-v18.03-bin-linux/lib/linux-armv7a-neon-cl" ./configure --disable-adl --disable-adl-checks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Note: These steps worked for me, but it might not work for you. This requires changing some stuff which might break your system. | |
# I am not responsible for anything | |
# be the root user! | |
sudo -i | |
# change the sources.list file contents | |
# open it and remove everything inside | |
nano /etc/apt/sources.list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
my $dev = "/sys/class/leds/green_led/brightness"; | |
my $OFF = "1"; | |
my $ON = "0"; | |
my ($ip) = `ifconfig`=~/ddr:(.*?) /; | |
#print $ip; | |
# Strip out the .'s | |
$ip =~ s/\.//g; |