Skip to content

Instantly share code, notes, and snippets.

View farirat's full-sized avatar

The Z farirat

View GitHub Profile
@farirat
farirat / nacef-simcaisse-minver.txt
Last active October 17, 2023 13:57
This is gist contains the minimum tolerated version of nacef-simcaisse
1.0.2
@farirat
farirat / 12d1:1f01
Created January 16, 2021 20:12 — forked from elupus/12d1:1f01
Setup of e3372 modem on pfsense
# /usr/local/share/usb_modeswitch/12d1:1f01
# Huawei E353 (3.se) and others
TargetVendor=0x12d1
TargetProductList="14db,14dc"
HuaweiNewMode=1
import pickle
from twisted.internet.defer import inlineCallbacks
from twisted.internet import reactor
from twisted.internet.protocol import ClientCreator
from twisted.python import log
from txamqp.protocol import AMQClient
from txamqp.client import TwistedDelegate
import txamqp.spec
"""
An example of scenario with the following actions:
1. Add and start a SMPP Client connector
2. Provision a DefaultRoute to that connector
3. Provision a User
This is a demonstration of using PB (PerspectiveBroker) API to gain control Jasmin.
The jasmin SMS gateway shall be already running and having
a pb listening on 8989.
import pickle
from twisted.internet.defer import inlineCallbacks
from twisted.internet import reactor
from twisted.internet.protocol import ClientCreator
from twisted.python import log
from txamqp.protocol import AMQClient
from txamqp.client import TwistedDelegate
import txamqp.spec
@farirat
farirat / deliver_sm_thrower.py
Created April 27, 2015 14:09
This will publish a DeliverSM directly to the smpps thrower
from twisted.internet import defer, reactor
from jasmin.vendor.smpp.pdu.operations import DeliverSM
from jasmin.queues.configs import AmqpConfig
from jasmin.queues.factory import AmqpFactory
from jasmin.routing.jasminApi import SmppServerSystemIdConnector
from jasmin.routing.content import RoutedDeliverSmContent
from jasmin.queues.test.test_amqp import waitFor
@defer.inlineCallbacks
def connect_and_publish(pdu, dc):