Skip to content

Instantly share code, notes, and snippets.

View lawrencekm's full-sized avatar

Larry lawrencekm

View GitHub Profile
@lawrencekm
lawrencekm / KannelDLR.md
Created April 28, 2022 00:59 — forked from grantpullen/KannelDLR.md
Kannel DLR information and how it maps to SMPP return values.

SMSPP Delviery Reports and Kannel

This info page relates to the DLR values which are returned by kannel when requesting DLR. Some SMPP related information is also listed for reference.

dlr-mask

This [send-sms][1] parameter is used to request for delivery reports with the state of the sent message. This requires the [dlr-url][1] on sendsms-user group or use the dlr-url CGI variable to be set. The value is a bit mask composed of:

Value Description
@lawrencekm
lawrencekm / kannel.conf
Created April 23, 2022 07:20 — forked from adothompson/kannel.conf
Sample Kannel configuration for talking to RapidSMS server
#
# CONFIGURATION FOR USING SMS KANNEL WITH RAPIDSMS
#
# For any modifications to this file, see Kannel User Guide
# If that does not help, see Kannel web page (http://www.kannel.org) and
# various online help and mailing list archives
#
# Notes on those who base their configuration on this:
# 1) check security issues! (allowed IPs, passwords and ports)
# 2) groups cannot have empty rows inside them!
@lawrencekm
lawrencekm / nginx-tuning.md
Created May 27, 2021 04:12 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@lawrencekm
lawrencekm / sysctl.conf
Created May 26, 2021 06:18 — forked from voluntas/sysctl.conf
Sysctl configuration for high performance
### KERNEL TUNING ###
# Increase size of file handles and inode cache
fs.file-max = 2097152
# Do less swapping
vm.swappiness = 10
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2
@lawrencekm
lawrencekm / redis_cheatsheet.bash
Created June 11, 2020 10:28 — forked from LeCoupa/redis_cheatsheet.bash
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
# Redis Cheatsheet
# All the commands you need to know
redis-server /path/redis.conf # start redis with the related configuration file
redis-cli # opens a redis prompt
# Strings.
@lawrencekm
lawrencekm / VideoStream.php
Created October 18, 2019 10:10 — forked from ranacseruet/VideoStream.php
PHP VideoStream class for HTML5 video streaming
<?php
/**
* Description of VideoStream
*
* @author Rana
* @link http://codesamplez.com/programming/php-html5-video-streaming-tutorial
*/
class VideoStream
{
private $path = "";
@lawrencekm
lawrencekm / timezones_array.php
Created August 28, 2019 06:47 — forked from pavellauko/LICENSE
Time zones as arrays (PHP)
<?php
$timezones = array(
'America/Adak' => '(GMT-10:00) America/Adak (Hawaii-Aleutian Standard Time)',
'America/Atka' => '(GMT-10:00) America/Atka (Hawaii-Aleutian Standard Time)',
'America/Anchorage' => '(GMT-9:00) America/Anchorage (Alaska Standard Time)',
'America/Juneau' => '(GMT-9:00) America/Juneau (Alaska Standard Time)',
'America/Nome' => '(GMT-9:00) America/Nome (Alaska Standard Time)',
'America/Yakutat' => '(GMT-9:00) America/Yakutat (Alaska Standard Time)',
'America/Dawson' => '(GMT-8:00) America/Dawson (Pacific Standard Time)',