Skip to content

Instantly share code, notes, and snippets.

View areski's full-sized avatar
🤗
Working at DialerAI

Areski Belaid areski

🤗
Working at DialerAI
  • Star2Billing // DialerAI
  • Barcelona
  • X @areskib
View GitHub Profile
<!-- contact form -->
<div class="contact-form mb-5">
<form id="contactform" name="contactform" method="post">
<div class="row">
<div class="col-md-6 spaces">
<input name="email" class="form-control" type="text" placeholder="Email" aria-label="Email">
</div>
<div class="col-md-6">
<input name="phonenumber" class="form-control" type="text" placeholder="Phone Number" aria-label="Request live demo">
</div>
@areski
areski / contact.html
Created April 16, 2019 10:24 — forked from ShuvoHabib/contact.html
Mailgun Contact Form
<div class="contact-form">
<form id="contactform" name="contactform" method="post">
<div class="row">
<div class="col-sm-6">
<input name="name" class="form-control" type="text" placeholder="Name*"/>
</div>
<div class="col-sm-6">
<input name="email" class="form-control" type="email" placeholder="Email*"/>
</div>
<div class="clearfix"></div>
@areski
areski / run-sipp.sh
Last active February 1, 2019 09:28
Run SIPP
#!/bin/bash
#
# Newfies-Dialer - Stress testing stack
# Copyright (C) <2019> <Belaid Arezqui>
#
#
# Install and run SIPP
#
# Usage:
# bash run-sipp.sh install
@areski
areski / messagemedia_api.py
Created November 28, 2016 22:31
Send SMS via MessageMedia API
import hmac
import hashlib
import requests
from datetime import datetime
utc_str_date = datetime.utcnow().strftime("%a, %d %b %Y %H:%M:%S GMT")
secret = 'SECRET'
api_key = "API KEY"
url = 'https://rest.messagemedia.com/v1/messages'
@areski
areski / install-freeswitch-17.sh
Created March 23, 2016 10:44
Install FreeSWITCH 1.7
#!/bin/bash
#
# Arezqui Belaid <areski@gmail.com>
#
FS_CONFIG_PATH=/etc/freeswitch
FS_BASE_PATH=/usr/src
FS_VERSION=v1.7
@areski
areski / freeswitch-debian.init
Created March 23, 2016 10:20
FreeSWITCH init
#!/bin/bash
### BEGIN INIT INFO
# Provides: freeswitch
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Freeswitch debian init script.
# Author: Matthew Williams
#
@areski
areski / plluau_trigger_api.sql
Created March 13, 2016 14:05
PLLUAU example calling API when new Customer are created
--
-- PLLUAU example calling API when new Customer are created
--
CREATE TABLE customer (
id bigserial primary key,
full_name varchar(200) NOT NULL,
email varchar(200) NOT NULL,
created_date timestamp default NOW()
@areski
areski / benchmark_plpgsql.sql
Created March 12, 2016 16:17
PLPGSQL example - accumulator
--
-- Benchmark PLPGSQL
--
DROP TABLE accumulator;
CREATE TABLE accumulator (id BIGSERIAL PRIMARY KEY, new_value INT, sum_previous INT);
CREATE OR REPLACE FUNCTION "fillaccumulator"() RETURNS boolean AS
$BODY$
@areski
areski / benchmark_v8.sql
Created March 12, 2016 16:16
PLV8 example - accumulator
--
-- Benchmark PLV8
--
DROP TABLE accumulator;
CREATE TABLE accumulator (id BIGSERIAL PRIMARY KEY, new_value INT, sum_previous INT);
-- DROP FUNCTION IF EXISTS fillaccumulator();
CREATE OR REPLACE FUNCTION fillaccumulator () RETURNS void AS $$
var rows = plv8.execute( "SELECT count(*), SUM(new_value) FROM accumulator" );
@areski
areski / benchmark_lua.sql
Created March 12, 2016 16:15
PLLUA example - accumulator
--
-- Benchmark PLLUA
--
DROP TABLE accumulator;
CREATE TABLE accumulator (id BIGSERIAL PRIMARY KEY, new_value INT, sum_previous INT);
CREATE OR REPLACE FUNCTION fillaccumulator() RETURNS void AS $$
local query = server.execute('SELECT count(*), SUM(new_value) FROM accumulator', true, 1) -- read-only, only 1
local random = math.random